Wwise SDK 2018.1.11
|
Command add-ons allow to define new commands for Wwise Authoring. Each command is associated with an external program that is being triggered by Wwise. Programs that are executed can receive a variety of predefined arguments that are derived from the currently selected objects.
Add-on commands can be triggered in different ways:
Add-on commands can be defined on several levels:
Note: In case of id conflict, only the first command loaded will be registered. The commands are loaded in the order specified above. |
Note: Command add-ons specified in the installation folder or in the user data directory are loaded at Wwise startup. Command add-ons specified under the project are loaded at project load time. |
Additionally, every time a command is executed in Wwise, WAAPI will notify the subscribers with ak.wwise.ui.commands.executed, passing the selected objects and honoring WAAPI return options. Add-on commands can be defined with no program to execute, so you could use the publication event to execute your own code in a WAAPI client.
A command is described by the following fields:
The following predefined variables can be used the args
field (program arguments). When a multiple selection is used, please refer to startMode
to learn how these variables resolve.
Variable | Type | Description |
---|---|---|
${id} | string | The object ID (GUID). |
${name} | string | The object name. |
${notes} | string | The object notes. |
${type} | string | The object type. Refer to Wwise Objects Reference for more information on the types available. |
${path} | string | The object path from the project root. Ex: '\\Actor-Mixer Hierarchy\\Default Work Unit\\Sound1' |
${isPlayable} | boolean | True if the object can be played in Transport. |
${shortId} | integer | The object short ID. |
${classId} | integer | The object class ID. |
${category} | string | The object category. For example: 'Actor-Mixer Hierarchy' |
${filePath} | string | The path to the file containing the object. The path can be a Work Unit file, or a project file. |
${childrenCount} | number | The number of children for the object. |
${sound:originalWavFilePath} | string | Absolute path to the original WAV file. Only valid for Sound and Audio Source objects. |
${sound:convertedWemFilePath} | string | Absolute path to the converted WEM file. Specify the platform in the options. Only valid for Sound and Audio Source objects. |
${soundbank:bnkFilePath} | string | Absolute path to the generated SoundBank file associated with the SoundBank object. Only valid for SoundBank objects. |
${workunit:isDefault} | boolean | True if the Work Unit is the default. |
${workunit:type} | string | The type of the Work Unit. Please note that, like Work Units, physical folders have the type "WorkUnit". Physical folders will have the workunit:type "folder". Possible values : "folder", "rootFile", "nestedFile" |
${workunit:isDirty} | boolean | True if a Work Unit or a Project (wproj file) is dirty, meaning it is modified but not saved. |
To create new commands, create a JSON file under one of the directories listed in Defining Command Add-ons. Please be aware that multiple 3rd parties can create files under these directories. In order to reduce the risk of filename conflicts, we recommend using the following convention for the filenames: companyname_productname.json
Example: mycompany_myproduct.json
The exact same JSON command code as above can be passed to WAAPI ak.wwise.ui.commands.register, to add new commands to the current Wwise process.
Please note that commands added with ak.wwise.ui.commands.register are not persisted. They will remain until the Wwise process terminates. You will have to register them again next time.
Add-on commands can be used to execute WAAPI scripts or programs. This gives you access to Wwise functionalities and project data. Refer to Using the Wwise Authoring API (WAAPI) to learn what you can do with WAAPI.
Add-on commands are executed on Mac using
. Any executable or script can be directly specified in program
. To open an app, you must use the open
command. Paths with spaces are expected to be enclosed with single quotes.
Example: mycompany_myproduct_forMac.json
Questions? Problems? Need more info? Contact us, and we can help!
Visit our Support pageRegister your project and we'll help you get started with no strings attached!
Get started with Wwise