mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Merge branch 'develop' of https://github.com/ynput/ayon-core into 1291-ay-7846_extractoiiotranscode-convert-exr-to-scanline-whilst-keeping-all-channels
This commit is contained in:
commit
dcb39eb912
11 changed files with 100 additions and 48 deletions
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
|
@ -35,6 +35,8 @@ 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
|
||||
- 1.6.7
|
||||
|
|
|
|||
|
|
@ -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"):
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Package declaring AYON addon 'core' version."""
|
||||
__version__ = "1.6.9+dev"
|
||||
__version__ = "1.6.11+dev"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
name = "core"
|
||||
title = "Core"
|
||||
version = "1.6.9+dev"
|
||||
version = "1.6.11+dev"
|
||||
|
||||
client_dir = "ayon_core"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
[tool.poetry]
|
||||
name = "ayon-core"
|
||||
version = "1.6.9+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