Input a joints position in joint creation from different function Maya Python

25 Views Asked by At

I want to input joint position (from different function) in joint creation, so I can assign it to another function

def joint_pos():
    cogPos = base.xform("jnt_cog", q=True, t=True, ws=True)
    L_armPos = base.xform("jnt_l_upperarm", q=True, t=True, ws=True)
    R_armPos = base.xform("jnt_r_upperarm", q=True, t=True, ws=True)
    L_thighPos = base.xform("jnt_l_thigh", q=True, t=True, ws=True)
    R_thighPos = base.xform("jnt_r_thigh", q=True, t=True, ws=True)
   return cogPos, L_armPos, R_armPos, L_thighPos, R_thighPos

def create_joint(name, position, side, suffix):
    joint_name = "{}_{}_{}_{}".format(name, position, side, suffix)
    joint = base.joint(radius=1, p=position, name=joint_name)
    return joint

i got an error invalid argument p=position. Any help or advice would be awesome, thanks!

0

There are 0 best solutions below