Beispiel #1
0
 def create_master(cls, newNode):
     
     if not pm.objExists('master'):
         
         grpDict , rigDict, ctrlDict = utils.create_master( assetName = newNode.name() )
         
         #===================================================================
         # METAINFO
         #===================================================================
         grps_metaInfo = utils.create_metaNode("MetaInfo", name="%s_%s"%(newNode.name(), "groups"), attrDict=grpDict)
         pm.connectAttr("%s.message"%grps_metaInfo.name(), "%s.%s"%(newNode.name(), "groups"), f=True)
         pm.connectAttr(grps_metaInfo.metaParent, newNode.metaChildren, na=True)
         
         ctrl_metaInfo = utils.create_metaNode("MetaInfo", name="%s_%s"%(newNode.name(), "ctrl"), attrDict=ctrlDict)
         pm.connectAttr("%s.message"%ctrl_metaInfo.name(), "%s.%s"%(newNode.name(), "ctrl"), f=True)
         pm.connectAttr(ctrl_metaInfo.metaParent, newNode.metaChildren, na=True)
Beispiel #2
0
import tool.autoRig.utils_autoRig as utils ; reload(utils)
import pymel.core as pm

utils.import_metaClasses()

root = utils.create_metaNode(type="MetaRoot")

t1 = utils.create_metaNode(type="Master_MetaRig", name='myAsset')

t2 = utils.create_metaNode("MetaRig", name="test2")
t3 = utils.create_metaNode("MetaRig", name="test3")

t4 = utils.create_metaNode("MetaRig", name="test4", prefix='hello')
t5 = utils.create_metaNode("MetaRig", name="test5", prefix='bye')

t6 = utils.create_metaNode("FkChain_MetaRig", name="test6", numJoint=3)
t7 = utils.create_metaNode("FkChain_MetaRig", name="test7")

root.add_metaChild(t1)
t1.add_metaChild(t2)
t1.add_metaChild(t3)

t2.add_metaChild(t4)
t2.add_metaChild(t5)

t3.add_metaChild(t6)
t3.add_metaChild(t7)


for obj in [t3, t5, t7]:
    p1 = pm.group(empty=True, name='%s_p1' %obj.name())
Beispiel #3
0
 def add_metaInfo(self, name, attr, attrDict):
     metaInfo = utils.create_metaNode("MetaInfo", name=name, attrDict=attrDict)
     self.add_metaChild(metaInfo)
     pm.connectAttr("%s.message"%metaInfo.name(), "%s.%s"%(self.name(), attr), f=True)