Skip to content

Instantly share code, notes, and snippets.

@tomihanayu
Created July 14, 2017 04:04
Show Gist options
  • Save tomihanayu/5d7e59ad4da86df9e1d6a1f145cfa9cd to your computer and use it in GitHub Desktop.
Save tomihanayu/5d7e59ad4da86df9e1d6a1f145cfa9cd to your computer and use it in GitHub Desktop.
子階層に移動などをつたえるか切り替え
def togglePreserveChildPosition():
if cmds.manipMoveContext("Move",q=True,preserveChildPosition=True):
cmds.manipMoveContext("Move",e=True,preserveChildPosition=False)
cmds.manipRotateContext("Rotate",e=True,preserveChildPosition=False)
cmds.manipScaleContext("Scale",e=True,preserveChildPosition=False)
else:
cmds.manipMoveContext("Move",e=True,preserveChildPosition=True)
cmds.manipRotateContext("Rotate",e=True,preserveChildPosition=True)
cmds.manipScaleContext("Scale",e=True,preserveChildPosition=True)
togglePreserveChildPosition()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment