Skip to content

Instantly share code, notes, and snippets.

@decasteljau
Created January 9, 2020 21:10
Show Gist options
  • Select an option

  • Save decasteljau/43a2ca154c483d10f2b8fae389fcb873 to your computer and use it in GitHub Desktop.

Select an option

Save decasteljau/43a2ca154c483d10f2b8fae389fcb873 to your computer and use it in GitHub Desktop.
from waapi import WaapiClient
import pprint
# Connect (default URL)
client = WaapiClient()
# Return all targets
args = {
"from": {"path": ['\\Events\\Default Work Unit\\Play']},
"transform": [
{"select": ['children']}
]
}
options = {
"return": ['@Target']
}
result = client.call("ak.wwise.core.object.get", args, options=options)
pprint.pprint(result)
# Return all wem files from targets
args = {
"from": {"id": list(map(lambda x: x['@Target']['id'], result['return']))},
"transform": [
{"select": ['descendants']},
{"where": ['type:isIn', ['AudioFileSource']]}
]
}
options = {
"return": ['name', 'id','sound:convertedWemFilePath']
}
result = client.call("ak.wwise.core.object.get", args, options=options)
pprint.pprint(result)
# Disconnect
client.disconnect()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment