It's unclear to me whether ak.wwise.ui.commands.execute is blocing or async. The doc doesn't address this.
Since there is the ak.wwise.ui.commands.executed API, I assumed that it's async. But ...
When I generate soundbanks using WAAPI:
try:
with WaapiClient() as client:
def _on_soundbank_generated(*args, **kwargs):
print('args: {}'.format(args))
print('we should see this after bank dialog quits.')
client.disconnect()
handler = client.subscribe('ak.wwise.ui.commands.executed', _on_soundbank_generated, {"return": ['id', 'name', 'type']})
query = {'command': 'GenerateAllSoundbanksAllPlatformsAutoClose'}
result = client.call('ak.wwise.ui.commands.execute', query)
print('WAAPI query: {}, result{}'.format(query, result))
except Exception as err:
raise RuntimeError('WAAPI query failed with error: {}. Aborted'.format(err))
, the bank generation dialog pops up and things are being generated. The API call blocks until the "Writing to disk" status appears in the dialog.
This is weird. I expect that the call either returns right away or does not return until the bank generation dialog quits.
Am I missing something?