问题描述
使用Maya 2018,我如何编写一个简单的Python命令来切换大纲视图标志``忽略隐藏在大纲视图中''?我在使用outlinerPanel命令和outlinerEdit命令访问该面板属性时遇到麻烦.
这里是节点"hid"的一个示例,其属性隐藏在大纲视图中"已选中,但由于已在大纲视图选项忽略"中禁用了隐藏的InOuliner",因此在大纲视图中仍可见. /p>
def setHiddenInOutliner(nodes=list, value=bool):
for n in nodes:
cmds.setAttr('{}.hiddenInOutliner'.format(n), value)
# refresh any outliner editors
eds = cmds.lsUI(editors=True)
for ed in eds:
if cmds.outlinerEditor(ed, exists=True):
cmds.outlinerEditor(ed, e=True, refresh=True)
这是我正在使用的代码,它只是一个简单的属性
Using Maya 2018, how can I write a simple Python command that will toggle the outliner flag, 'ignore hidden in outliner' ? I am having trouble accessing that panel attribute using the outlinerPanel command and the outlinerEdit commands.
Here is an example of the node, 'hid', having its attribute, 'Hidden in Outliner' checked on, but it is still visible in the outliner because the outliner option, 'ignore hiddenInOuliner' has been toggled on.
def setHiddenInOutliner(nodes=list, value=bool):
for n in nodes:
cmds.setAttr('{}.hiddenInOutliner'.format(n), value)
# refresh any outliner editors
eds = cmds.lsUI(editors=True)
for ed in eds:
if cmds.outlinerEditor(ed, exists=True):
cmds.outlinerEditor(ed, e=True, refresh=True)
Here is the code im using, it is just a simple attribute
这篇关于在Maya中,如何使用Python切换“忽略隐藏在大纲视图中的标记"标志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!