From 7841e4ea98d3ba3a54340c087f3666e044880140 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 17 Jan 2023 16:57:19 +0100 Subject: [PATCH 1/3] global: collect subset resources for editorial source support --- openpype/plugins/publish/collect_otio_subset_resources.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openpype/plugins/publish/collect_otio_subset_resources.py b/openpype/plugins/publish/collect_otio_subset_resources.py index 3387cd1176..e72c12d9a9 100644 --- a/openpype/plugins/publish/collect_otio_subset_resources.py +++ b/openpype/plugins/publish/collect_otio_subset_resources.py @@ -1,4 +1,3 @@ -# TODO: this head doc string """ Requires: instance -> otio_clip @@ -153,6 +152,8 @@ class CollectOtioSubsetResources(pyblish.api.InstancePlugin): self.log.debug(collection) repre = self._create_representation( frame_start, frame_end, collection=collection) + + instance.data["originalBasename"] = collection.format("{head}") else: _trim = False dirname, filename = os.path.split(media_ref.target_url) @@ -167,6 +168,10 @@ class CollectOtioSubsetResources(pyblish.api.InstancePlugin): repre = self._create_representation( frame_start, frame_end, file=filename, trim=_trim) + instance.data["originalBasename"] = os.path.splitext(filename)[0] + + instance.data["originalDirname"] = self.staging_dir + if repre: # add representation to instance data instance.data["representations"].append(repre) From 6d19e74361881b4ffab1a2404039da66fc876827 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 17 Jan 2023 16:57:47 +0100 Subject: [PATCH 2/3] global: exception for source publishing renumbering --- openpype/plugins/publish/integrate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openpype/plugins/publish/integrate.py b/openpype/plugins/publish/integrate.py index 5f811ce002..dafcf44a6a 100644 --- a/openpype/plugins/publish/integrate.py +++ b/openpype/plugins/publish/integrate.py @@ -630,8 +630,12 @@ class IntegrateAsset(pyblish.api.InstancePlugin): # that `frameStart` index instead. Thus if that frame start # differs from the collection we want to shift the destination # frame indices from the source collection. + # In case source are published in place we need to skip renumbering repre_frame_start = repre.get("frameStart") - if repre_frame_start is not None: + if ( + "originalBasename" not in template + and repre_frame_start is not None + ): index_frame_start = int(repre["frameStart"]) # Shift destination sequence to the start frame destination_indexes = [ From b846aa50235e93fd19ba50f8996416e0e373806f Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 17 Jan 2023 17:08:47 +0100 Subject: [PATCH 3/3] flake8 fix --- openpype/plugins/publish/integrate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openpype/plugins/publish/integrate.py b/openpype/plugins/publish/integrate.py index dafcf44a6a..a869c18b8f 100644 --- a/openpype/plugins/publish/integrate.py +++ b/openpype/plugins/publish/integrate.py @@ -630,7 +630,8 @@ class IntegrateAsset(pyblish.api.InstancePlugin): # that `frameStart` index instead. Thus if that frame start # differs from the collection we want to shift the destination # frame indices from the source collection. - # In case source are published in place we need to skip renumbering + # In case source are published in place we need to + # skip renumbering repre_frame_start = repre.get("frameStart") if ( "originalBasename" not in template