mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Publisher: Bugfixes and enhancements (#5924)
* fix logger getter * catch crashes of create plugin initializations * use 'product' instead of 'subset' in AYON mode * fix import
This commit is contained in:
parent
7c86115b7e
commit
fe8711cf78
3 changed files with 28 additions and 8 deletions
|
|
@ -1453,7 +1453,7 @@ class BasePublisherController(AbstractPublisherController):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if self._log is None:
|
if self._log is None:
|
||||||
self._log = logging.getLogget(self.__class__.__name__)
|
self._log = logging.getLogger(self.__class__.__name__)
|
||||||
return self._log
|
return self._log
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
@ -1881,10 +1881,19 @@ class PublisherController(BasePublisherController):
|
||||||
self._emit_event("plugins.refresh.finished")
|
self._emit_event("plugins.refresh.finished")
|
||||||
|
|
||||||
def _collect_creator_items(self):
|
def _collect_creator_items(self):
|
||||||
return {
|
# TODO add crashed initialization of create plugins to report
|
||||||
identifier: CreatorItem.from_creator(creator)
|
output = {}
|
||||||
for identifier, creator in self._create_context.creators.items()
|
for identifier, creator in self._create_context.creators.items():
|
||||||
}
|
try:
|
||||||
|
output[identifier] = CreatorItem.from_creator(creator)
|
||||||
|
except Exception:
|
||||||
|
self.log.error(
|
||||||
|
"Failed to create creator item for '%s'",
|
||||||
|
identifier,
|
||||||
|
exc_info=True
|
||||||
|
)
|
||||||
|
|
||||||
|
return output
|
||||||
|
|
||||||
def _reset_instances(self):
|
def _reset_instances(self):
|
||||||
"""Reset create instances."""
|
"""Reset create instances."""
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
from qtpy import QtWidgets, QtCore
|
from qtpy import QtWidgets, QtCore
|
||||||
|
|
||||||
|
from openpype import AYON_SERVER_ENABLED
|
||||||
|
|
||||||
from .border_label_widget import BorderedLabelWidget
|
from .border_label_widget import BorderedLabelWidget
|
||||||
|
|
||||||
from .card_view_widgets import InstanceCardView
|
from .card_view_widgets import InstanceCardView
|
||||||
|
|
@ -35,7 +37,10 @@ class OverviewWidget(QtWidgets.QFrame):
|
||||||
# --- Created Subsets/Instances ---
|
# --- Created Subsets/Instances ---
|
||||||
# Common widget for creation and overview
|
# Common widget for creation and overview
|
||||||
subset_views_widget = BorderedLabelWidget(
|
subset_views_widget = BorderedLabelWidget(
|
||||||
"Subsets to publish", subset_content_widget
|
"{} to publish".format(
|
||||||
|
"Products" if AYON_SERVER_ENABLED else "Subsets"
|
||||||
|
),
|
||||||
|
subset_content_widget
|
||||||
)
|
)
|
||||||
|
|
||||||
subset_view_cards = InstanceCardView(controller, subset_views_widget)
|
subset_view_cards = InstanceCardView(controller, subset_views_widget)
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,9 @@ class CreateBtn(PublishIconBtn):
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
icon_path = get_icon_path("create")
|
icon_path = get_icon_path("create")
|
||||||
super(CreateBtn, self).__init__(icon_path, "Create", parent)
|
super(CreateBtn, self).__init__(icon_path, "Create", parent)
|
||||||
self.setToolTip("Create new subset/s")
|
self.setToolTip("Create new {}/s".format(
|
||||||
|
"product" if AYON_SERVER_ENABLED else "subset"
|
||||||
|
))
|
||||||
self.setLayoutDirection(QtCore.Qt.RightToLeft)
|
self.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -655,7 +657,11 @@ class TasksCombobox(QtWidgets.QComboBox):
|
||||||
self._proxy_model.set_filter_empty(invalid)
|
self._proxy_model.set_filter_empty(invalid)
|
||||||
if invalid:
|
if invalid:
|
||||||
self._set_is_valid(False)
|
self._set_is_valid(False)
|
||||||
self.set_text("< One or more subsets require Task selected >")
|
self.set_text(
|
||||||
|
"< One or more {} require Task selected >".format(
|
||||||
|
"products" if AYON_SERVER_ENABLED else "subsets"
|
||||||
|
)
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
self.set_text(None)
|
self.set_text(None)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue