Created
February 1, 2016 14:11
-
-
Save tokejepsen/bd036f68445751ac0c23 to your computer and use it in GitHub Desktop.
Maya: Unfreeze Transform
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core | |
for node in pymel.core.ls(selection=True): | |
grp1 = pymel.core.group(empty=True) | |
grp2 = pymel.core.group(empty=True) | |
pymel.core.delete(pymel.core.parentConstraint(node, grp1)) | |
pymel.core.delete(pymel.core.parentConstraint(node, grp2)) | |
pymel.core.parent(node, grp1) | |
grp1.tx.set(0) | |
grp1.ty.set(0) | |
grp1.tz.set(0) | |
grp1.rx.set(0) | |
grp1.ry.set(0) | |
grp1.rz.set(0) | |
pymel.core.parent(node, w=True) | |
pymel.core.makeIdentity(node, apply=True, t=1, r=1, s=1, n=0) | |
pymel.core.delete(pymel.core.parentConstraint(grp2, node)) | |
pymel.core.delete([grp1, grp2]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment