From e95557873b3960ab20edd2698ab805ae432590fa Mon Sep 17 00:00:00 2001 From: miquelcampos Date: Fri, 29 Nov 2024 16:02:50 +0900 Subject: [PATCH] Shifter foot: Toes do not scale together with the fk foot fixes #320 --- .../foot_bk_01/__init__.py | 4 +- .../EPIC_arm_02/settingsUI.py | 79 ++++++++----------- .../EPIC_foot_01/__init__.py | 4 +- 3 files changed, 37 insertions(+), 50 deletions(-) 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 1202ccc3..2fed6bf4 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 @@ -443,9 +443,7 @@ def connect_leg_2jnt_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.match_fk2, self.bk_ctl[-1]) - pm.parentConstraint( - self.parent_comp.tws2_rot, self.fk_ref, maintainOffset=True - ) + pm.parent(self.fk_ref, self.parent_comp.tws2_rot) # add message connections to parent component. # this connection will be used to track the ctl relation when IK/FK diff --git a/release/scripts/mgear/shifter_epic_components/EPIC_arm_02/settingsUI.py b/release/scripts/mgear/shifter_epic_components/EPIC_arm_02/settingsUI.py index af2f9bcf..f090fca4 100644 --- a/release/scripts/mgear/shifter_epic_components/EPIC_arm_02/settingsUI.py +++ b/release/scripts/mgear/shifter_epic_components/EPIC_arm_02/settingsUI.py @@ -1,14 +1,5 @@ -# -*- coding: utf-8 -*- - -# Form implementation generated from reading ui file 'C:/datawork/repo/mgear4/release/scripts/mgear/shifter_epic_components/EPIC_arm_02/settingsUI.ui', -# licensing of 'C:/datawork/repo/mgear4/release/scripts/mgear/shifter_epic_components/EPIC_arm_02/settingsUI.ui' applies. -# -# Created: Fri Nov 29 10:25:46 2024 -# by: pyside2-uic running on PySide2 5.12.5 -# -# WARNING! All changes made in this file will be lost! - -from PySide2 import QtCore, QtGui, QtWidgets +from mgear.core import pyqt +QtGui, QtCore, QtWidgets, wrapInstance = pyqt.qt_import() class Ui_Form(object): def setupUi(self, Form): @@ -215,37 +206,37 @@ def setupUi(self, Form): QtCore.QMetaObject.connectSlotsByName(Form) def retranslateUi(self, Form): - Form.setWindowTitle(QtWidgets.QApplication.translate("Form", "Form", None, -1)) - self.ikfk_label.setText(QtWidgets.QApplication.translate("Form", "FK/IK Blend", None, -1)) - self.maxStretch_label.setText(QtWidgets.QApplication.translate("Form", "Max Stretch", None, -1)) - self.divisions_label.setText(QtWidgets.QApplication.translate("Form", "Divisions", None, -1)) - self.leafJoints_checkBox.setText(QtWidgets.QApplication.translate("Form", "Leaf Joints", None, -1)) - self.ikTR_checkBox.setText(QtWidgets.QApplication.translate("Form", "IK separated Trans and Rot ctl", None, -1)) - self.mirrorIK_checkBox.setToolTip(QtWidgets.QApplication.translate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) - self.mirrorIK_checkBox.setStatusTip(QtWidgets.QApplication.translate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) - self.mirrorIK_checkBox.setWhatsThis(QtWidgets.QApplication.translate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) - self.mirrorIK_checkBox.setText(QtWidgets.QApplication.translate("Form", "Mirror IK Ctl axis behaviour", None, -1)) - self.mirrorMid_checkBox.setToolTip(QtWidgets.QApplication.translate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) - self.mirrorMid_checkBox.setStatusTip(QtWidgets.QApplication.translate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) - self.mirrorMid_checkBox.setWhatsThis(QtWidgets.QApplication.translate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) - self.mirrorMid_checkBox.setText(QtWidgets.QApplication.translate("Form", "Mirror Mid Ctl and UPV axis behaviour", None, -1)) - self.useBlade_checkBox.setToolTip(QtWidgets.QApplication.translate("Form", "

If checked, will use a blade to control the wrist joint orientation. This doesn\'t affect the controls that are align with the arm plane.

", None, -1)) - self.useBlade_checkBox.setText(QtWidgets.QApplication.translate("Form", "Use Wrist Blade to orient wrist joint", None, -1)) - self.TPoseRest_checkBox.setToolTip(QtWidgets.QApplication.translate("Form", "

If checked, the Rest pose for controls will be in T Pose

", None, -1)) - self.TPoseRest_checkBox.setStatusTip(QtWidgets.QApplication.translate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) - self.TPoseRest_checkBox.setWhatsThis(QtWidgets.QApplication.translate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) - self.TPoseRest_checkBox.setText(QtWidgets.QApplication.translate("Form", "Rest T Pose", None, -1)) - self.squashStretchProfile_pushButton.setText(QtWidgets.QApplication.translate("Form", "Squash and Stretch Profile", None, -1)) - self.ikRefArray_groupBox.setTitle(QtWidgets.QApplication.translate("Form", "IK Reference Array", None, -1)) - self.ikRefArray_copyRef_pushButton.setText(QtWidgets.QApplication.translate("Form", "Copy from UpV Ref", None, -1)) - self.ikRefArrayAdd_pushButton.setText(QtWidgets.QApplication.translate("Form", "<<", None, -1)) - self.ikRefArrayRemove_pushButton.setText(QtWidgets.QApplication.translate("Form", ">>", None, -1)) - self.upvRefArray_groupBox.setTitle(QtWidgets.QApplication.translate("Form", "UpV Reference Array", None, -1)) - self.upvRefArray_copyRef_pushButton.setText(QtWidgets.QApplication.translate("Form", "Copy from IK Ref", None, -1)) - self.upvRefArrayAdd_pushButton.setText(QtWidgets.QApplication.translate("Form", "<<", None, -1)) - self.upvRefArrayRemove_pushButton.setText(QtWidgets.QApplication.translate("Form", ">>", None, -1)) - self.pinRefArray_groupBox.setTitle(QtWidgets.QApplication.translate("Form", "Pin Elbow Reference Array", None, -1)) - self.pinRefArray_copyRef_pushButton.setText(QtWidgets.QApplication.translate("Form", "Copy from IK Ref", None, -1)) - self.pinRefArrayAdd_pushButton.setText(QtWidgets.QApplication.translate("Form", "<<", None, -1)) - self.pinRefArrayRemove_pushButton.setText(QtWidgets.QApplication.translate("Form", ">>", None, -1)) + Form.setWindowTitle(pyqt.fakeTranslate("Form", "Form", None, -1)) + self.ikfk_label.setText(pyqt.fakeTranslate("Form", "FK/IK Blend", None, -1)) + self.maxStretch_label.setText(pyqt.fakeTranslate("Form", "Max Stretch", None, -1)) + self.divisions_label.setText(pyqt.fakeTranslate("Form", "Divisions", None, -1)) + self.leafJoints_checkBox.setText(pyqt.fakeTranslate("Form", "Leaf Joints", None, -1)) + self.ikTR_checkBox.setText(pyqt.fakeTranslate("Form", "IK separated Trans and Rot ctl", None, -1)) + self.mirrorIK_checkBox.setToolTip(pyqt.fakeTranslate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) + self.mirrorIK_checkBox.setStatusTip(pyqt.fakeTranslate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) + self.mirrorIK_checkBox.setWhatsThis(pyqt.fakeTranslate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) + self.mirrorIK_checkBox.setText(pyqt.fakeTranslate("Form", "Mirror IK Ctl axis behaviour", None, -1)) + self.mirrorMid_checkBox.setToolTip(pyqt.fakeTranslate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) + self.mirrorMid_checkBox.setStatusTip(pyqt.fakeTranslate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) + self.mirrorMid_checkBox.setWhatsThis(pyqt.fakeTranslate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) + self.mirrorMid_checkBox.setText(pyqt.fakeTranslate("Form", "Mirror Mid Ctl and UPV axis behaviour", None, -1)) + self.useBlade_checkBox.setToolTip(pyqt.fakeTranslate("Form", "

If checked, will use a blade to control the wrist joint orientation. This doesn\'t affect the controls that are align with the arm plane.

", None, -1)) + self.useBlade_checkBox.setText(pyqt.fakeTranslate("Form", "Use Wrist Blade to orient wrist joint", None, -1)) + self.TPoseRest_checkBox.setToolTip(pyqt.fakeTranslate("Form", "

If checked, the Rest pose for controls will be in T Pose

", None, -1)) + self.TPoseRest_checkBox.setStatusTip(pyqt.fakeTranslate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) + self.TPoseRest_checkBox.setWhatsThis(pyqt.fakeTranslate("Form", "This option set the axis of the mid CTL (elbow) and the up vector control to move in a mirror behaviour ", None, -1)) + self.TPoseRest_checkBox.setText(pyqt.fakeTranslate("Form", "Rest T Pose", None, -1)) + self.squashStretchProfile_pushButton.setText(pyqt.fakeTranslate("Form", "Squash and Stretch Profile", None, -1)) + self.ikRefArray_groupBox.setTitle(pyqt.fakeTranslate("Form", "IK Reference Array", None, -1)) + self.ikRefArray_copyRef_pushButton.setText(pyqt.fakeTranslate("Form", "Copy from UpV Ref", None, -1)) + self.ikRefArrayAdd_pushButton.setText(pyqt.fakeTranslate("Form", "<<", None, -1)) + self.ikRefArrayRemove_pushButton.setText(pyqt.fakeTranslate("Form", ">>", None, -1)) + self.upvRefArray_groupBox.setTitle(pyqt.fakeTranslate("Form", "UpV Reference Array", None, -1)) + self.upvRefArray_copyRef_pushButton.setText(pyqt.fakeTranslate("Form", "Copy from IK Ref", None, -1)) + self.upvRefArrayAdd_pushButton.setText(pyqt.fakeTranslate("Form", "<<", None, -1)) + self.upvRefArrayRemove_pushButton.setText(pyqt.fakeTranslate("Form", ">>", None, -1)) + self.pinRefArray_groupBox.setTitle(pyqt.fakeTranslate("Form", "Pin Elbow Reference Array", None, -1)) + self.pinRefArray_copyRef_pushButton.setText(pyqt.fakeTranslate("Form", "Copy from IK Ref", None, -1)) + self.pinRefArrayAdd_pushButton.setText(pyqt.fakeTranslate("Form", "<<", None, -1)) + self.pinRefArrayRemove_pushButton.setText(pyqt.fakeTranslate("Form", ">>", None, -1)) 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 11790831..bf134f7e 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 @@ -467,9 +467,7 @@ def connect_leg_2jnt_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.match_fk2, self.bk_ctl[-1]) - pm.parentConstraint( - self.parent_comp.tws2_rot, self.fk_ref, maintainOffset=True - ) + pm.parent(self.fk_ref, self.parent_comp.tws2_rot) # add message connections to parent component. # this connection will be used to track the ctl relation when IK/FK