Exemplo n.º 1
0
    def buildGuides(self):
        """
        This function setups our guide system
        
        WILL PROBABLY BE ANOTHER CLASS WHEN WE EXPAND AS IT'S GOING TO BE COMPLEX
        """
        
        self.guides = []
        
        for i,p in enumerate(self.posArray):
            
            name = nameUtils.getUniqueName(self.baseNames[i],self.side,"GUIDE")
            loc = pm.spaceLocator(n=name)
            loc.t.set(p)
            loc.r.set(self.rotArray[i])
            self.guides.append(loc)
            
        tempGuides = list(self.guides)
        tempGuides.reverse()

        for i in range(len(tempGuides)):
            if i != (len(tempGuides)-1):
                pm.parent(tempGuides[i],tempGuides[i+1])
        
        name = nameUtils.getUniqueName(self.baseName+"_guides",self.side,"grp")
        self.guidesGrp = pm.createNode("transform",n=name)
        
        self.guides[0].setParent(self.guidesGrp)
Exemplo n.º 2
0
    def __init__(self,baseName="limb" ,side="L" ,ctrlColor=6 ,ctrlSize=1,solver = "ikRPsolver",
                 controlOrient = [0,0,0]):
        """
        @param baseName : string, This is the name to be used as a base for all the names
        @param side : string, This is the side that will be used for our controls
        @param ctrlSize : string,the control size
        @param ctrlColor :string , color to apply to the controls
        @param solver: string , the solver to be used,current support:
                             - ikSCsolver : simple chain
                             - ikRPsolver : rotation plane
        
        @param controlOrient : float[3] , what orient to apply to control
        """
        
        self.baseName = baseName
        self.side = side 
        #the size of the handGuides
        self.ctrlSize = ctrlSize
        #the objColor of the handGuides
        self.ctrlColor = ctrlColor
        self.solver = solver
        self.controlOrient = controlOrient
        
        
        self.fkChain = None
        self.ikChain = None
        self.blendChain = None

        self.blendData = None
        
        #grps for parenting
        self.ctrlsParGrp = None
        self.bonesGrp = None
        self.mainGrp = None
        
        #our node for ikfk settings(temp)
        self.configName = nameUtils.getUniqueName(self.baseName, self.side, "CONFIG")
        self.configNode = pm.spaceLocator(n=self.configName)
        
        self.guides = None
        self.guidesGrp = None
        
        #attachments hooks
        self.inHooks = []
        self.outHooks = []
        
        self.__tempSpaceSwitch = None
        self.switchGrp = None