From dc459e593446eab6c6818fbf58040ffe28fcbe53 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Mon, 27 Jan 2020 12:45:02 +0100 Subject: [PATCH] hotfix - maya 2020 compatibility --- pype/maya/menu.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pype/maya/menu.py b/pype/maya/menu.py index 5254337f03..806944c117 100644 --- a/pype/maya/menu.py +++ b/pype/maya/menu.py @@ -15,12 +15,13 @@ log = logging.getLogger(__name__) def _get_menu(): """Return the menu instance if it currently exists in Maya""" - app = QtWidgets.QApplication.instance() - widgets = dict((w.objectName(), w) for w in app.allWidgets()) + widgets = dict(( + w.objectName(), w) for w in QtWidgets.QApplication.allWidgets()) menu = widgets.get(self._menu) return menu + def deferred(): log.info("Attempting to install scripts menu..")