버전

menu_open
Wwise SDK 2023.1.3
Wwise 프로젝트 쿼리하기

Wwise Authoring API는 종합적인 쿼리 시스템을 제공해 Wwise 프로젝트의 가장 중요한 부분을 검색할 수 있도록 합니다. 더 자세히 말해, 프로젝트 내 어떤 오브젝트든 불러올 수 있다는 뜻입니다.

쿼리 시스템은 ak.wwise.core.object.get 함수에 포함돼있습니다. 더 자세한 내용은 해당 참고 자료 문서에서 확인하실 수 있습니다.

Queries can take 2 different forms:

참고: We recommend using WAQL instead of the JSON query format. WAQL provides greater functionality and coverage, has better error handling and is easier to use.

WAQL queries

WAQL queries allows to specify the entire query in one unique line of text.

작은 정보:
WAQL queries can also be used directly inside Wwise Authoring for testing. This is especially useful to verify the query syntax and results before implementing it inside your WAAPI program or script. For example, type the following WAQL query in the Wwise toolbar or List View search fields:
$ from type Event

Learn more about WAQL:

JSON queries

참고: JSON queries are not recommended. We recommend using WAQL queries instead. Refer to Using the Wwise Authoring Query Language (WAQL) and Getting Started with WAQL.

JSON Queries are structured into two parts:

  • from: 쿼리 시작 지점을 지정합니다. 이는 데이터를 가져오는 출발지가 됩니다.
  • transform: 오브젝트에 적용할 일련의 변환을 지정합니다. 변형은 시퀀스에 추가할 수 있습니다.

