可以通过告诉 Maya 执行 一个字符串,以开放式脚本编写体系结构语言(通常被称为 AppleScript)传递 MEL 命令到 Maya。例如:
// This is AppleScript code tell application "Maya" execute "sphere;" end tell
执行动词返回 MEL 结果。
可以使用 Mac OS osascript 命令,从 MEL 间接调用 AppleScript。
// This is MEL code system("osascript "tell application finder to activate"");
这种使用 MEL 系统命令的命令行调用 AppleScript 的方法比较复杂,因为每个级别都具有其自己的特殊字符和引用规则。使用 osascript 命令的 -i(包含)标志,从文件而不是命令行获得脚本。
有关使用 osascript 命令的详细信息,请阅读手册的 osascript 页面 (man osascript),或搜索 Apple 知识库。
此外,有关 AppleScripts 对 HFS (:) 和 POSIX (/) 路径分隔符支持的最新信息,请搜索 Apple 知识库。
,