mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Merge branch 'develop' into enhancement/1309-loader-tool-add-tags-filtering
This commit is contained in:
commit
37003af562
1 changed files with 12 additions and 8 deletions
|
|
@ -12,7 +12,6 @@ from ayon_api.operations import OperationsSession
|
|||
from ayon_core.lib import NestedCacheItem
|
||||
from ayon_core.style import get_default_entity_icon_color
|
||||
from ayon_core.tools.loader.abstract import (
|
||||
IconData,
|
||||
ProductTypeItem,
|
||||
ProductBaseTypeItem,
|
||||
ProductItem,
|
||||
|
|
@ -115,7 +114,7 @@ def product_item_from_entity(
|
|||
|
||||
product_type_icon = product_type_item.icon
|
||||
product_base_type_icon = product_base_type_item.icon
|
||||
product_icon: IconData = {
|
||||
product_icon = {
|
||||
"type": "awesome-font",
|
||||
"name": "fa.file-o",
|
||||
"color": get_default_entity_icon_color(),
|
||||
|
|
@ -146,7 +145,7 @@ def product_type_item_from_data(
|
|||
# TODO implement icon implementation
|
||||
# icon = product_type_data["icon"]
|
||||
# color = product_type_data["color"]
|
||||
icon: IconData = {
|
||||
icon = {
|
||||
"type": "awesome-font",
|
||||
"name": "fa.folder",
|
||||
"color": "#0091B2",
|
||||
|
|
@ -167,7 +166,7 @@ def product_base_type_item_from_data(
|
|||
ProductBaseTypeDict: Product base type item.
|
||||
|
||||
"""
|
||||
icon: IconData = {
|
||||
icon = {
|
||||
"type": "awesome-font",
|
||||
"name": "fa.folder",
|
||||
"color": "#0091B2",
|
||||
|
|
@ -178,7 +177,7 @@ def product_base_type_item_from_data(
|
|||
|
||||
|
||||
def create_default_product_type_item(product_type: str) -> ProductTypeItem:
|
||||
icon: IconData = {
|
||||
icon = {
|
||||
"type": "awesome-font",
|
||||
"name": "fa.folder",
|
||||
"color": "#0091B2",
|
||||
|
|
@ -196,7 +195,7 @@ def create_default_product_base_type_item(
|
|||
Returns:
|
||||
ProductBaseTypeItem: Default product base type item.
|
||||
"""
|
||||
icon: IconData = {
|
||||
icon = {
|
||||
"type": "awesome-font",
|
||||
"name": "fa.folder",
|
||||
"color": "#0091B2",
|
||||
|
|
@ -286,8 +285,13 @@ class ProductsModel:
|
|||
|
||||
cache = self._product_base_type_items_cache[project_name]
|
||||
if not cache.is_valid:
|
||||
product_base_types = []
|
||||
# TODO add temp implementation here when it is actually
|
||||
# implemented and available on server.
|
||||
if hasattr(ayon_api, "get_project_product_base_types"):
|
||||
product_base_types = ayon_api.get_project_product_base_types(
|
||||
project_name)
|
||||
project_name
|
||||
)
|
||||
cache.update_data([
|
||||
product_base_type_item_from_data(product_base_type)
|
||||
for product_base_type in product_base_types
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue