Linux环境Maya2020添加Shelf Separator失败及异常问题求助
Maya 2020(Linux)添加Shelf分隔符失败问题
我在Linux系统的Maya 2020中,尝试为当前打开的Custom Shelf添加Shelf分隔符,但多种方法均出现问题:
- 在MEL命令行或目标Shelf的按钮中执行
addShelfSeparator();时,报错:
// Error: file: /s/apps/packages/cg/maya/2020.4.9-45.0/platform-linux/scripts/startup/shelf.mel line 594: Object's window not found.
- 属性编辑器打开时,执行
shelf.mel第594行的命令separator -width 12 -height 35 -style "shelf" -hr false;,报错:
// Error: line 1: Object's window not found.
- 关闭属性编辑器后执行上述命令,分隔符被错误创建在属性编辑器下半部分,返回结果:
// Result: AttributeEditor|MainAttributeEditorLayout|formLayout52|AEmenuBarLayout|separator91
- 执行以下Python代码:
import maya.cmds as cmds import maya.mel as mel gShelfTopLevel = mel.eval("global string $gShelfTopLevel; $temp = $gShelfTopLevel;") currentShelf = cmds.tabLayout(gShelfTopLevel, q=True, st=True) cmds.separator(currentShelf, width=12, height=35, style="shelf", hr=False)
仍报错:
global string $gShelfTopLevel; $temp = $gShelfTopLevel;
// Result: Shelf|MainShelfLayout|formLayout17|ShelfLayout //Error: Object's window not found.Traceback (most recent call last):File "", line 7, in RuntimeError: Object's window not found.
请问为何官方工具addShelfSeparator();无法正常工作?
内容的提问来源于stack exchange,提问作者Lauloque
相关产品推荐
相关产品推荐

