本文整理汇总了Python中marigold.utility.NodeUtility.sortModules方法的典型用法代码示例。如果您正苦于以下问题:Python NodeUtility.sortModules方法的具体用法?Python NodeUtility.sortModules怎么用?Python NodeUtility.sortModules使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类marigold.utility.NodeUtility
的用法示例。
在下文中一共展示了NodeUtility.sortModules方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from marigold.utility import NodeUtility [as 别名]
# 或者: from marigold.utility.NodeUtility import sortModules [as 别名]
def __init__( self, parent=maya_main_window(), inCharNode=None ):
super( CharacterPriorityPrompt, self ).__init__(parent )
self.parent = parent
# Build a list of the character's modules.
print 'CharacterPriorityPrompt>inCharNode: {0}'.format( inCharNode )
modules = getCharacterModules( inCharNode )
print '__modules: {0}'.format( modules )
modPriorityDict = NodeUtility.getModulePriorities( modules )
modulesSorted = NodeUtility.sortModules( modPriorityDict )
print '__modulesSorted: {0}'.format( modulesSorted )
self.dropList = QTWidgets.DropList()
self.modDict = {}
for module in modulesSorted:
moduleName = cmds.getAttr( '{0}.moduleName'.format( module[0] ) )
print '____moduleName: {0}'.format( moduleName )
self.modDict[moduleName] = [ module[0], int(module[1]) ]
self.dropList.addItem( moduleName )
self.setWindowTitle( 'Change Build Priority' )
self.setFixedSize( 250, 200 )
self.accept_button = QtGui.QPushButton( 'Set Priorities' )
self.accept_button.clicked.connect( lambda:self.setPriorities() )
self.cancel_button = QtGui.QPushButton( 'Cancel' )
self.cancel_button.clicked.connect( lambda:self.close() )
button_layout = QtGui.QHBoxLayout()
button_layout.setSpacing( 2 )
button_layout.addStretch()
button_layout.addWidget( self.accept_button )
button_layout.addWidget( self.cancel_button )
main_layout = QtGui.QVBoxLayout()
main_layout.setSpacing( 2 )
main_layout.addWidget( self.dropList )
main_layout.addLayout( button_layout )
self.setLayout( main_layout )