From 7ded6342a463a67aaf41c016861f438c92282612 Mon Sep 17 00:00:00 2001 From: miquelcampos Date: Wed, 3 Jul 2024 13:09:26 +0900 Subject: [PATCH] Shifter: AddJoint. Now neutral rotation on Joints is optional --- release/scripts/mgear/shifter/component/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/release/scripts/mgear/shifter/component/__init__.py b/release/scripts/mgear/shifter/component/__init__.py index 28c79b1a..2181bea8 100644 --- a/release/scripts/mgear/shifter/component/__init__.py +++ b/release/scripts/mgear/shifter/component/__init__.py @@ -305,6 +305,7 @@ def addJoint( guide_relative=None, data_contracts=None, preBind_relative=None, + neutral_rot=True, ): """Add joint as child of the active joint or under driver object. @@ -357,6 +358,7 @@ def addJoint( guide_relative=guide_relative, data_contracts=data_contracts, preBind_relative=preBind_relative, + neutral_rot=neutral_rot, ) def _addJoint( @@ -371,6 +373,7 @@ def _addJoint( guide_relative=None, data_contracts=None, preBind_relative=None, + neutral_rot=True, ): """Add joint as child of the active joint or under driver object. @@ -608,7 +611,7 @@ def _addJoint( # global scale. Confirm there is no conflicts jnt.setAttr("segmentScaleCompensate", segComp) - if not keep_off: + if not keep_off and neutral_rot: # setting the joint orient compensation in order to # have clean rotation channels jnt.setAttr("jointOrient", 0, 0, 0)