Merge branch 'develop' into 1525-yn-0158-usd-contribution-for-shots-starting-with-digit-breaks-usd

This commit is contained in:
Jakub Trllo 2025-11-19 16:54:53 +01:00 committed by GitHub
commit 07bf997aa2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 79 additions and 47 deletions

View file

@ -35,6 +35,7 @@ body:
label: Version
description: What version are you running? Look to AYON Tray
options:
- 1.6.10
- 1.6.9
- 1.6.8
- 1.6.7

View file

@ -591,22 +591,6 @@ def create_instances_for_aov(
# AOV product of its own.
log = Logger.get_logger("farm_publishing")
additional_color_data = {
"renderProducts": instance.data["renderProducts"],
"colorspaceConfig": instance.data["colorspaceConfig"],
"display": instance.data["colorspaceDisplay"],
"view": instance.data["colorspaceView"]
}
# Get templated path from absolute config path.
anatomy = instance.context.data["anatomy"]
colorspace_template = instance.data["colorspaceConfig"]
try:
additional_color_data["colorspaceTemplate"] = remap_source(
colorspace_template, anatomy)
except ValueError as e:
log.warning(e)
additional_color_data["colorspaceTemplate"] = colorspace_template
# if there are product to attach to and more than one AOV,
# we cannot proceed.
@ -618,6 +602,29 @@ def create_instances_for_aov(
"attaching multiple AOVs or renderable cameras to "
"product is not supported yet.")
additional_data = {
"renderProducts": instance.data["renderProducts"],
}
# Collect color management data if present
colorspace_config = instance.data.get("colorspaceConfig")
if colorspace_config:
additional_data.update({
"colorspaceConfig": colorspace_config,
# Display/View are optional
"display": instance.data.get("colorspaceDisplay"),
"view": instance.data.get("colorspaceView")
})
# Get templated path from absolute config path.
anatomy = instance.context.data["anatomy"]
try:
additional_data["colorspaceTemplate"] = remap_source(
colorspace_config, anatomy)
except ValueError as e:
log.warning(e)
additional_data["colorspaceTemplate"] = colorspace_config
# create instances for every AOV we found in expected files.
# NOTE: this is done for every AOV and every render camera (if
# there are multiple renderable cameras in scene)
@ -625,7 +632,7 @@ def create_instances_for_aov(
instance,
skeleton,
aov_filter,
additional_color_data,
additional_data,
skip_integration_repre_list,
do_not_add_review,
frames_to_render
@ -936,16 +943,28 @@ def _create_instances_for_aov(
"stagingDir": staging_dir,
"fps": new_instance.get("fps"),
"tags": ["review"] if preview else [],
"colorspaceData": {
}
if colorspace and additional_data["colorspaceConfig"]:
# Only apply colorspace data if the image has a colorspace
colorspace_data: dict = {
"colorspace": colorspace,
"config": {
"path": additional_data["colorspaceConfig"],
"template": additional_data["colorspaceTemplate"]
},
"display": additional_data["display"],
"view": additional_data["view"]
}
}
# Display/View are optional
display = additional_data.get("display")
if display:
colorspace_data["display"] = display
view = additional_data.get("view")
if view:
colorspace_data["view"] = view
rep["colorspaceData"] = colorspace_data
else:
log.debug("No colorspace data for representation: {}".format(rep))
# support conversion from tiled to scanline
if instance.data.get("convertToScanline"):

View file

@ -840,14 +840,24 @@ class AbstractTemplateBuilder(ABC):
host_name = self.host_name
task_name = self.current_task_name
task_type = self.current_task_type
folder_path = self.current_folder_path
folder_type = None
folder_entity = self.current_folder_entity
if folder_entity:
folder_type = folder_entity["folderType"]
filter_data = {
"task_types": task_type,
"task_names": task_name,
"folder_types": folder_type,
"folder_paths": folder_path,
}
build_profiles = self._get_build_profiles()
profile = filter_profiles(
build_profiles,
{
"task_types": task_type,
"task_names": task_name
}
filter_data,
logger=self.log
)
if not profile:
raise TemplateProfileNotFound((
@ -1677,6 +1687,8 @@ class PlaceholderLoadMixin(object):
for version in get_last_versions(
project_name, filtered_product_ids, fields={"id"}
).values()
# Version may be none if a product has no versions
if version is not None
)
return list(get_representations(
project_name,

View file

@ -11,20 +11,6 @@ class CollectSceneLoadedVersions(pyblish.api.ContextPlugin):
order = pyblish.api.CollectorOrder + 0.0001
label = "Collect Versions Loaded in Scene"
hosts = [
"aftereffects",
"blender",
"celaction",
"fusion",
"harmony",
"hiero",
"houdini",
"maya",
"nuke",
"photoshop",
"resolve",
"tvpaint"
]
def process(self, context):
host = registered_host()

View file

@ -457,6 +457,9 @@ class IntegrateAsset(pyblish.api.InstancePlugin):
else:
version_data[key] = value
host_name = instance.context.data["hostName"]
version_data["host_name"] = host_name
version_entity = new_version_entity(
version_number,
product_entity["id"],

View file

@ -212,6 +212,11 @@ class ContextCardWidget(CardWidget):
icon_widget.setObjectName("ProductTypeIconLabel")
label_widget = QtWidgets.QLabel(f"<span>{CONTEXT_LABEL}</span>", self)
# HTML text will cause that label start catch mouse clicks
# - disabling with changing interaction flag
label_widget.setTextInteractionFlags(
QtCore.Qt.NoTextInteraction
)
icon_layout = QtWidgets.QHBoxLayout()
icon_layout.setContentsMargins(5, 5, 5, 5)

View file

@ -548,11 +548,17 @@ class _IconsCache:
elif icon_type == "ayon_url":
url = icon_def["url"].lstrip("/")
url = f"{ayon_api.get_base_url()}/{url}"
stream = io.BytesIO()
ayon_api.download_file_to_stream(url, stream)
pix = QtGui.QPixmap()
pix.loadFromData(stream.getvalue())
icon = QtGui.QIcon(pix)
try:
stream = io.BytesIO()
ayon_api.download_file_to_stream(url, stream)
pix = QtGui.QPixmap()
pix.loadFromData(stream.getvalue())
icon = QtGui.QIcon(pix)
except Exception:
log.warning(
"Failed to download image '%s'", url, exc_info=True
)
icon = None
elif icon_type == "transparent":
size = icon_def.get("size")

View file

@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring AYON addon 'core' version."""
__version__ = "1.6.9+dev"
__version__ = "1.6.10+dev"

View file

@ -1,6 +1,6 @@
name = "core"
title = "Core"
version = "1.6.9+dev"
version = "1.6.10+dev"
client_dir = "ayon_core"

View file

@ -5,7 +5,7 @@
[tool.poetry]
name = "ayon-core"
version = "1.6.9+dev"
version = "1.6.10+dev"
description = ""
authors = ["Ynput Team <team@ynput.io>"]
readme = "README.md"