mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Use get_main_window logic from lib
This commit is contained in:
parent
843cbb2387
commit
6c07372f78
1 changed files with 1 additions and 5 deletions
|
|
@ -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.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue