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

Burnins: Refactored burnins script #5094

Merged
merged 13 commits into from
Jun 22, 2023
20 changes: 13 additions & 7 deletions openpype/plugins/publish/extract_burnin.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,16 @@ def main_process(self, instance):
first_output = True

files_to_delete = []

repre_burnin_options = copy.deepcopy(burnin_options)
# Use fps from representation for output in options
fps = repre.get("fps")
if fps is not None:
repre_burnin_options["fps"] = fps
# TODO Should we use fps from source representation to fill
# it in review?
# burnin_data["fps"] = fps

for filename_suffix, burnin_def in repre_burnin_defs.items():
new_repre = copy.deepcopy(repre)
new_repre["stagingDir"] = src_repre_staging_dir
Expand Down Expand Up @@ -308,7 +318,7 @@ def main_process(self, instance):
"input": temp_data["full_input_path"],
"output": temp_data["full_output_path"],
"burnin_data": burnin_data,
"options": copy.deepcopy(burnin_options),
"options": repre_burnin_options,
"values": burnin_values,
"full_input_path": temp_data["full_input_paths"][0],
"first_frame": temp_data["first_frame"],
Expand Down Expand Up @@ -463,15 +473,11 @@ def prepare_basic_data(self, instance):

handle_start = instance.data.get("handleStart")
if handle_start is None:
handle_start = context.data.get("handleStart")
if handle_start is None:
handle_start = handles
handle_start = context.data.get("handleStart") or 0

handle_end = instance.data.get("handleEnd")
if handle_end is None:
handle_end = context.data.get("handleEnd")
if handle_end is None:
handle_end = handles
handle_end = context.data.get("handleEnd") or 0

frame_start_handle = frame_start - handle_start
frame_end_handle = frame_end + handle_end
Expand Down
Loading