From ac885ae4b448d8e30c0b75ce1af5d573e9976caf Mon Sep 17 00:00:00 2001 From: leixingyu Date: Fri, 13 May 2022 10:08:33 -0400 Subject: [PATCH] bug fix on python3 compatibility --- __init__.py | 2 +- chain/chainEP.py | 3 ++- shape.py | 6 +++--- util.py | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/__init__.py b/__init__.py index 45a6c94..0be55b6 100644 --- a/__init__.py +++ b/__init__.py @@ -1 +1 @@ -from utility import _vendor +from .utility import _vendor diff --git a/chain/chainEP.py b/chain/chainEP.py index 42e8498..01eafa3 100644 --- a/chain/chainEP.py +++ b/chain/chainEP.py @@ -28,7 +28,8 @@ def init_extra(self): self.extra_widget = QtWidgets.QWidget() _loadUi(os.path.join(UI_DIR, self.extra_ui), self.extra_widget) - self.extra_widget.ui_set_btn.clicked.connect(self.set_selection) + # PySide2 bug:https://stackoverflow.com/questions/68927598/ + self.extra_widget.ui_set_btn.clicked.connect(lambda: self.set_selection()) def parse_extra(self): """Override""" diff --git a/shape.py b/shape.py index b602da1..f2ba9ae 100644 --- a/shape.py +++ b/shape.py @@ -1,8 +1,8 @@ import maya.cmds as cmds -import util -from utility import nurbs -from utility.useful import strGenerator +from . import util +from .utility import nurbs +from .utility.useful import strGenerator NAMER = strGenerator.StrGenerator(prefix='tmp_') diff --git a/util.py b/util.py index 7517aeb..0a87f52 100644 --- a/util.py +++ b/util.py @@ -1,6 +1,6 @@ import maya.cmds as cmds -from utility.nurbs import util +from .utility.nurbs import util G_LOC_GRP = '_Locators'