From 3975feb03fac043ced171df55a8cc188c5e0360a Mon Sep 17 00:00:00 2001 From: miquelcampos Date: Thu, 28 Nov 2024 11:12:56 +0900 Subject: [PATCH] Epic_foot_01 and foot_bk_01 Connector missing footCnx definition fixes #405 --- .../foot_bk_01/__init__.py | 13 +++++++++++++ .../EPIC_foot_01/__init__.py | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/release/scripts/mgear/shifter_classic_components/foot_bk_01/__init__.py b/release/scripts/mgear/shifter_classic_components/foot_bk_01/__init__.py index 65516e79..1202ccc3 100644 --- a/release/scripts/mgear/shifter_classic_components/foot_bk_01/__init__.py +++ b/release/scripts/mgear/shifter_classic_components/foot_bk_01/__init__.py @@ -483,6 +483,12 @@ def connect_leg_ms_2jnt_01(self): ) pm.connectAttr(self.parent_comp.blend_att, bc_node + ".blender") + # add message connections to parent component. + # this connection will be used to track the ctl relation when IK/FK + # match is performed + self.parent_comp.root.addAttr("footCnx", at="message", m=False) + self.root.message >> self.parent_comp.root.footCnx + return def connect_leg_3jnt_01(self): @@ -496,8 +502,15 @@ def connect_leg_3jnt_01(self): pm.parent(self.root, self.parent_comp.ik_ctl) pm.parent(self.parent_comp.ik_ref, self.bk_ctl[-1]) pm.parent(self.parent_comp.ik2b_ikCtl_ref, self.bk_ctl[-1]) + pm.parent(self.parent_comp.match_fk3, self.bk_ctl[-1]) pm.parentConstraint( self.parent_comp.tws3_rot, self.fk_ref, maintainOffset=True ) + # add message connections to parent component. + # this connection will be used to track the ctl relation when IK/FK + # match is performed + self.parent_comp.root.addAttr("footCnx", at="message", m=False) + self.root.message >> self.parent_comp.root.footCnx + return diff --git a/release/scripts/mgear/shifter_epic_components/EPIC_foot_01/__init__.py b/release/scripts/mgear/shifter_epic_components/EPIC_foot_01/__init__.py index 97b8c38a..11790831 100644 --- a/release/scripts/mgear/shifter_epic_components/EPIC_foot_01/__init__.py +++ b/release/scripts/mgear/shifter_epic_components/EPIC_foot_01/__init__.py @@ -507,6 +507,12 @@ def connect_leg_ms_2jnt_01(self): ) pm.connectAttr(self.parent_comp.blend_att, bc_node.blender) + # add message connections to parent component. + # this connection will be used to track the ctl relation when IK/FK + # match is performed + self.parent_comp.root.addAttr("footCnx", at="message", m=False) + self.root.message >> self.parent_comp.root.footCnx + return def connect_leg_3jnt_01(self): @@ -520,8 +526,15 @@ def connect_leg_3jnt_01(self): pm.parent(self.root, self.parent_comp.ik_ctl) pm.parent(self.parent_comp.ik_ref, self.bk_ctl[-1]) pm.parent(self.parent_comp.ik2b_ikCtl_ref, self.bk_ctl[-1]) + pm.parent(self.parent_comp.match_fk3, self.bk_ctl[-1]) pm.parentConstraint( self.parent_comp.tws3_rot, self.fk_ref, maintainOffset=True ) + # add message connections to parent component. + # this connection will be used to track the ctl relation when IK/FK + # match is performed + self.parent_comp.root.addAttr("footCnx", at="message", m=False) + self.root.message >> self.parent_comp.root.footCnx + return