또한, 쿼리는 다음과 같은 상세 내용을 지정하는 옵션이 있습니다.

  • return: 오브젝트로부터 무엇을 반환할 지 지정합니다. 특별히 지정된 게 없으면 기본 설정으로 ['id, 'name']이 됩니다.
  • platform: 플랫폼이 쿼리를 사용하도록 지정합니다. 특별히 지정된 게 없으면 기본 설정으로 현재 플랫폼이 됩니다.

from

from 구문은 쿼리를 시작에 앞서 몇 가지 사항을 정합니다:

  • id: 오브젝트 ID(GUID)의 어레이를 지정합니다. 이미 오브젝트 ID가 있을 경우 해당 오브젝트를 검색할 때 유용합니다.
  • name: 타입으로 정규화된 오브젝트 이름의 배열을 type:name의 형태로 지정합니다. 전역적으로 고유한 이름으로 된 오브젝트 타입만 지원됩니다. 사용 가능한 타입에 대한 정보는 Wwise 오브젝트 레퍼런스 를 확인하세요.
  • search: Wwise 오브젝트 이름과 노트에서 검색할 텍스트를 지정합니다.. Wwise 검색과 동일한 검색 엔진을 사용합니다.
  • path: 검색할 경로 어레이를 지정합니다. 이 때 경로는 반드시 절대 경로여야 하며 카테고리 이름으로 시작해야 하며, 이는 물리적 폴더 이름과 동일합니다. 예시: \Actor-Mixer Hierarchy\Default Work Unit\MySound.
  • ofType: Wwise 오브젝트 타입의 어레이를 지정합니다. 모든 Game Parameter를 가져오는 경우와 같이 특정 오브젝트 타입에 해당하는 모든 오브젝트를 가져올 때 유용합니다. 사용 가능한 타입에 대한 정보는 Wwise 오브젝트 레퍼런스 를 확인하세요.

transform

transform 구문은 선택된 오브젝트를 변형할 때 사용하는 변형 함수 몇 가지를 제공합니다. 첫 번째 변형은 from 구문으로 선택된 오브젝트에 적용됩니다. 다른 변형은 이전 변형의 결과물에 적용됩니다.

시퀀스에 여러 개의 변형이 적용될 수 있습니다.

  • select parent: 모든 오브젝트에 대해 각각에 해당하는 상위 오브젝트를 선택합니다.
  • select children: 모든 오브젝트에 대해 각각에 해당하는 하위 오브젝트 목록을 선택합니다.
  • select descendants: 모든 오브젝트에 대해 모든 하위 오브젝트를 반복적으로 선택합니다.
  • select ancestors: 모든 오브젝트에 대해 모든 상위 오브젝트를 반복적으로 선택합니다.
  • select referencesTo: 모든 오브젝트에 대해 해당 오브젝트를 참조하는 모든 오브젝트를 선택합니다.
  • where: 이전 반복자의 결과를 필터링합니다. 사용 가능한 기준은 다음과 같습니다.
    • name:contains: 오브젝트 이름을 검색할 때 대/소문자를 구분합니다.
    • name:matches: 오브젝트 이름을 정규 표현식으로 검색할 때 대/소문자를 구분합니다.
    • type:isIn: 특정 타입의 오브젝트만 유지함으로써 이전 반복자의 결과를 필터링합니다. 오브젝트 타입 목록에 대한 내용은 Wwise 오브젝트 레퍼런스 를 참고하세요.
    • category:isIn: 특정 카테고리의 오브젝트만 유지함으로써 이전 반복자의 결과를 필터링합니다.
  • distinct: 고유한 오브젝트만 유지함으로써 이전 반복자의 결과를 필터링합니다.

Return Options

The return expression specifies which elements of the Wwise objects to return. 반환하는 요소의 개수에는 제한이 없습니다.

The return expression can contain:

Two optional prefixes exist for property and reference names:

  • '@PROPERTYNAME': Returns the value directly set on the object. This ignores the override system, and may return a value that is unused and hidden.
  • '@@PROPERTYNAME': Returns the value as resolved by the override system. It may return the value inherited from a parent, or the value of the object directly, if the object overrides the property.

When no prefix is used, it returns the value as resolved by the override system. This is the equivalent of using the @@ prefix. We recommend not using a prefix.

예시:

  • 'volume', 'Volume', '@Volume', '@@Volume': returns the volume of the object. Since the volume is not overridable, all of these are equivalent. Note that property names are case-insensitive.
  • 'OutputBus', 'outputbus', '@@OutputBus': returns the Output Bus as resolved by the override system (using Override Parent). This is the value being used for playback. Note that reference names are case-insensitive.
  • '@OutputBus': returns the Output Bus as set on the object directly. This is also the value persisted on the Work Unit for this object. This value might not be used, and could be hidden, if the object does not have the Override Parent option checked.

표현식이 유효한 참조로 확인되면, 참조된 오브젝트의 속성에 대해 더 상세히 쿼리할 수 있습니다. For example, if the reference 'UserAuxSend0' on a Sound object references an existing Auxiliary Bus, it is possible to query a property of this Auxiliary Bus by appending a dot ('.'), followed by the property descriptor. Querying for the Attenuation of the referenced Auxiliary Bus would therefore simply be 'UserAuxSend0.Attenuation'.

예시:

  • OutputBus.name: returns the name of the output bus.
  • parent.name: returns the name of the parent object.
  • parent.parent.type: returns the type of the grandparent object.
  • OutputBus.Volume: returns the volume of the output bus.
  • OutputBus.Attenuation.name: returns the name of the output bus.
  • Attenuation.path: returns the path of the output bus.
  • Effects.first.effect.id: returns the ID of the first Effect.

일부 오브젝트에는 랜덤화(randomization) 같이 특정 기능을 하는 속성이 있습니다. 이런 기능과 관련된 값을 가져오기 위해서는, 해당 속성에 연관된 특수한 오브젝트를 함수와 유사한 접근자를 통해 쿼리합니다. 예를 들어, 랜더마이저(randomizer) 기능은 오브젝트의 특정 속성에 연결된 Modifier 오브젝트로 서술할 수 있습니다. 이 오브젝트는 'randomizer("PropertyName")'로 쿼리될 수 있습니다. 여기서 PropertyName에는 'Volume' 같은 속성 이름이 들어갑니다. 접근자가 유효한 참조를 제공할 경우, 이전에 설명한 것처럼 반환되는 오브젝트를 더 상세히 쿼리할 수 있습니다. For example, the 'Max' property of the Volume randomizer can be obtained like so: 'randomizer("Volume").@Max'.

사용 가능한 접근자 목록은 다음과 같습니다.

  • randomizer (랜더마이저)

반환 표현식의 요소가 반환된 오브젝트에서 존재하지 않거나 호환 불가능할 경우, 결과물에서 제외됩니다.

그 밖의 옵션

ak.wwise.core.object.get 함수를 비롯해 옵션 오브젝트를 취하는 다른 함수들은 다음을 정의합니다.

  • 반환 표현식 (위에 나온 설명 참조)
  • 플랫폼: 플랫폼의 이름이나 ID(GUID)
  • 언어: 언어 이름이나 ID(GUID)

일부 접근자는 옵션에 따라 영향을 받을 수 있습니다. 예를 들어 속성이나 참조 값을 가져올 때, 플랫폼을 지정해 연결되지 않은 값을 구할 수 있습니다. 플랫폼이 지정돼있지 않은 경우, 현재 플랫폼을 사용합니다. 언어 또한 별도로 지정해 Sound 오브젝트의 오디오 음원 데이터와 같이 특정 언어로 된 정보를 가져올 수 있습니다. 특별히 지정돼있지 않은 경우, 현재 언어를 사용합니다.

예제

초기화에 대한 정보는 프로젝트 코드 를 참고하세요.

ak.wwise.core.object.get 에 더 많은 예제가 나와있습니다.

오브젝트 목록의 ID와 이름, 보이스 볼륨을 반환합니다.

from waapi import WaapiClient
import pprint
# Connect (default URL)
client = WaapiClient()
# Return two objects
args = {
'waql': '$ "\\Audio Devices\\Default Work Unit\\System", "{1514A4D8-1DA6-412A-A17E-75CA0C2149F3}"'
}
options = {
'return': ['id', 'name', 'Volume']
}
result = client.call("ak.wwise.core.object.get", args, options=options)
pprint.pprint(result)
# Disconnect
client.disconnect()

정규 표현식을 이용해 'My'로 시작하는 Actor-Mixer Hierarchy 내 모든 오브젝트의 ID와 이름을 반환합니다.

from waapi import WaapiClient
import pprint
# Connect (default URL)
client = WaapiClient()
# Return all objects under the actor-mixer hierarchy with loop in the name
args = {
'waql': '$ "\Actor-Mixer Hierarchy" select descendants where name = /^My/'
}
options = {
'return': ['name', 'id']
}
result = client.call("ak.wwise.core.object.get", args, options=options)
pprint.pprint(result)
# Disconnect
client.disconnect()

To learn more about WAQL, refer to Using the Wwise Authoring Query Language (WAQL)


이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요