From 698aca8656a6dbd3404a37106b728aa0344f6b9b Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Tue, 24 Jun 2025 15:42:32 +0200 Subject: [PATCH 1/3] Extract source_resolution_* fields on representation Comes from requirement for sources from freelancers uploaded from TP or WP. --- client/ayon_core/plugins/publish/extract_review.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/ayon_core/plugins/publish/extract_review.py b/client/ayon_core/plugins/publish/extract_review.py index 89bc56c670..d650ff7688 100644 --- a/client/ayon_core/plugins/publish/extract_review.py +++ b/client/ayon_core/plugins/publish/extract_review.py @@ -1598,6 +1598,10 @@ class ExtractReview(pyblish.api.InstancePlugin): "FFprobe couldn't read resolution from input file: \"{}\"" ).format(full_input_path_single_file)) + # collect source values to be potentially used in burnins later + new_repre["source_resolution_width"] = input_width + new_repre["source_resolution_height"] = input_height + # NOTE Setting only one of `width` or `height` is not allowed # - settings value can't have None but has value of 0 output_width = output_def["width"] or output_width or None From 3daa7263ada61b883d805b266f78d91d08fe31d8 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Tue, 24 Jun 2025 15:43:10 +0200 Subject: [PATCH 2/3] Provide new templates source_resolution_* for burnin text --- client/ayon_core/plugins/publish/extract_burnin.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/ayon_core/plugins/publish/extract_burnin.py b/client/ayon_core/plugins/publish/extract_burnin.py index 3f7c2f4cba..fa7fd4e504 100644 --- a/client/ayon_core/plugins/publish/extract_burnin.py +++ b/client/ayon_core/plugins/publish/extract_burnin.py @@ -757,6 +757,15 @@ class ExtractBurnin(publish.Extractor): ) }) + # burnin source resolution which might be different than on review + repre_source_resolution_width = repre.get("source_resolution_width") + repre_source_resolution_height = repre.get("source_resolution_height") + if repre_source_resolution_width and repre_source_resolution_height: + burnin_data.update({ + "source_resolution_width": repre_source_resolution_width, + "source_resolution_height": repre_source_resolution_height + }) + def filter_burnins_defs(self, profile, instance): """Filter outputs by their values from settings. From e9bc6e07f487d688bbd066f74b430a6b4036e928 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 25 Jun 2025 11:40:58 +0200 Subject: [PATCH 3/3] Do not overwrite if previously collected Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- client/ayon_core/plugins/publish/extract_review.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/plugins/publish/extract_review.py b/client/ayon_core/plugins/publish/extract_review.py index d650ff7688..0ee4cbff07 100644 --- a/client/ayon_core/plugins/publish/extract_review.py +++ b/client/ayon_core/plugins/publish/extract_review.py @@ -1599,8 +1599,10 @@ class ExtractReview(pyblish.api.InstancePlugin): ).format(full_input_path_single_file)) # collect source values to be potentially used in burnins later - new_repre["source_resolution_width"] = input_width - new_repre["source_resolution_height"] = input_height + if "source_resolution_width" not in new_repre: + new_repre["source_resolution_width"] = input_width + if "source_resolution_height" not in new_repre: + new_repre["source_resolution_height"] = input_height # NOTE Setting only one of `width` or `height` is not allowed # - settings value can't have None but has value of 0