mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Merge branch 'develop' into 1525-yn-0158-usd-contribution-for-shots-starting-with-digit-breaks-usd
This commit is contained in:
commit
47247e68ac
5 changed files with 24 additions and 4 deletions
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
1
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
|
@ -35,6 +35,7 @@ body:
|
|||
label: Version
|
||||
description: What version are you running? Look to AYON Tray
|
||||
options:
|
||||
- 1.6.11
|
||||
- 1.6.10
|
||||
- 1.6.9
|
||||
- 1.6.8
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ from typing import TYPE_CHECKING, Iterable, Optional
|
|||
|
||||
import arrow
|
||||
import ayon_api
|
||||
from ayon_api.graphql_queries import project_graphql_query
|
||||
from ayon_api.operations import OperationsSession
|
||||
|
||||
from ayon_core.lib import NestedCacheItem
|
||||
|
|
@ -202,7 +203,7 @@ class ProductsModel:
|
|||
cache = self._product_type_items_cache[project_name]
|
||||
if not cache.is_valid:
|
||||
icons_mapping = self._get_product_type_icons(project_name)
|
||||
product_types = ayon_api.get_project_product_types(project_name)
|
||||
product_types = self._get_project_product_types(project_name)
|
||||
cache.update_data([
|
||||
ProductTypeItem(
|
||||
product_type["name"],
|
||||
|
|
@ -462,6 +463,24 @@ class ProductsModel:
|
|||
PRODUCTS_MODEL_SENDER
|
||||
)
|
||||
|
||||
def _get_project_product_types(self, project_name: str) -> list[dict]:
|
||||
"""This is a temporary solution for product types fetching.
|
||||
|
||||
There was a bug in ayon_api.get_project(...) which did not use GraphQl
|
||||
but REST instead. That is fixed in ayon-python-api 1.2.6 that will
|
||||
be as part of ayon launcher 1.4.3 release.
|
||||
|
||||
"""
|
||||
if not project_name:
|
||||
return []
|
||||
query = project_graphql_query({"productTypes.name"})
|
||||
query.set_variable_value("projectName", project_name)
|
||||
parsed_data = query.query(ayon_api.get_server_api_connection())
|
||||
project = parsed_data["project"]
|
||||
if project is None:
|
||||
return []
|
||||
return project["productTypes"]
|
||||
|
||||
def _get_product_type_icons(
|
||||
self, project_name: Optional[str]
|
||||
) -> ProductTypeIconMapping:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Package declaring AYON addon 'core' version."""
|
||||
__version__ = "1.6.10+dev"
|
||||
__version__ = "1.6.11+dev"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
name = "core"
|
||||
title = "Core"
|
||||
version = "1.6.10+dev"
|
||||
version = "1.6.11+dev"
|
||||
|
||||
client_dir = "ayon_core"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
[tool.poetry]
|
||||
name = "ayon-core"
|
||||
version = "1.6.10+dev"
|
||||
version = "1.6.11+dev"
|
||||
description = ""
|
||||
authors = ["Ynput Team <team@ynput.io>"]
|
||||
readme = "README.md"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue