I’m following along part of a tutorial, almost complete, however I’m having an odd issue. Maya is informing me that “More than one object matches name: grp_R_toe”
Here is area of code that’s giving me the grief, it seems to be having trouble with the loop:
#Create the Solvers
cmds.ikSolver( st='ikRPsolver', n='RHip_ikRPsolver')
cmds.ikSolver( st='ikSCsolver', n='RBall_ikSCsolver')
cmds.ikSolver( st='ikSCsolver', n='RToe_ikSCsolver')
#Set the IK Handles
cmds.ikHandle(n="hipH_R", sj="hip_R", ee="ankle_R", sol ="RHip_ikRPsolver")
cmds.ikHandle(n="ballH_R", sj="ankle_R", ee="ball_R", sol ="RBall_ikSCsolver")
cmds.ikHandle(n="toeH_R", sj="ball_R", ee="toe_R", sol ="RToe_ikSCsolver")
footGroups = ("grp_R_footPivot","grp_R_heel","grp_R_toe","grp_R_ball","grp_R_flap")
for item in footGroups:
cmds.group(n=item,empty=True,world=True)
print item
#print footGroups
#Get positions
hipPos = cmds.xform("hip_R", q=True, ws=True, t=True)
anklePos = cmds.xform("ankle_R", q=True, ws=True, t=True)
ballPos = cmds.xform("ball_R", q=True, ws=True, t=True)
toePos = cmds.xform("toe_R", q=True, ws=True, t=True)
cmds.xform("grp_R_toe", ws=True, t=toePos)
cmds.xform("grp_R_ball", ws=True, t=ballPos)
cmds.xform("grp_R_flap", ws=True, t=ballPos)
#IK handle and group hierarchy positioning
cmds.parent('grp_R_heel','grp_R_footPivot')
cmds.parent('grp_R_toe','grp_R_heel')
cmds.parent('grp_R_ball','grp_R_toe')
cmds.parent('grp_R_flap','grp_R_toe')
cmds.parent('hipH_R','grp_R_ball')
cmds.parent('ballH_R','grp_R_ball')
cmds.parent('toeH_R','grp_R_flap')
cmds.parent('grp_R_footPivot', 'ctrl_R_leg')
The section:
footGroups = ("grp_R_footPivot","grp_R_heel","grp_R_toe","grp_R_ball","grp_R_flap")
for item in footGroups:
cmds.group(n=item,empty=True,world=True)
I think is the area giving me grief. Any idea what may be going on? Why two “grp_R_toe” objects seem to be created, although in the outliner, it isn’t indicated that way? Or have I just been staring at this too long and I’m overlooking an obvious typo lol. Thanks in advance