Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - spacefrog

Pages: [1]
1
Just in Substance Painter's Python terminal - running this:

from PySide2.QtCore import QEnum, QFlag

(as per https://doc-snapshots.qt.io/qtforpython-5.15/PySide2/QtCore/QEnum.html)

returns this error:

ImportError: cannot import name 'QFlag' from 'PySide2.QtCore' (C:\Program Files\Allegorithmic\Substance Painter\resources\pythonsdk\lib\site-packages\PySide2\QtCore.cp37-win_amd64.pyd)



What am I missing?

2
Hiya, this is how I did mine:

Quote

from PySide2 import QtGui
 
main_window = substance_painter.ui.get_main_window()
for child in main_window.children():
   if child.objectName() == 'plugin_toolbar':
      child.addAction("BTN")


Hope that helps.

Pages: [1]