Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
global: improving source resolution of gap img
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubjezek001 committed Jan 19, 2022
1 parent 49de654 commit 34fa94f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions openpype/plugins/publish/extract_otio_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,28 @@ def process(self, instance):
for index, r_otio_cl in enumerate(otio_review_clips):
# QUESTION: what if transition on clip?

# check if resolution is the same
width = self.to_width
height = self.to_height
otio_media = r_otio_cl.media_reference
media_metadata = otio_media.metadata

# get from media reference metadata source
if media_metadata.get("openpype.source.width"):
width = int(media_metadata.get("openpype.source.width"))
if media_metadata.get("openpype.source.height"):
height = int(media_metadata.get("openpype.source.height"))

# compare and reset
if width != self.to_width:
self.to_width = width
if height != self.to_height:
self.to_height = height

self.log.debug("> self.to_width x self.to_height: {} x {}".format(
self.to_width, self.to_height
))

# get frame range values
src_range = r_otio_cl.source_range
start = src_range.start_time.value
Expand Down

0 comments on commit 34fa94f

Please sign in to comment.