Skip to content
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

Replace pyside2 import with qtpy import #12

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

moonyuet
Copy link
Member

Changelog Description

This PR is to resolve the error of installing AYON when substance painter is launched.

[Python] Traceback (most recent call last):
  File "C:\Program Files/Adobe/Adobe Substance 3D Painter/resources/python\startup\painter_plugins_ui.py", line 58, in manage_plugin
    substance_painter_plugins.reload_plugin(module)
  File "C:\Program Files/Adobe/Adobe Substance 3D Painter/resources/python/modules\substance_painter_plugins.py", line 157, in reload_plugin
    start_plugin(module)
  File "C:\Program Files/Adobe/Adobe Substance 3D Painter/resources/python/modules\substance_painter_plugins.py", line 88, in start_plugin
    module.start_plugin()
  File "D:\ayon-addon_template\ayon-substance-painter\client\ayon_substancepainter\deploy\plugins\ayon_plugin.py", line 26, in start_plugin
    install_host(SubstanceHost())
  File "D:\ayon-core\client\ayon_core\pipeline\context_tools.py", line 129, in install_host
    host.install()
  File "D:\ayon-addon_template\ayon-substance-painter\client\ayon_substancepainter\api\pipeline.py", line 74, in install
    self._install_menu()
  File "D:\ayon-addon_template\ayon-substance-painter\client\ayon_substancepainter\api\pipeline.py", line 165, in _install_menu
    from PySide2 import QtWidgets
ModuleNotFoundError: No module named 'PySide2'

Additional info

n/a

Testing notes:

  1. Install and update addon with this branch
  2. Launch Substance

Copy link
Contributor

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! I vaguely recall there was a reason I had to use the PySide2 import at the time, but don't remember why.

What Substance Painter version did you test this with? (Did they update PySide versions, or we?) I wonder if this would still work with the older Substance Painter versions?

Other than that, change looks good! I don't have access to Painter myself currently; so can't test.

@moonyuet
Copy link
Member Author

Makes sense! I vaguely recall there was a reason I had to use the PySide2 import at the time, but don't remember why.

What Substance Painter version did you test this with? (Did they update PySide versions, or we?) I wonder if this would still work with the older Substance Painter versions?

Other than that, change looks good! I don't have access to Painter myself currently; so can't test.

I was testing with their latest.
there is also some bug when collecting the texture set in the latest version of substance. So when I tested with the tx, I was actually testing in one version elder than the latest.

@moonyuet moonyuet merged commit a70e288 into develop Sep 19, 2024
1 check passed
@moonyuet moonyuet deleted the bugfix/replacePySide2importwithqtpy branch September 19, 2024 09:39
@BigRoy
Copy link
Contributor

BigRoy commented Sep 19, 2024

I was testing with their latest. there is also some bug when collecting the texture set in the latest version of substance. So when I tested with the tx, I was actually testing in one version elder than the latest.

Can you create an issue for this with the bug/stack trace?

@iLLiCiTiT iLLiCiTiT added the type: bug Something isn't working label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants