getavalon / core

The safe post-production pipeline - https://getavalon.github.io/2.0
MIT License
213 stars 48 forks source link

Maya 2020 doesn't initialize correctly through userSetup #485

Closed BigRoy closed 4 years ago

BigRoy commented 4 years ago

Issue

What happened?

With Maya 2020 there have been some updates to PySide and how Maya initializes. I started the discussion on Avalon Gitter and found out that Maya now during userSetup.py runs as QtCore.QCoreApplication instance as opposed to QtWidgets.QApplication.

Traceback (most recent call last):
  File "D:\git_pipeline\avalon\development\git\core\setup\maya\userSetup.py", line 2, in <module>
    api.install(maya)
  File "D:\git_pipeline\avalon\development\git\core\avalon\pipeline.py", line 79, in install
    host.install(config)
  File "D:\git_pipeline\avalon\development\git\core\avalon\maya\pipeline.py", line 54, in install
    _install_menu()
  File "D:\git_pipeline\avalon\development\git\core\avalon\maya\pipeline.py", line 136, in _install_menu
    _uninstall_menu()
  File "D:\git_pipeline\avalon\development\git\core\avalon\maya\pipeline.py", line 271, in _uninstall_menu
    widgets = dict((w.objectName(), w) for w in app.allWidgets())
AttributeError: 'PySide2.QtCore.QCoreApplication' object has no attribute 'allWidgets'

To Reproduce Run Maya 2020 with Avalon and have it automatically initialize through the provided userSetup.py.


I have a fix for this working. Will set up a PR.