From 49d15156799dc5f8338ad51cea7689a2174d1a3d Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Mon, 9 Dec 2024 18:49:56 -0500 Subject: [PATCH 1/5] AY-7222 Fix otio_review no handles and tempdir for Resolve --- client/ayon_core/pipeline/tempdir.py | 13 +++++++++++++ .../plugins/publish/extract_otio_review.py | 7 ++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/client/ayon_core/pipeline/tempdir.py b/client/ayon_core/pipeline/tempdir.py index fe057b7fc7..7fb539bf0b 100644 --- a/client/ayon_core/pipeline/tempdir.py +++ b/client/ayon_core/pipeline/tempdir.py @@ -5,6 +5,7 @@ Temporary folder operations import os import tempfile from pathlib import Path +import warnings from ayon_core.lib import StringTemplate from ayon_core.pipeline import Anatomy @@ -70,6 +71,18 @@ def _create_local_staging_dir(prefix, suffix, dirpath=None): ) +def create_custom_tempdir(project_name, anatomy): + """ Deprecated 09/12/2024, here for backward-compatibility with Resolve. + """ + warnings.warn( + "Used deprecated 'create_custom_tempdir' " + "use 'ayon_core.pipeline.tempdir.get_temp_dir' instead.", + DeprecationWarning, + ) + + return _create_custom_tempdir(project_name, anatomy) + + def _create_custom_tempdir(project_name, anatomy): """ Create custom tempdir diff --git a/client/ayon_core/plugins/publish/extract_otio_review.py b/client/ayon_core/plugins/publish/extract_otio_review.py index c8d2086865..712ae7a886 100644 --- a/client/ayon_core/plugins/publish/extract_otio_review.py +++ b/client/ayon_core/plugins/publish/extract_otio_review.py @@ -71,15 +71,16 @@ class ExtractOTIOReview( # TODO: convert resulting image sequence to mp4 # get otio clip and other time info from instance clip - # TODO: what if handles are different in `versionData`? - handle_start = instance.data["handleStart"] - handle_end = instance.data["handleEnd"] otio_review_clips = instance.data.get("otioReviewClips") if otio_review_clips is None: self.log.info(f"Instance `{instance}` has no otioReviewClips") return + # TODO: what if handles are different in `versionData`? + handle_start = instance.data["handleStart"] + handle_end = instance.data["handleEnd"] + # add plugin wide attributes self.representation_files = [] self.used_frames = [] From f29f8748af94b21112802338eafe3c7fba9ec62d Mon Sep 17 00:00:00 2001 From: Robin De Lillo Date: Wed, 11 Dec 2024 10:50:37 -0500 Subject: [PATCH 2/5] Apply suggestions from code review Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- client/ayon_core/pipeline/tempdir.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/pipeline/tempdir.py b/client/ayon_core/pipeline/tempdir.py index 7fb539bf0b..cd7db852a1 100644 --- a/client/ayon_core/pipeline/tempdir.py +++ b/client/ayon_core/pipeline/tempdir.py @@ -71,8 +71,8 @@ def _create_local_staging_dir(prefix, suffix, dirpath=None): ) -def create_custom_tempdir(project_name, anatomy): - """ Deprecated 09/12/2024, here for backward-compatibility with Resolve. +def create_custom_tempdir(project_name, anatomy=None): + """Backward compatibility deprecated since 2024/12/09. """ warnings.warn( "Used deprecated 'create_custom_tempdir' " From 46fcc29af138d980857adf3198408f473b6fa1e6 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Wed, 11 Dec 2024 10:59:57 -0500 Subject: [PATCH 3/5] Address feedback from PR. --- client/ayon_core/pipeline/tempdir.py | 3 +++ .../ayon_core/plugins/publish/collect_otio_subset_resources.py | 1 + 2 files changed, 4 insertions(+) diff --git a/client/ayon_core/pipeline/tempdir.py b/client/ayon_core/pipeline/tempdir.py index cd7db852a1..38b03f5c85 100644 --- a/client/ayon_core/pipeline/tempdir.py +++ b/client/ayon_core/pipeline/tempdir.py @@ -80,6 +80,9 @@ def create_custom_tempdir(project_name, anatomy=None): DeprecationWarning, ) + if anatomy is None: + anatomy = Anatomy(project_name) + return _create_custom_tempdir(project_name, anatomy) diff --git a/client/ayon_core/plugins/publish/collect_otio_subset_resources.py b/client/ayon_core/plugins/publish/collect_otio_subset_resources.py index 2d8e91fe09..10a7d53971 100644 --- a/client/ayon_core/plugins/publish/collect_otio_subset_resources.py +++ b/client/ayon_core/plugins/publish/collect_otio_subset_resources.py @@ -157,6 +157,7 @@ class CollectOtioSubsetResources( self.staging_dir = media_ref.target_url_base head = media_ref.name_prefix tail = media_ref.name_suffix + import rpdb ; rpdb.Rpdb().set_trace() collection = clique.Collection( head=head, tail=tail, From 80057ebf8a37bd551c5280846566ebb9bf48292e Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Wed, 11 Dec 2024 11:04:06 -0500 Subject: [PATCH 4/5] Fix lint. --- .../ayon_core/plugins/publish/collect_otio_subset_resources.py | 1 - 1 file changed, 1 deletion(-) diff --git a/client/ayon_core/plugins/publish/collect_otio_subset_resources.py b/client/ayon_core/plugins/publish/collect_otio_subset_resources.py index 10a7d53971..2d8e91fe09 100644 --- a/client/ayon_core/plugins/publish/collect_otio_subset_resources.py +++ b/client/ayon_core/plugins/publish/collect_otio_subset_resources.py @@ -157,7 +157,6 @@ class CollectOtioSubsetResources( self.staging_dir = media_ref.target_url_base head = media_ref.name_prefix tail = media_ref.name_suffix - import rpdb ; rpdb.Rpdb().set_trace() collection = clique.Collection( head=head, tail=tail, From cb39512b868a5960e7b18eea5015c004be8d531c Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Thu, 12 Dec 2024 13:44:26 +0200 Subject: [PATCH 5/5] add houdini to thumbnail extraction --- client/ayon_core/plugins/publish/extract_thumbnail.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/plugins/publish/extract_thumbnail.py b/client/ayon_core/plugins/publish/extract_thumbnail.py index 37bbac8898..8ae18f4abf 100644 --- a/client/ayon_core/plugins/publish/extract_thumbnail.py +++ b/client/ayon_core/plugins/publish/extract_thumbnail.py @@ -37,7 +37,8 @@ class ExtractThumbnail(pyblish.api.InstancePlugin): "substancepainter", "nuke", "aftereffects", - "unreal" + "unreal", + "houdini" ] enabled = False