mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge branch 'ynput:develop' into order_tasks_using_anatomy
This commit is contained in:
commit
9b09865209
7 changed files with 49 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
|
label: Version
|
||||||
description: What version are you running? Look to AYON Tray
|
description: What version are you running? Look to AYON Tray
|
||||||
options:
|
options:
|
||||||
|
- 1.6.7
|
||||||
- 1.6.6
|
- 1.6.6
|
||||||
- 1.6.5
|
- 1.6.5
|
||||||
- 1.6.4
|
- 1.6.4
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,9 @@ def _get_ayon_bundle_data() -> tuple[
|
||||||
]:
|
]:
|
||||||
studio_bundle_name = os.environ.get("AYON_STUDIO_BUNDLE_NAME")
|
studio_bundle_name = os.environ.get("AYON_STUDIO_BUNDLE_NAME")
|
||||||
project_bundle_name = os.getenv("AYON_BUNDLE_NAME")
|
project_bundle_name = os.getenv("AYON_BUNDLE_NAME")
|
||||||
|
# If AYON launcher <1.4.0 was used
|
||||||
|
if not studio_bundle_name:
|
||||||
|
studio_bundle_name = project_bundle_name
|
||||||
bundles = ayon_api.get_bundles()["bundles"]
|
bundles = ayon_api.get_bundles()["bundles"]
|
||||||
studio_bundle = next(
|
studio_bundle = next(
|
||||||
(
|
(
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import re
|
||||||
import copy
|
import copy
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
|
import tempfile
|
||||||
import traceback
|
import traceback
|
||||||
import uuid
|
import uuid
|
||||||
from typing import Optional, Any
|
from typing import Optional, Any
|
||||||
|
|
@ -709,11 +710,14 @@ class ProjectPushItemProcess:
|
||||||
project_entity,
|
project_entity,
|
||||||
src_folder_type
|
src_folder_type
|
||||||
)
|
)
|
||||||
|
new_thumbnail_id = self._create_new_folder_thumbnail(
|
||||||
|
project_entity, src_folder_entity)
|
||||||
folder_entity = new_folder_entity(
|
folder_entity = new_folder_entity(
|
||||||
folder_name,
|
folder_name,
|
||||||
dst_folder_type,
|
dst_folder_type,
|
||||||
parent_id=parent_id,
|
parent_id=parent_id,
|
||||||
attribs=new_folder_attrib
|
attribs=new_folder_attrib,
|
||||||
|
thumbnail_id=new_thumbnail_id
|
||||||
)
|
)
|
||||||
if folder_label:
|
if folder_label:
|
||||||
folder_entity["label"] = folder_label
|
folder_entity["label"] = folder_label
|
||||||
|
|
@ -733,6 +737,40 @@ class ProjectPushItemProcess:
|
||||||
folder_entity["path"] = "/".join([parent_path, folder_name])
|
folder_entity["path"] = "/".join([parent_path, folder_name])
|
||||||
return folder_entity
|
return folder_entity
|
||||||
|
|
||||||
|
def _create_new_folder_thumbnail(
|
||||||
|
self,
|
||||||
|
project_entity: dict[str, Any],
|
||||||
|
src_folder_entity: dict[str, Any]
|
||||||
|
) -> Optional[str]:
|
||||||
|
"""Copy thumbnail possibly set on folder.
|
||||||
|
|
||||||
|
Could be different from representation thumbnails, and it is only shown
|
||||||
|
when folder is selected.
|
||||||
|
"""
|
||||||
|
if not src_folder_entity["thumbnailId"]:
|
||||||
|
return None
|
||||||
|
|
||||||
|
thumbnail = ayon_api.get_folder_thumbnail(
|
||||||
|
self._item.src_project_name,
|
||||||
|
src_folder_entity["id"],
|
||||||
|
src_folder_entity["thumbnailId"]
|
||||||
|
)
|
||||||
|
if not thumbnail.id:
|
||||||
|
return None
|
||||||
|
|
||||||
|
with tempfile.NamedTemporaryFile(delete=False) as tmp_file:
|
||||||
|
tmp_file.write(thumbnail.content)
|
||||||
|
temp_file_path = tmp_file.name
|
||||||
|
|
||||||
|
new_thumbnail_id = None
|
||||||
|
try:
|
||||||
|
new_thumbnail_id = ayon_api.create_thumbnail(
|
||||||
|
project_entity["name"], temp_file_path)
|
||||||
|
finally:
|
||||||
|
if os.path.exists(temp_file_path):
|
||||||
|
os.remove(temp_file_path)
|
||||||
|
return new_thumbnail_id
|
||||||
|
|
||||||
def _get_dst_folder_type(
|
def _get_dst_folder_type(
|
||||||
self,
|
self,
|
||||||
project_entity: dict[str, Any],
|
project_entity: dict[str, Any],
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""Package declaring AYON addon 'core' version."""
|
"""Package declaring AYON addon 'core' version."""
|
||||||
__version__ = "1.6.6+dev"
|
__version__ = "1.6.7+dev"
|
||||||
|
|
|
||||||
|
|
@ -19,3 +19,6 @@ OpenTimelineIO = "0.16.0"
|
||||||
opencolorio = "^2.3.2,<2.4.0"
|
opencolorio = "^2.3.2,<2.4.0"
|
||||||
Pillow = "9.5.0"
|
Pillow = "9.5.0"
|
||||||
websocket-client = ">=0.40.0,<2"
|
websocket-client = ">=0.40.0,<2"
|
||||||
|
|
||||||
|
[ayon.runtimeDependencies.darwin]
|
||||||
|
pyobjc-core = "^11.1"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name = "core"
|
name = "core"
|
||||||
title = "Core"
|
title = "Core"
|
||||||
version = "1.6.6+dev"
|
version = "1.6.7+dev"
|
||||||
|
|
||||||
client_dir = "ayon_core"
|
client_dir = "ayon_core"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "ayon-core"
|
name = "ayon-core"
|
||||||
version = "1.6.6+dev"
|
version = "1.6.7+dev"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["Ynput Team <team@ynput.io>"]
|
authors = ["Ynput Team <team@ynput.io>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue