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) diff --git a/openpype/plugins/publish/integrate.py b/openpype/plugins/publish/integrate.py index 5f811ce002..a869c18b8f 100644 --- a/openpype/plugins/publish/integrate.py +++ b/openpype/plugins/publish/integrate.py @@ -630,8 +630,13 @@ 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 = [