예제 #1
0
def LocatorsChickenHead (*args):
    
    if cmds.objExists ('Spine_ConnectToArms'):
        for X in range (0, 3):                
            cmds.select (clear = True)            
            cmds.CreateLocator ()
            cmds.move (0,2.5*X, 0)
            cmds.select (clear = True)
        
        cmds.rename('locator1','Neck_Start_LOC')
        cmds.rename('locator2','Head_Start_LOC')
        cmds.rename('locator3','Head_End_LOC')
    
        #If the RdMAutoSpine exists
    
        if cmds.objExists ('SpineEnd_JC'):
            
            cmds.parent ('Head_End_LOC','Head_Start_LOC')
            cmds.parent ('Head_Start_LOC','Neck_Start_LOC')
            cmds.pointConstraint ('SpineEnd_JC', 'Neck_Start_LOC', mo = False)
            cmds.delete ('Neck_Start_LOC'+'_pointConstraint1')
            cmds.parent ('Head_End_LOC', w = True)
            cmds.parent ('Head_Start_LOC', w = True)
        
            cmds.select (cl = True)
    
    else:
        cmds.warning ('please create RdMAutoSpine first :D')    
예제 #2
0
def LocatorsBtn(*args):
    
    for X in range (jointsNum):
    
        cmds.select (clear = True)
        
        cmds.CreateLocator ()
        cmds.move (2.5*X+1, 0, 0)
        cmds.select (clear = True)

    cmds.rename ("locator1","L_Clavicule_LOC")
    cmds.rename ("locator2","L_Shoulder_LOC")
    cmds.rename ("locator3","L_Elbow_LOC")
    cmds.rename ("locator4","L_Wrist_LOC")

    if cmds.objExists ('SpineEnd_JC'):
        
         cmds.parent ('L_Wrist_LOC','L_Elbow_LOC')
         cmds.parent ('L_Elbow_LOC','L_Shoulder_LOC')
         cmds.parent ('L_Shoulder_LOC','L_Clavicule_LOC')
         cmds.pointConstraint ('SpineEnd_JC','L_Clavicule_LOC')
         cmds.delete ('L_Clavicule_LOC_pointConstraint1')
         cmds.parent ('L_Shoulder_LOC', 'L_Elbow_LOC ','L_Wrist_LOC', w = True)
         
    cmds.select('L_Elbow_LOC')
    cmds.move(0,0,-0.4, r = True)     
    cmds.select (clear = True)
예제 #3
0
def defControl():
    grp = cmds.group(em=True, name="_ctrl_grp")
    ctrl = cmds.circle(name="_ctrl")
    loc_name = "_CTRL_LOC"
    loc = cmds.CreateLocator()
    cmds.rename(loc, loc_name)
    cmds.parent(ctrl, loc_name)
    cmds.parent(loc_name, grp)
    cmds.DeleteHistory(ctrl)
예제 #4
0
def LocatorsBtn(*args):

    jointsNum = cmds.intSliderGrp(locatorNum, q=True, value=5)

    for X in range(jointsNum):

        cmds.select(clear=True)
        cmds.CreateLocator()
        cmds.move(0, 2.5 * X, 0)
        cmds.select(clear=True)
        cmds.rename("locator1", "Spine_0" + str(X + 1) + "_LOC")

    cmds.select(clear=True)
def createAimConstraint(elbowJnt, wristJnt, drivers):

    # Create locator for our aim constraint's up vector
    cmds.select(cl=1)
    upVec = cmds.CreateLocator()
    upVec = cmds.rename(upVec, "rt_arm1TwistUpVec_loc")
    cmds.delete(cmds.parentConstraint(wristJnt, upVec, mo=0))
    cmds.setAttr(upVec + ".tz", cmds.getAttr(upVec + ".tz") - 0.25)
    cmds.select(upVec)
    cmds.scale(.2, .2, .2)
    cmds.parentConstraint(wristJnt, upVec, mo=1)

    # Create the aim constraint
    cmds.aimConstraint(
        elbowJnt, drivers[-1], \
        u = (0, 1, 0), wut = "object", wuo = upVec, mo=0)
예제 #6
0
def LocatorsBtn(*args):
    for X in range (jointsNum):
    
        cmds.select (clear = True)        
        cmds.CreateLocator ()
        cmds.move (0,2.5*X, 0)
        cmds.select (clear = True)
           
    cmds.rename ("locator4","L_Leg_LOC")
    cmds.rename ("locator3","L_Knee_LOC")
    cmds.rename ("locator2","L_Ankle_LOC")
    cmds.rename ("locator1","L_Heel_LOC")
    
    cmds.duplicate ('L_Heel_LOC', n= 'L_EndFoot_LOC')
    cmds.duplicate ('L_Heel_LOC', n= 'L_Ball_Loc')
    cmds.move (0,0,3, 'L_Ball_Loc' )
    cmds.move (0,0,5, 'L_EndFoot_LOC' )
    cmds.move (0,5,0.3, 'L_Knee_LOC')

         
    cmds.select (clear = True)