コード例 #1
0
ファイル: UICharactersTools.py プロジェクト: EriLee/marigold
 def saveCharacter( self ):
     '''
     Save the character into an XML file for re-use.
     '''        
     charNode = self.characterDict[self.SAVE_SELECTED_CHARACTER]
     charBitName = Components.CharacterRootComponent( charNode ).parentNode[0]
     XMLUtility.writeModuleXML( charBitName, 'characters', self.SAVE_SELECTED_CHARACTER )
コード例 #2
0
ファイル: UILatticesTools.py プロジェクト: EriLee/marigold
 def saveModule( self ):
     '''
     Save the module into an XML file for re-use.
     We assume that the root node of the module is the one with the module root meta node.
     This means it and all of it's children will be saved in the XML.
     '''
     # Get the selected module
     item = cmds.ls( long=True, selection=True )[0]
     
     # Try to get the module meta component.
     moduleComp = Components.searchModule( item, 'ModuleRootComponent' )
     
     if moduleComp:
         # Get the module info and save it as an XML.
         modulePlug = NodeUtility.getPlug( moduleComp[1], 'moduleName' )
         moduleName = NodeUtility.getPlugValue( modulePlug )
         XMLUtility.writeModuleXML( moduleComp[0], self.SELECTED_ITEM, moduleName )