Created
December 24, 2018 03:18
-
-
Save RedForty/095937cd43494fdc8a60e83bac59aff2 to your computer and use it in GitHub Desktop.
A better parent constraint that will put the attributes of the constraint on the parent
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
# A better parent constraint | |
sel = cmds.ls(sl=1) | |
source = sel[0] | |
target = sel[-1] | |
constraint = cmds.parentConstraint(source, target, maintainOffset=True)[0] | |
cmds.addAttr(source, longName='blendParent', attributeType='float3', hidden=0, keyable=1, proxy=target + '.blendParent1') | |
cmds.addAttr(source, longName='constraint', attributeType='float3', hidden=0, keyable=1, proxy=constraint + '.w0') | |
cmds.addAttr(target, longName='constraint', attributeType='float3', hidden=0, keyable=1, proxy=constraint + '.w0') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment