from maya import cmds
piv = cmds.xform ('pCube2', piv=True, q=True, ws=True)
cmds.xform( 'pCube1', ws=True, piv=(piv[0], piv[1], piv[2]) )2010/5/23 Vitor Lôbo Ramos <[email protected]>: > Yes! > Align pivot pCube1 in pCube2. > > But, follow your code, gave the following error: > > # Error: Invalid arguments for flag 'piv'. Expected ( distance, > distance, distance ), got [ float, float, float, float, float, float ] > # Traceback (most recent call last): > # File "<maya console>", line 2, in <module> > # TypeError: Invalid arguments for flag 'piv'. Expected ( distance, > distance, distance ), got [ float, float, float, float, float, float ] > # > > > On 23 maio, 16:43, Ling <[email protected]> wrote: >> cmds.xform ('pCube1',piv=cmds.xform("pCube2", q=1, piv=1, ws =True), >> ws=True) >> >> is this what you want? >> >> On May 23, 2:47 pm, Vitor Lôbo Ramos <[email protected]> >> wrote: >> >> > To align a pivot of an object on another, uses cmds.xform ('pCube1', >> > piv=( #the value X,Y,Z,of the pCube2 ) ws=True or os = True ) >> >> > What is the correct way to align the pivot pCube1 in pCube2 without >> > using the axes x, y, z? >> >> > Thanks to whoever can help me. >> >> > --http://groups.google.com/group/python_inside_maya >> >> --http://groups.google.com/group/python_inside_maya > > -- > http://groups.google.com/group/python_inside_maya -- -- Michiel -- http://groups.google.com/group/python_inside_maya
