def __cleanUp(self): # metaUtils.addToMeta(self.meta,, objs) metaUtils.addToMeta(self.meta,'moduleGrp', [self.SKL,self.CC,self.IK,self.LOC,self.XTR,self.GUD,self.GEO,self.ALL,self.TRS,self.PP]) metaUtils.addToMeta(self.meta,'controls', [self.cogCtrl.control]) print '' print 'Info : ' + self.meta + ' has been integrate, ready for next module'
def buildConnections(self): #reveice info from incoming package if pm.objExists(self.metaMain) == 1: print '' print 'Package from (' + self.metaMain + ') has been received' pm.select(self.metaMain) headQuarter = pm.selected()[0] mainDestinations = [] moduleGrp = pm.connectionInfo(headQuarter.moduleGrp, destinationFromSource=True) for tempDestination in moduleGrp: destination = tempDestination.split('.') mainDestinations.append(destination[0]) #to the main hierachy for grp in mainDestinations: destnation = grp.split('_') if destnation[1] == 'CC': CC = grp elif destnation[1] == 'SKL': SKL = grp elif destnation[1] == 'IK': IK = grp elif destnation[1] == 'LOC': LOC = grp elif destnation[1] == 'XTR': XTR = grp elif destnation[1] == 'GUD': GUD = grp elif destnation[1] == 'GEO': GEO = grp elif destnation[1] == 'ALL': ALL = grp elif destnation[1] == 'XTR': XTR = grp elif destnation[1] == 'TRS': TRS = grp elif destnation[1] == 'PP': PP = grp self.bodyCtrl.controlGrp.setParent(CC) self.guideGrp.setParent(GUD) self.spineIkGrp.setParent(IK) self.spineIkGrp.inheritsTransform.set(0) print '' print 'Info from (' + self.meta + ') has been integrate, ready for next Module' print '' else: OpenMaya.MGlobal.displayError('Target :' + self.metaMain + ' is NOT exist') #create package send for next part #template: #metaUtils.addToMeta(self.meta,'attr', objs) metaUtils.addToMeta(self.meta,'controls',[self.bodyCtrl.control] + [spineCc for spineCc in self.spineCc]) metaUtils.addToMeta(self.meta,'transGrp',[self.chestGrp]) metaUtils.addToMeta(self.meta,'skinJoints',[joint for joint in self.ikJj])