From ccc25796971a1c75bdda6037d75921d28ad9e2fa Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Tue, 20 Dec 2022 13:39:27 +0100 Subject: [PATCH] use qtpy in maya implementation instead of Qt --- openpype/hosts/maya/api/commands.py | 2 +- openpype/hosts/maya/api/lib.py | 4 ++-- openpype/hosts/maya/api/menu.py | 2 +- openpype/hosts/maya/api/pipeline.py | 2 +- openpype/hosts/maya/api/shader_definition_editor.py | 2 +- openpype/hosts/maya/plugins/load/actions.py | 2 +- openpype/hosts/maya/plugins/load/load_image_plane.py | 2 +- openpype/hosts/maya/plugins/load/load_look.py | 2 +- .../maya/plugins/publish/validate_assembly_transforms.py | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/openpype/hosts/maya/api/commands.py b/openpype/hosts/maya/api/commands.py index 355edf3ae4..4a36406632 100644 --- a/openpype/hosts/maya/api/commands.py +++ b/openpype/hosts/maya/api/commands.py @@ -39,7 +39,7 @@ class ToolWindows: def edit_shader_definitions(): - from Qt import QtWidgets + from qtpy import QtWidgets from openpype.hosts.maya.api.shader_definition_editor import ( ShaderDefinitionsEditor ) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index ca826946f8..dd5da275e8 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -116,7 +116,7 @@ RENDERLIKE_INSTANCE_FAMILIES = ["rendering", "vrayscene"] def get_main_window(): """Acquire Maya's main window""" - from Qt import QtWidgets + from qtpy import QtWidgets if self._parent is None: self._parent = { @@ -3018,7 +3018,7 @@ def update_content_on_context_change(): def show_message(title, msg): - from Qt import QtWidgets + from qtpy import QtWidgets from openpype.widgets import message_window # Find maya main window diff --git a/openpype/hosts/maya/api/menu.py b/openpype/hosts/maya/api/menu.py index e20f29049b..67109e9958 100644 --- a/openpype/hosts/maya/api/menu.py +++ b/openpype/hosts/maya/api/menu.py @@ -1,7 +1,7 @@ import os import logging -from Qt import QtWidgets, QtGui +from qtpy import QtWidgets, QtGui import maya.utils import maya.cmds as cmds diff --git a/openpype/hosts/maya/api/pipeline.py b/openpype/hosts/maya/api/pipeline.py index b3bf738a2b..3798170671 100644 --- a/openpype/hosts/maya/api/pipeline.py +++ b/openpype/hosts/maya/api/pipeline.py @@ -563,7 +563,7 @@ def on_save(): def on_open(): """On scene open let's assume the containers have changed.""" - from Qt import QtWidgets + from qtpy import QtWidgets from openpype.widgets import popup cmds.evalDeferred( diff --git a/openpype/hosts/maya/api/shader_definition_editor.py b/openpype/hosts/maya/api/shader_definition_editor.py index 6ea5e1a127..6edafb1f35 100644 --- a/openpype/hosts/maya/api/shader_definition_editor.py +++ b/openpype/hosts/maya/api/shader_definition_editor.py @@ -5,7 +5,7 @@ Shader names are stored as simple text file over GridFS in mongodb. """ import os -from Qt import QtWidgets, QtCore, QtGui +from qtpy import QtWidgets, QtCore, QtGui from openpype.client.mongo import OpenPypeMongoConnection from openpype import resources import gridfs diff --git a/openpype/hosts/maya/plugins/load/actions.py b/openpype/hosts/maya/plugins/load/actions.py index 9cc9180d6e..98c8192294 100644 --- a/openpype/hosts/maya/plugins/load/actions.py +++ b/openpype/hosts/maya/plugins/load/actions.py @@ -153,7 +153,7 @@ class ImportMayaLoader(load.LoaderPlugin): """ - from Qt import QtWidgets + from qtpy import QtWidgets accept = QtWidgets.QMessageBox.Ok buttons = accept | QtWidgets.QMessageBox.Cancel diff --git a/openpype/hosts/maya/plugins/load/load_image_plane.py b/openpype/hosts/maya/plugins/load/load_image_plane.py index b267921bdc..c857c9254c 100644 --- a/openpype/hosts/maya/plugins/load/load_image_plane.py +++ b/openpype/hosts/maya/plugins/load/load_image_plane.py @@ -1,4 +1,4 @@ -from Qt import QtWidgets, QtCore +from qtpy import QtWidgets, QtCore from openpype.client import ( get_asset_by_id, diff --git a/openpype/hosts/maya/plugins/load/load_look.py b/openpype/hosts/maya/plugins/load/load_look.py index 3ef19ad96f..8f3e017658 100644 --- a/openpype/hosts/maya/plugins/load/load_look.py +++ b/openpype/hosts/maya/plugins/load/load_look.py @@ -3,7 +3,7 @@ import json from collections import defaultdict -from Qt import QtWidgets +from qtpy import QtWidgets from openpype.client import get_representation_by_name from openpype.pipeline import ( diff --git a/openpype/hosts/maya/plugins/publish/validate_assembly_transforms.py b/openpype/hosts/maya/plugins/publish/validate_assembly_transforms.py index 3f2c59b95b..e8087a304f 100644 --- a/openpype/hosts/maya/plugins/publish/validate_assembly_transforms.py +++ b/openpype/hosts/maya/plugins/publish/validate_assembly_transforms.py @@ -89,7 +89,7 @@ class ValidateAssemblyModelTransforms(pyblish.api.InstancePlugin): """ - from Qt import QtWidgets + from qtpy import QtWidgets from openpype.hosts.maya.api import lib # Store namespace in variable, cosmetics thingy