Would be something like that?

def matchObjects():
    selection = []
    selection = mc.ls(sl=True)
    a = ['x','y','z']
    count = 0

    locator1 = str(selection[0])
    joint1 = str(selection[1])
    print "[1],[2], :\n %s , %s" %
(locator1,joint1)
    joint1XYZ = list(mc.xform(joint1, query=True, a=True, t=True ))
    for v in joint1XYZ:
        print a[count] ,":", round(v, 3)
        count += 1


    mc.setAttr(locator1 + '.t' , ljoint1XYZ[0] , ljoint1XYZ[1] ,
ljoint1XYZ[2])


  matchObjects()

------------------------------------------------------------------
# Error: ('invalid syntax', ('<maya console>', 10, 35, '    print "[1],
[2], :\\n %s , %s" %\n'))
#   File "<maya console>", line 9
#      print "[1],[2], :\n %s , %s" %
#
# ^
#  SyntaxError: invalid syntax #


-- 
http://groups.google.com/group/python_inside_maya

Reply via email to