def move_pivot(end, *args):
"""
Args:
end (int): parameter value (0 or 1 from buttons) the point on curve will return, start or end
*args:
"""
check = False
sel = cmds.ls(sl=True, exactType = "transform")
if sel:
for x in sel:
check = rig.isType(x, "nurbsCurve")
if check:
# get curve info
pos = cmds.pointOnCurve(x, parameter = end, position = True)
cmds.xform(x, ws=True, piv=pos)
else:
cmds.warning("{0} is not a nurbsCurve object. Skipping!".format(x))
评论列表
文章目录