mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
added task tags filter base
This commit is contained in:
parent
9374e19ec3
commit
c2f9e55dd1
2 changed files with 21 additions and 1 deletions
|
|
@ -307,6 +307,9 @@ class ProductsWidget(QtWidgets.QWidget):
|
|||
self._version_delegate.set_version_tags_filter(version_tags)
|
||||
self._products_proxy_model.set_version_tags_filter(version_tags)
|
||||
|
||||
def set_task_tags_filter(self, task_tags):
|
||||
pass
|
||||
|
||||
def set_product_type_filter(self, product_type_filters):
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -427,6 +427,10 @@ class LoaderWindow(QtWidgets.QWidget):
|
|||
version_tags = self._search_bar.get_filter_value("version_tags")
|
||||
self._products_widget.set_version_tags_filter(version_tags)
|
||||
|
||||
elif filter_name == "task_tags":
|
||||
task_tags = self._search_bar.get_filter_value("task_tags")
|
||||
self._products_widget.set_task_tags_filter(task_tags)
|
||||
|
||||
def _on_tasks_selection_change(self, event):
|
||||
self._products_widget.set_tasks_filter(event["task_ids"])
|
||||
|
||||
|
|
@ -522,7 +526,13 @@ class LoaderWindow(QtWidgets.QWidget):
|
|||
}
|
||||
for tag_name in tags_by_entity_type.get("versions") or []
|
||||
]
|
||||
|
||||
task_tags = [
|
||||
{
|
||||
"value": tag_name,
|
||||
"color": tag_color_by_name.get(tag_name),
|
||||
}
|
||||
for tag_name in tags_by_entity_type.get("tasks") or []
|
||||
]
|
||||
|
||||
self._search_bar.set_search_items([
|
||||
FilterDefinition(
|
||||
|
|
@ -554,6 +564,13 @@ class LoaderWindow(QtWidgets.QWidget):
|
|||
icon=None,
|
||||
items=version_tags,
|
||||
),
|
||||
FilterDefinition(
|
||||
name="task_tags",
|
||||
title="Task tags",
|
||||
filter_type="list",
|
||||
icon=None,
|
||||
items=task_tags,
|
||||
),
|
||||
])
|
||||
|
||||
def _on_folders_selection_changed(self, event):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue