Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- selected = cmds.ls(sl = True)
- ctrl = selected[0]
- loc_name = str(selected[0])+ "_loc" + str(int(cmds.currentTime (query=True)))
- locator = cmds.spaceLocator(n = loc_name)
- trans = cmds.xform(ctrl, q = True, t = True, ws = True)
- trans = (trans[0], trans[1], trans[2])
- rot = cmds.xform(ctrl, q = True, ro = True, ws = True)
- rot = (rot[0], rot[1], rot[2])
- cmds.xform(locator, ro = rot, t = trans, ws = True)
- cmds.select(ctrl)
Advertisement
Add Comment
Please, Sign In to add comment