Exemple #1
0
def setInName(selection):
    NameConv = nameConvention.NameConvention()
    for eachObject in selection:
        childJoints = RMRigTools.RMCustomPickWalk(eachObject, "joint", -1)
        for eachJoint in childJoints:
            Name = eachJoint.split("_")
            Value = re.split(r"([0-9]+$)", Name[len(Name) - 1])
            NewName = Value[0]
            cmds.rename(
                eachJoint,
                NameConv.set_name_in_format(
                    Name=NewName,
                    side="R",
                    Type=NameConv.guess_object_type(eachJoint)))
Exemple #2
0
    def CreateHandJointStructure(self, Palm):
        referenceRoots = pm.listRelatives(Palm, children=True, type="transform")
        palmJoint = pm.joint(name=self.NameConv.get_from_name(Palm, "name"))

        RMRigTools.RMAlign(Palm, palmJoint, 3)
        self.NameConv.rename_based_on_base_name(Palm, palmJoint, system="rig")
        self.fingers = []

        for eachPoint in referenceRoots:
            fingerPoints = RMRigTools.RMCustomPickWalk(eachPoint, "transform", -1)
            FingerRoot, fingerJoints = self.rig_tools.RMCreateBonesAtPoints(fingerPoints)
            pm.parent(FingerRoot, palmJoint)
            self.fingerRoots.append(FingerRoot)
            self.fingers.append(fingerJoints)
        self.palmJoint = palmJoint
        if pm.listRelatives(self.palmJoint, parent=True):
            pm.parent(self.palmJoint, world=True)
        return palmJoint
Exemple #3
0
 def CreateJointChainRig(self, node, UDaxis="Y"):
     jointChain = RMRigTools.RMCustomPickWalk(node, "joint", -1)
     print jointChain
     self.CreateJointChainSquareRig(jointChain, UDaxis=UDaxis)
Exemple #4
0
def lastTwoJointsInChain(selection):
    for eachObject in selection:
        childJoints = RMRigTools.RMCustomPickWalk(eachObject, "joint", -1)
        RMRigTools.RMAlign(childJoints[len(childJoints) - 2],
                           childJoints[len(childJoints) - 1], 2)