from maya import cmds
# point snap
source, dist = cmds.ls(selection=True)
constraint_node = cmds.pointConstraint(source, dist)
cmds.delete(constraint_node)
# orient snap
source, dist = cmds.ls(selection=True)
constraint_node = cmds.orientConstraint(source, dist)
cmds.delete(constraint_node)
# parent snap
source, dist = cmds.ls(selection=True)
constraint_node = cmds.parentConstraint(source, dist)
cmds.delete(constraint_node)
コメント