mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 13:24:54 +01:00
Merge pull request #2548 from pypeclub/feature/extract_reveiew_metadata_update
This commit is contained in:
commit
abca1f413a
2 changed files with 37 additions and 8 deletions
|
|
@ -85,6 +85,28 @@ class ExtractOTIOReview(openpype.api.Extractor):
|
|||
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
|
||||
|
|
|
|||
|
|
@ -292,6 +292,21 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
|||
temp_data["frame_start"],
|
||||
temp_data["frame_end"])
|
||||
|
||||
# create or update outputName
|
||||
output_name = new_repre.get("outputName", "")
|
||||
output_ext = new_repre["ext"]
|
||||
if output_name:
|
||||
output_name += "_"
|
||||
output_name += output_def["filename_suffix"]
|
||||
if temp_data["without_handles"]:
|
||||
output_name += "_noHandles"
|
||||
|
||||
# add outputName to anatomy format fill_data
|
||||
fill_data.update({
|
||||
"output": output_name,
|
||||
"ext": output_ext
|
||||
})
|
||||
|
||||
try: # temporary until oiiotool is supported cross platform
|
||||
ffmpeg_args = self._ffmpeg_arguments(
|
||||
output_def, instance, new_repre, temp_data, fill_data
|
||||
|
|
@ -317,14 +332,6 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
|||
for f in files_to_clean:
|
||||
os.unlink(f)
|
||||
|
||||
output_name = new_repre.get("outputName", "")
|
||||
output_ext = new_repre["ext"]
|
||||
if output_name:
|
||||
output_name += "_"
|
||||
output_name += output_def["filename_suffix"]
|
||||
if temp_data["without_handles"]:
|
||||
output_name += "_noHandles"
|
||||
|
||||
new_repre.update({
|
||||
"name": "{}_{}".format(output_name, output_ext),
|
||||
"outputName": output_name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue