From 71d37d8b59ee3be0b5dcb784b4b478d40c5d2288 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 23 Apr 2025 14:04:41 +0200 Subject: [PATCH 1/6] Updated command creation Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- client/ayon_core/plugins/publish/extract_review.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/ayon_core/plugins/publish/extract_review.py b/client/ayon_core/plugins/publish/extract_review.py index 3615cc53c9..a4eb1140ac 100644 --- a/client/ayon_core/plugins/publish/extract_review.py +++ b/client/ayon_core/plugins/publish/extract_review.py @@ -1079,9 +1079,8 @@ class ExtractReview(pyblish.api.InstancePlugin): """Fills missing files by blank frame.""" blank_frame_path = os.path.join(staging_dir, f"blank.{extension}") temp_data["paths_to_remove"].append(blank_frame_path) - command = get_ffmpeg_tool_args("ffmpeg") - - command.extend([ + command = get_ffmpeg_tool_args( + "ffmpeg", "-f", "lavfi", "-i", "color=c=black:s={}x{}:d=1".format( resolution_width, resolution_height @@ -1089,7 +1088,7 @@ class ExtractReview(pyblish.api.InstancePlugin): "-tune", "stillimage", "-frames:v", "1", blank_frame_path - ]) + ) self.log.debug("Executing: {}".format(" ".join(command))) output = run_subprocess( From c53de6d226ff48b8c30baaf4889563eb373e058f Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 23 Apr 2025 14:05:08 +0200 Subject: [PATCH 2/6] Formatting change Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- server/settings/publish_plugins.py | 1 + 1 file changed, 1 insertion(+) diff --git a/server/settings/publish_plugins.py b/server/settings/publish_plugins.py index d487649f65..dbbbb9609d 100644 --- a/server/settings/publish_plugins.py +++ b/server/settings/publish_plugins.py @@ -20,6 +20,7 @@ def _handle_missing_frames_enum(): {"value": "only_rendered", "label": "Use only rendered"}, ] + class EnabledModel(BaseSettingsModel): enabled: bool = SettingsField(True) From 46d27ff7a4942fee39edf42ccab72cc05226fe40 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 23 Apr 2025 14:05:24 +0200 Subject: [PATCH 3/6] Formatting change Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- server/settings/publish_plugins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/settings/publish_plugins.py b/server/settings/publish_plugins.py index dbbbb9609d..cbe3894975 100644 --- a/server/settings/publish_plugins.py +++ b/server/settings/publish_plugins.py @@ -651,7 +651,7 @@ class ExtractReviewOutputDefModel(BaseSettingsModel): default_factory=ExtractReviewLetterBox, title="Letter Box" ) - fill_missing_frames:str = SettingsField( + fill_missing_frames: str = SettingsField( title="Handle missing frames", default="closest_existing", description="How to handle frames that are missing from entity frame " From 6d008edbada3d1ac3776b1ae51dc044c6454cb25 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 23 Apr 2025 14:05:56 +0200 Subject: [PATCH 4/6] Refactor first file query Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- client/ayon_core/plugins/publish/extract_review.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_core/plugins/publish/extract_review.py b/client/ayon_core/plugins/publish/extract_review.py index a4eb1140ac..265bbb0828 100644 --- a/client/ayon_core/plugins/publish/extract_review.py +++ b/client/ayon_core/plugins/publish/extract_review.py @@ -1205,7 +1205,7 @@ class ExtractReview(pyblish.api.InstancePlugin): filled_files = temp_data["filled_files"] if filled_files: - first_frame, first_file = list(filled_files.items())[0] + first_frame, first_file = next(iter(filled_files.items())) if first_file < full_input_path_single_file: self.log.warning(f"Using filled frame: '{first_file}'") full_input_path_single_file = first_file From cc1ba078ed9f65608eb2a3035597bcf25c668d51 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 23 Apr 2025 14:07:33 +0200 Subject: [PATCH 5/6] Changed variable name Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- client/ayon_core/plugins/publish/extract_review.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/plugins/publish/extract_review.py b/client/ayon_core/plugins/publish/extract_review.py index 265bbb0828..48bb2819ff 100644 --- a/client/ayon_core/plugins/publish/extract_review.py +++ b/client/ayon_core/plugins/publish/extract_review.py @@ -819,8 +819,8 @@ class ExtractReview(pyblish.api.InstancePlugin): staging_dir, "explicit_frames.txt") with open(explicit_frames_path, "w") as fp: lines = [ - f"file {file}" - for file in temp_data["explicit_input_paths"] + f"file {path}" + for path in temp_data["explicit_input_paths"] ] fp.write("\n".join(lines)) temp_data["paths_to_remove"].append(explicit_frames_path) From 24ec921ff6abce87a11f34a1162c11c310fbb634 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 23 Apr 2025 14:08:18 +0200 Subject: [PATCH 6/6] Formatting change Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- client/ayon_core/plugins/publish/extract_review.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_core/plugins/publish/extract_review.py b/client/ayon_core/plugins/publish/extract_review.py index 48bb2819ff..cec6dd742c 100644 --- a/client/ayon_core/plugins/publish/extract_review.py +++ b/client/ayon_core/plugins/publish/extract_review.py @@ -829,7 +829,7 @@ class ExtractReview(pyblish.api.InstancePlugin): ffmpeg_input_args.extend([ "-f", "concat", "-safe", "0", - "-fflags", "+genpts+igndts", + "-fflags", "+genpts+igndts", "-i", path_to_subprocess_arg(explicit_frames_path), "-r", "25" ])