You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.27 08:32:17