Skip to content

Instantly share code, notes, and snippets.

@nobolu-ootsuka-unrealengine
Last active September 15, 2019 02:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nobolu-ootsuka-unrealengine/9f310f61606a721873dce00bae149855 to your computer and use it in GitHub Desktop.
Save nobolu-ootsuka-unrealengine/9f310f61606a721873dce00bae149855 to your computer and use it in GitHub Desktop.
matchRotationJointAndRig.py
import maya.cmds as cmds
# ジョイントに回転をマッチさせたいから ジョイントにカーブを拘束と書く
node=cmds.orientConstraint( 'joint1', 'Cube' ,maintainOffset=False)
# ジョイントに回転をマッチさせたら消す。
cmds.delete(node)
# リグとしてはカーブで動かしたいから カーブにジョイントを拘束と書く
cmds.orientConstraint( 'Cube', 'joint1' ,maintainOffset=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment