From 8aaa53cc6664c85d1a8b4dc28b9f98a4400702aa Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Tue, 4 Oct 2022 18:36:39 +0200 Subject: [PATCH] pass just plugin label on "publish.process.plugin.changed" topic instead of plugin --- openpype/tools/publisher/control.py | 5 ++++- openpype/tools/publisher/widgets/publish_frame.py | 7 +------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/openpype/tools/publisher/control.py b/openpype/tools/publisher/control.py index d7ae161da6..b45927bfd3 100644 --- a/openpype/tools/publisher/control.py +++ b/openpype/tools/publisher/control.py @@ -874,9 +874,12 @@ class PublisherController: self._publish_report.add_plugin_iter(plugin, self._publish_context) # Trigger callback that new plugin is going to be processed + plugin_label = plugin.__name__ + if hasattr(plugin, "label") and plugin.label: + plugin_label = plugin.label self._emit_event( "publish.process.plugin.changed", - {"plugin": plugin} + {"plugin_label": plugin_label} ) # Plugin is instance plugin diff --git a/openpype/tools/publisher/widgets/publish_frame.py b/openpype/tools/publisher/widgets/publish_frame.py index ad4c044e27..7889818988 100644 --- a/openpype/tools/publisher/widgets/publish_frame.py +++ b/openpype/tools/publisher/widgets/publish_frame.py @@ -329,13 +329,8 @@ class PublishFrame(QtWidgets.QWidget): def _on_plugin_change(self, event): """Change plugin label when instance is going to be processed.""" - plugin = event["plugin"] - plugin_name = plugin.__name__ - if hasattr(plugin, "label") and plugin.label: - plugin_name = plugin.label - self._progress_widget.setValue(self.controller.publish_progress) - self._plugin_label.setText(plugin_name) + self._plugin_label.setText(event["plugin_label"]) QtWidgets.QApplication.processEvents() def _on_publish_stop(self):