This commit is contained in:
2025-11-30 14:49:16 +08:00
parent 021c593241
commit de46c4b073
1406 changed files with 526774 additions and 1221 deletions

View File

@@ -0,0 +1,29 @@
pyside6 = False
try:
from PySide6 import QtCore, QtGui, QtSvg, QtWidgets
from PySide6.QtCore import Qt
from PySide6.QtGui import QAction, QActionGroup
from PySide6.QtSvgWidgets import QSvgWidget
from PySide6.QtWidgets import QWidget
pyside6 = True
except:
from PySide2 import QtCore, QtGui, QtSvg, QtWidgets
from PySide2.QtCore import Qt
from PySide2.QtSvg import QSvgWidget
from PySide2.QtWidgets import QAction, QActionGroup, QWidget
def get_main_window():
from maya import OpenMayaUI as omui
return wrap_instance(omui.MQtUtil.mainWindow(), QWidget)
def wrap_instance(ptr, widget):
if pyside6:
from shiboken6 import wrapInstance
else:
from shiboken2 import wrapInstance
return wrapInstance(int(ptr), widget)