-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QML window within Maya opening but without GUI #378
Comments
Try removing this line. qml_api.register_pyqt5(r"R:\pipeline\networkInstall\python_lib\PyQt5") mayapy already has PySide2 which should be enough. Then try adding your plug-ins to PYBLISHPLUGINPATH before launching Maya. set PYBLISHPLUGINPATH=c:\my\plugins If that works, you can try launching Maya first and adding it both via pyblish.api and PYBLISHPLUGINPATH. Since QML is running in a separate mayapy, it doesn't know about what gets registered inside of the Maya GUI. It only knows what's in the environment, like PYBLISHPLUGINPATH. Both Maya GUI and the external mayapy needs to know the path to your plug-ins. import os
plugins = os.path.join(os.path.dirname(pyblish_test.__file__), "plugins")
os.environ["PYBLISHPLUGINPATH"] = plugins
pyblish.api.register_plugin_path(plugins) |
Setting the env var for Maya GUI and for mayapy doesn't seem to change something. The plugins are found and the collector is executed (some logs are here). Here's my adapted code :
set PYBLISHPLUGINPATH=C:\Users\m.jenin\Documents\marius\pyblish_test\plugins
import os
import sys
import importlib
import pyblish.api
import pyblish_maya
import pyblish_qml
from common import utils
import pyblish_test
from pyblish_qml import api as qml_api
# Dependencies
qml_api.register_python_executable(r"C:\Program Files\Autodesk\Maya2022\bin\mayapy.exe")
# qml_api.register_pyqt5(r"R:\pipeline\networkInstall\python_lib\PyQt5")
# Plugins
pyblish.api.deregister_all_paths()
pyblish.api.register_target("test_target")
plugins = os.path.join(os.path.dirname(pyblish_test.__file__), "plugins")
os.environ["PYBLISHPLUGINPATH"] = plugins
pyblish.api.register_plugin_path(plugins)
# GUI
pyblish.api.register_gui("pyblish_qml")
pyblish_qml.settings.WindowTitle="Pyblish Test"
pyblish_qml.settings.HiddenSections = []
pyblish_maya.show() |
Also pyblish_lite works well. It seems to be an UI problem |
You must compile pyqt5 yourself, because maya2020 's pyside2 does not include qml, and 2022+ only includes or uses others compiled it |
I have a code to launch a qml window with my plugins stored in a folder "plugins". The problem is that the gui that supposed to be in the qml qindow isn't showing. The plugins seems to work how they supposed to be. Here's the code :
Here's the logs :
2023-07-10.11-48-59.mov
I'm on Maya 2022 with Python 3.7.7. Here's my packages :
The text was updated successfully, but these errors were encountered: