是否可以在clone outliner编辑器中显示自定义节点? 我想显示自定义组和子网格,从方法返回到新的大纲窗口。
我想创建这个经理,4列是大纲
布局中的四列大纲:
cmd.paneLayout('d', configuration='vertical4', h=WS.h )
cmd.formLayout('form_parts' )
m = cmd.itemFilter( bs=partGroups() )
editor = cmd.outlinerEditor( mainListConnection='worldList', selectionConnection='modelList',)
outliner = cmd.outlinerEditor(editor, edit=True)
cmd.setParent('..')
cmd.formLayout('form_parts', edit=True, attachForm=[ (outliner, 'top', 0), (outliner, 'left', 0), (outliner, 'right', 0), (outliner, 'bottom', 0) ] )
cmd.formLayout('form_parts2')
f = cmd.itemFilter(byType="transform")
editor2 = cmd.outlinerEditor( mainListConnection='worldList', selectionConnection='modelList', filter = f )
outliner2 = cmd.outlinerEditor(editor2, edit=True)
cmd.setParent('..')
cmd.formLayout('form_parts2', edit=True, attachForm=[ (outliner2, 'top', 0), (outliner2, 'left', 0), (outliner2, 'right', 0), (outliner2, 'bottom', 0) ] )
cmd.formLayout('form_parts3' )
editor2 = cmd.outlinerEditor( mainListConnection='worldList', selectionConnection='modelList', f = "DefaultContainerFilter")
outliner2 = cmd.outlinerEditor(editor2, edit=True)
cmd.setParent('..')
cmd.formLayout('form_parts3', edit=True, attachForm=[ (outliner2, 'top', 0), (outliner2, 'left', 0), (outliner2, 'right', 0), (outliner2, 'bottom', 0) ] )
cmd.formLayout('form_parts4' )
editor3 = cmd.outlinerEditor( mainListConnection='worldList', selectionConnection='modelList', f = "DefaultContainerFilter" )
outliner3 = cmd.outlinerEditor(editor3, edit=True)
cmd.setParent('..')
cmd.formLayout('form_parts4', edit=True, attachForm=[ (outliner3, 'top', 0), (outliner3, 'left', 0), (outliner3, 'right', 0), (outliner3, 'bottom', 0) ] )
我的问题是,或者只能是我需要的内容。 例如:
如果无法做到这一点,我可能不得不把它写成pyside
谢谢
答案 0 :(得分:0)
您应该使用过滤器和setFilter ..请检查此https://help.autodesk.com/cloudhelp/2017/ENU/Maya-Tech-Docs/CommandsPython/outlinerEditor.html#flagsetFilter
例如
filterList = cmds.listNodeTypes("light")
cmds.outlinerEditor(myOutliner, edit=True, filter=filterMode, setFilter=filterMode, dag=False)