mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
added show order to publisher UI
This commit is contained in:
parent
c7f051db20
commit
b67181c4e0
3 changed files with 17 additions and 5 deletions
|
|
@ -18,9 +18,10 @@ from .tasks_widget import CreateWidgetTasksWidget
|
|||
from .precreate_widget import PreCreateWidget
|
||||
from ..constants import (
|
||||
VARIANT_TOOLTIP,
|
||||
CREATOR_IDENTIFIER_ROLE,
|
||||
FAMILY_ROLE,
|
||||
CREATOR_IDENTIFIER_ROLE,
|
||||
CREATOR_THUMBNAIL_ENABLED_ROLE,
|
||||
CREATOR_SORT_ROLE,
|
||||
)
|
||||
|
||||
SEPARATORS = ("---separator---", "---")
|
||||
|
|
@ -441,7 +442,8 @@ class CreateWidget(QtWidgets.QWidget):
|
|||
|
||||
# Add new families
|
||||
new_creators = set()
|
||||
for identifier, creator_item in self._controller.creator_items.items():
|
||||
creator_items_by_identifier = self._controller.creator_items
|
||||
for identifier, creator_item in creator_items_by_identifier.items():
|
||||
if creator_item.creator_type != "artist":
|
||||
continue
|
||||
|
||||
|
|
@ -457,6 +459,7 @@ class CreateWidget(QtWidgets.QWidget):
|
|||
self._creators_model.appendRow(item)
|
||||
|
||||
item.setData(creator_item.label, QtCore.Qt.DisplayRole)
|
||||
item.setData(creator_item.show_order, CREATOR_SORT_ROLE)
|
||||
item.setData(identifier, CREATOR_IDENTIFIER_ROLE)
|
||||
item.setData(
|
||||
creator_item.create_allow_thumbnail,
|
||||
|
|
@ -482,8 +485,9 @@ class CreateWidget(QtWidgets.QWidget):
|
|||
index = indexes[0]
|
||||
|
||||
identifier = index.data(CREATOR_IDENTIFIER_ROLE)
|
||||
create_item = creator_items_by_identifier.get(identifier)
|
||||
|
||||
self._set_creator_by_identifier(identifier)
|
||||
self._set_creator(create_item)
|
||||
|
||||
def _on_plugins_refresh(self):
|
||||
# Trigger refresh only if is visible
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue