版本

menu_open
Wwise SDK 2023.1.3
ak.wwise.ui.commands.register

注册包含扩展命令的数组。保留注册的命令,直到 Wwise 进程终止。如需详细了解如何注册命令,请参阅 定义命令扩展 章节。另请参阅 ak.wwise.ui.commands.executed 章节。

参数

名称 类型 说明
commands * array 所要注册的命令的数据。
此数组中包含一系列命令扩展。
commands [...] object 指定命令扩展。
commands[...].id * string 为命令定义用户可读的唯一 ID。为了降低 ID 冲突风险,请结合使用作者姓名、产品名称和命令名称。
commands[...].displayName * string 定义用户界面中显示的名称。
commands[...].program string 定义执行命令时要运行的程序或脚本。在 'args' 中指定参数。Note that common directories variables can be used, such as ${CurrentCommandDirectory}.
commands[...].luaScript string Defines a lua script file path to run inside Wwise process when the command is executed. 在 'args' 中指定参数。Note that common directories variables can be used, such as ${CurrentCommandDirectory}.
commands[...].luaPaths array Defines an array of paths to be used to load additional lua scripts. Here is an example of a lua path 'C:/path_to_folder/?.lua'. Note that common directories variables can be used, such as ${CurrentCommandDirectory}.
Several values provided for the option.
commands[...].luaPaths [...] string A value for the option.
commands[...].luaSelectedReturn array Specifies an array of return expressions for the selected objects in Wwise. This will be available to the script in a lua table array in wa_args.selected.
Several values provided for the option.
commands[...].luaSelectedReturn [...] string A value for the option.
commands[...].startMode string 指定在 Wwise 用户界面中执行多选时如何扩展参数字段中的变量。SingleSelectionSingleProcess:仅支持单选,启动程序一次。MultipleSelectionSingleProcessSpaceSeparated:启动程序一次,并将变量扩展为空格分隔的参数(每个变量都加上双引号)。MultipleSelectionMultipleProcesses:每选中一项启动程序一次(并行执行)。每次运行实例接收一个选定项。可能的值:
  • SingleSelectionSingleProcess
  • MultipleSelectionSingleProcessSpaceSeparated
  • MultipleSelectionMultipleProcesses
commands[...].args string 定义参数。如需查看支持的各种内置变量,请参阅相关文档。注意,在执行多选时,将根据 startMode 字段扩展变量。Note that common directories variables can be used, such as ${CurrentCommandDirectory}.
commands[...].cwd string 定义用于执行程序的当前工作目录。Note that common directories variables can be used, such as ${CurrentCommandDirectory}.
commands[...].defaultShortcut string 定义此命令默认使用的快捷方式。若快捷方式存在冲突,则不使用。可在 Keyboard Shortcut Manager 中更改此快捷方式。
commands[...].redirectOutputs boolean 定义程序的标准输出流 (stdout + stderr) 是否要在终止时转为在 Wwise 中记录。该值为布尔类型,默认值为 false。
commands[...].contextMenu object 若显示,则指定如何将命令添加到 Wwise 上下文菜单。若为空,则不添加任何上下文菜单。
commands[...].contextMenu.basePath string 为父级子菜单定义正斜杠分隔的路径。若为空,则在第一个级别插入菜单。
commands[...].contextMenu.visibleFor string 为可见项对应的对象类型定义逗号分隔的列表。如需查看支持的各种类型,请参阅 Wwise 对象参考 章节。若为空,则允许任意类型。
commands[...].contextMenu.enabledFor string 为已启用项定义逗号分隔的对象类型列表。如需查看支持的各种类型,请参阅 Wwise 对象参考 章节。若为空,则允许任意类型。
commands[...].mainMenu object 若显示,则指定如何将命令添加到 Wwise 主菜单。若为空,则不添加任何主菜单。
commands[...].mainMenu.basePath * string 为父级子菜单定义正斜杠分隔的路径。该字段至少要定义一层路径,并与顶层菜单关联。

(必填 *)

参数架构

另请参阅

示例

有关 Wwise Authoring API 的详细信息,请参阅 使用 Wwise Authoring API(WAAPI) 章节。


此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