Switching to Bake Mesh Maps mode kills my QtWidget window, any workaround?
Our studio uses a tool that needs to stay open throughout the entire work session, in fact it has it's own Open Project button that also call a bunch of other functions that load metadata associated with the asset, sets up export paths an so on. Substance v 9.0 seems to destroy my QT dialog when I go into Bake Mode, which is unacceptable in our current pipeline. Any way to avoid that?
Here is an example of how I create my plugin window:
class PluginWidget01(QtWidgets.QWidget):
def __init__(self, parent=None):
super(PluginWidget01, self).__init__(parent)
self.init_ui()
def init_ui(self):
# UI elemenents here
# As well as UI functions and connections
class MyPlugin:
def __init__(self):
self.widget = PluginWidget01()
main_window = substance_painter.ui.get_main_window()
self.dock_widget = QtWidgets.QDockWidget('Exporter 0.1', main_window)
self.dock_widget.setObjectName('PluginWidget01')
self.dock_widget.setWidget(self.widget)
self.dock_widget.setAllowedAreas(QtCore.Qt.TopDockWidgetArea | QtCore.Qt.LeftDockWidgetArea)
main_window.addDockWidget(QtCore.Qt.LeftDockWidgetArea, self.dock_widget)
plugin_widgets.append(self.dock_widget)
def start_plugin():
close_plugin()
MyPlugin()
Any help would be greatly appreciated
