Skip to content

Instantly share code, notes, and snippets.

@decasteljau
Created May 1, 2019 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save decasteljau/fc2d6a62480ec2a124c1f72495eeb753 to your computer and use it in GitHub Desktop.
Save decasteljau/fc2d6a62480ec2a124c1f72495eeb753 to your computer and use it in GitHub Desktop.
from waapi import WaapiClient
import pprint
# Connect (default URL)
client = WaapiClient()
# Return all events referencing the specified object
args = {
"from": {"path": ['\\Actor-Mixer Hierarchy\\Default Work Unit\\MySound']},
"transform": [
{"select": ['referencesTo']}, # get all references to object
{"where": ['type:isIn', ['Action']]}, # only keep the event actions
{"select": ['parent']}, # get the parent of action, which is the event
"distinct", # eliminate duplicates
]}
options = {
"return": ['id', 'name','type']
}
result = client.call("ak.wwise.core.object.get", args, options=options)
pprint.pprint(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment