From 6c07372f78df50314b6908b569b98b10a4fb05b8 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 30 Jun 2023 23:01:29 +0200 Subject: [PATCH] Use `get_main_window` logic from `lib` --- openpype/hosts/maya/api/pipeline.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/openpype/hosts/maya/api/pipeline.py b/openpype/hosts/maya/api/pipeline.py index 96c2f2d0af..33b4f8bc65 100644 --- a/openpype/hosts/maya/api/pipeline.py +++ b/openpype/hosts/maya/api/pipeline.py @@ -569,7 +569,6 @@ def _update_render_layer_observers(): def on_open(): """On scene open let's assume the containers have changed.""" - from qtpy import QtWidgets from openpype.widgets import popup utils.executeDeferred(_update_render_layer_observers) @@ -583,10 +582,7 @@ def on_open(): log.warning("Scene has outdated content.") # Find maya main window - top_level_widgets = {w.objectName(): w for w in - QtWidgets.QApplication.topLevelWidgets()} - parent = top_level_widgets.get("MayaWindow", None) - + parent = lib.get_main_window() if parent is None: log.info("Skipping outdated content pop-up " "because Maya window can't be found.")