Merge pull request #4333 from ynput/bugfix/OP-4369-fixing-inplace-publishing-editorial

This commit is contained in:
Jakub Ježek 2023-01-20 11:48:36 +01:00 committed by GitHub
commit 439a2b4781
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -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)

View file

@ -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 = [