Created
January 9, 2020 21:10
-
-
Save decasteljau/43a2ca154c483d10f2b8fae389fcb873 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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