This commit is contained in:
2025-12-06 18:23:17 +08:00
parent 1f10abfb32
commit 9f30e905d7
259 changed files with 33763 additions and 348 deletions

View File

@@ -1,43 +1,44 @@
##GLOBAL VARIABLEs
try:
from PySide6 import QtWidgets, QtCore, QtGui
from PySide6.QtWidgets import *
from PySide6.QtGui import *
from PySide6.QtCore import *
from shiboken6 import wrapInstance
except ImportError:
from PySide2 import QtWidgets, QtCore, QtGui
from shiboken2 import wrapInstance
from PySide2.QtGui import QIcon
from PySide2.QtWidgets import QWidget
import shiboken2
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
try:
from PySide2.QtGui import QIcon
from PySide2.QtWidgets import QWidget
except ImportError:
from PySide.QtGui import QIcon, QWidget
from . import ModIt_CSS
##_____________________________________________PATH
MODIT_DIR = os.path.dirname(os.path.abspath(__file__)).replace('\\', '/')
USERAPPDIR = mc.internalVar(userAppDir=True)
VERSION = mc.about(v=True)
IconsPathThemeClassic = os.path.join(USERAPPDIR, VERSION+'/scripts/ModIt/Icons/Theme_Classic/')
ToolPath = os.path.join(USERAPPDIR, VERSION+'/scripts/ModIt/Tools/')
PreferencePath = os.path.join(USERAPPDIR, VERSION+'/scripts/ModIt/Preferences/')
PlugInsPath = os.path.join(USERAPPDIR, VERSION+'/plug-ins')
PrefIcons = os.path.join(USERAPPDIR, VERSION+'/prefs/icons')
UserScriptFolder = os.path.join(USERAPPDIR, VERSION+'/scripts')
RessourcePath = os.path.join(USERAPPDIR, VERSION+'/scripts/ModIt/Ressources/')
IconsPathThemeClassic = os.path.join(MODIT_DIR, 'Icons/Theme_Classic/').replace('\\', '/')
ToolPath = os.path.join(MODIT_DIR, 'Tools/').replace('\\', '/')
PreferencePath = os.path.join(MODIT_DIR, 'Preferences/').replace('\\', '/')
PlugInsPath = os.path.join(USERAPPDIR, VERSION+'/plug-ins').replace('\\', '/')
PrefIcons = os.path.join(USERAPPDIR, VERSION+'/prefs/icons').replace('\\', '/')
UserScriptFolder = os.path.join(USERAPPDIR, VERSION+'/scripts').replace('\\', '/')
RessourcePath = os.path.join(MODIT_DIR, 'Ressources/').replace('\\', '/')
##_____________________________________________PREFERENCES
ModItTitle = "ModIt - 3.3"
ModItTitle = "ModIt - 3.1.1"
##_____________________________________________UI