From d2eeb317565bc9de52a9778304ee3e7f411a2d50 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 2 Jun 2021 16:13:42 +0200 Subject: [PATCH] Global: brushing code --- openpype/plugins/publish/collect_otio_review.py | 9 ++++----- openpype/plugins/publish/extract_otio_review.py | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/openpype/plugins/publish/collect_otio_review.py b/openpype/plugins/publish/collect_otio_review.py index 240e932488..e534da5360 100644 --- a/openpype/plugins/publish/collect_otio_review.py +++ b/openpype/plugins/publish/collect_otio_review.py @@ -37,7 +37,7 @@ class CollectOcioReview(pyblish.api.InstancePlugin): otio_tl_range = otio_clip.range_in_parent() # calculate real timeline end needed for the clip - clip_end_frame = int( + clip_frame_end = int( otio_tl_range.start_time.value + otio_tl_range.duration.value) # skip if no review track available @@ -57,13 +57,12 @@ class CollectOcioReview(pyblish.api.InstancePlugin): track_rip = track.range_in_parent() # calculate real track end frame - track_end_frame = int( - track_rip.start_time.value + track_rip.duration.value) + track_frame_end = int(track_rip.end_time_exclusive().value) # check if the end of track is not lower then clip requirement - if clip_end_frame > track_end_frame: + if clip_frame_end > track_frame_end: # calculate diference duration - gap_duration = clip_end_frame - track_end_frame + gap_duration = clip_frame_end - track_frame_end # create rational time range for gap otio_gap_range = otio.opentime.TimeRange( start_time=otio.opentime.RationalTime( diff --git a/openpype/plugins/publish/extract_otio_review.py b/openpype/plugins/publish/extract_otio_review.py index 2f46bcb375..818903b54b 100644 --- a/openpype/plugins/publish/extract_otio_review.py +++ b/openpype/plugins/publish/extract_otio_review.py @@ -51,7 +51,6 @@ class ExtractOTIOReview(openpype.api.Extractor): def process(self, instance): # TODO: convert resulting image sequence to mp4 - # TODO: add oudio ouput to the mp4 if audio in review is on. # get otio clip and other time info from instance clip # TODO: what if handles are different in `versionData`?