Last active
March 23, 2017 15:48
-
-
Save rondreas/eac011648ad8299b9be011c7d0dbf2f9 to your computer and use it in GitHub Desktop.
constrain all _fk joints to respective _bn assuming root_bn exists.
This file contains 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 maya.cmds as cmds | |
# select all joints _bn | |
cmds.select('root_bn', hierarchy=True) | |
# For each _fk constrain to _bn | |
for bn in cmds.ls(selection=True): | |
try: | |
cmds.orientConstraint( bn.replace('_bn', '_fk'), bn ) | |
cmds.pointConstraint( bn.replace('_bn', '_fk'), bn ) | |
except Exception as e: | |
print e.args |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment