Skip to content

Commit

Permalink
Shifter: AddJoint. Now neutral rotation on Joints is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcampos committed Jul 3, 2024
1 parent 43c4e63 commit 7ded634
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion release/scripts/mgear/shifter/component/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -357,6 +358,7 @@ def addJoint(
guide_relative=guide_relative,
data_contracts=data_contracts,
preBind_relative=preBind_relative,
neutral_rot=neutral_rot,
)

def _addJoint(
Expand All @@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 7ded634

Please sign in to comment.