Update
This commit is contained in:
@@ -1,24 +1,29 @@
|
||||
##GLOBAL VARIABLEs
|
||||
from PySide2 import QtWidgets, QtCore, QtGui
|
||||
from maya import cmds as mc
|
||||
import maya.mel as mel
|
||||
import json
|
||||
from .Qt import QtWidgets, QtCore, QtCompat
|
||||
import os
|
||||
import maya.cmds as cmds
|
||||
from maya import OpenMayaUI as omui
|
||||
|
||||
# Special cases for different Maya versions
|
||||
try:
|
||||
from shiboken2 import wrapInstance
|
||||
except ImportError:
|
||||
from shiboken import wrapInstance
|
||||
# Import Qt from project's unified Qt.py module
|
||||
import sys
|
||||
import os as _os
|
||||
|
||||
try:
|
||||
from PySide2.QtGui import QIcon
|
||||
from PySide2.QtWidgets import QWidget
|
||||
except ImportError:
|
||||
from PySide.QtGui import QIcon, QWidget
|
||||
# Add parent scripts directory to sys.path to enable absolute import of Qt
|
||||
_current_dir = _os.path.dirname(_os.path.abspath(__file__))
|
||||
_scripts_dir = _os.path.dirname(_os.path.dirname(_current_dir))
|
||||
if _scripts_dir not in sys.path:
|
||||
sys.path.insert(0, _scripts_dir)
|
||||
|
||||
from Qt import QtWidgets, QtCore, QtGui, QtCompat
|
||||
|
||||
# Import wrapInstance from QtCompat (handles all Qt binding versions)
|
||||
wrapInstance = QtCompat.wrapInstance
|
||||
|
||||
# Import QIcon and QWidget from Qt module
|
||||
QIcon = QtGui.QIcon
|
||||
QWidget = QtWidgets.QWidget
|
||||
|
||||
from . import ModIt_CSS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user