Skip to content

Instantly share code, notes, and snippets.

@MadsJakobsen
Last active February 9, 2021 18:56
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MadsJakobsen/71f6001292e017c12a5452683c4a20f5 to your computer and use it in GitHub Desktop.
Save MadsJakobsen/71f6001292e017c12a5452683c4a20f5 to your computer and use it in GitHub Desktop.
Maya proxy attribute
import pymel.core as pymel
transform1 = pymel.createNode('transform', name='fk_control')
transform2 = pymel.createNode('transform', name='ik_control')
transform3 = pymel.createNode('transform', name='blender')
transform3.addAttr('ikFkSwitch', keyable=True, min=0, max=1)
for node in transform1, transform2:
node.addAttr('ikFkSwitch', usedAsProxy=True, keyable=True, min=0, max=1)
transform3.ikFkSwitch.connect(node.ikFkSwitch)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment