From 145688d56f28aee11ab9eb4e97e40a94a3926841 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Mon, 16 Dec 2024 10:27:01 +0100 Subject: [PATCH 1/7] Editorial: Fix clip_media source for review track. --- .../plugins/publish/collect_otio_subset_resources.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/plugins/publish/collect_otio_subset_resources.py b/client/ayon_core/plugins/publish/collect_otio_subset_resources.py index 2d8e91fe09..199e952769 100644 --- a/client/ayon_core/plugins/publish/collect_otio_subset_resources.py +++ b/client/ayon_core/plugins/publish/collect_otio_subset_resources.py @@ -178,7 +178,8 @@ class CollectOtioSubsetResources( repre = self._create_representation( frame_start, frame_end, collection=collection) - if "review" in instance.data["families"]: + if ("review" in instance.data["families"] and + not instance.data.get("otioReviewClips")): review_repre = self._create_representation( frame_start, frame_end, collection=collection, delete=True, review=True) @@ -197,7 +198,8 @@ class CollectOtioSubsetResources( repre = self._create_representation( frame_start, frame_end, file=filename, trim=_trim) - if "review" in instance.data["families"]: + if ("review" in instance.data["families"] and + not instance.data.get("otioReviewClips")): review_repre = self._create_representation( frame_start, frame_end, file=filename, delete=True, review=True) From 8b663ef4400fe99736da40b59a707ecf492f5437 Mon Sep 17 00:00:00 2001 From: Robin De Lillo Date: Mon, 16 Dec 2024 11:07:21 +0100 Subject: [PATCH 2/7] Apply suggestions from code review Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- .../plugins/publish/collect_otio_subset_resources.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/client/ayon_core/plugins/publish/collect_otio_subset_resources.py b/client/ayon_core/plugins/publish/collect_otio_subset_resources.py index 199e952769..0fb30326c6 100644 --- a/client/ayon_core/plugins/publish/collect_otio_subset_resources.py +++ b/client/ayon_core/plugins/publish/collect_otio_subset_resources.py @@ -178,8 +178,10 @@ class CollectOtioSubsetResources( repre = self._create_representation( frame_start, frame_end, collection=collection) - if ("review" in instance.data["families"] and - not instance.data.get("otioReviewClips")): + if ( + not instance.data.get("otioReviewClips") + and "review" in instance.data["families"] + ): review_repre = self._create_representation( frame_start, frame_end, collection=collection, delete=True, review=True) @@ -198,8 +200,10 @@ class CollectOtioSubsetResources( repre = self._create_representation( frame_start, frame_end, file=filename, trim=_trim) - if ("review" in instance.data["families"] and - not instance.data.get("otioReviewClips")): + if ( + not instance.data.get("otioReviewClips") + and "review" in instance.data["families"] + ): review_repre = self._create_representation( frame_start, frame_end, file=filename, delete=True, review=True) From ea292add98bae40e45388949207290bcc992788a Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Mon, 16 Dec 2024 22:56:27 +0100 Subject: [PATCH 3/7] Use underscore separator like in Maya settings `maya_dirmap`. Only other integration I can see that has dirmapping is Nuke, which uses just `dirmap` without host prefix - which I suppose would then be broken regardless. It may make more sense to remove the `host` specific prefix from the label because it's already looking in host specific settings anyway. --- client/ayon_core/host/dirmap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_core/host/dirmap.py b/client/ayon_core/host/dirmap.py index 19841845e7..c932c13c10 100644 --- a/client/ayon_core/host/dirmap.py +++ b/client/ayon_core/host/dirmap.py @@ -118,7 +118,7 @@ class HostDirmap(ABC): site, in that case configuration in Local Settings takes precedence """ - dirmap_label = "{}-dirmap".format(self.host_name) + dirmap_label = "{}_dirmap".format(self.host_name) mapping_sett = self.project_settings[self.host_name].get(dirmap_label, {}) local_mapping = self._get_local_sync_dirmap() From 5e503d0b51f3f587f369f877c52a304e907e7bec Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 17 Dec 2024 10:46:47 +0100 Subject: [PATCH 4/7] Remove host name prefix from dirmap settings mapping --- client/ayon_core/host/dirmap.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/ayon_core/host/dirmap.py b/client/ayon_core/host/dirmap.py index c932c13c10..3f02be6614 100644 --- a/client/ayon_core/host/dirmap.py +++ b/client/ayon_core/host/dirmap.py @@ -117,10 +117,7 @@ class HostDirmap(ABC): It checks if Site Sync is enabled and user chose to use local site, in that case configuration in Local Settings takes precedence """ - - dirmap_label = "{}_dirmap".format(self.host_name) - mapping_sett = self.project_settings[self.host_name].get(dirmap_label, - {}) + mapping_sett = self.project_settings[self.host_name].get("dirmap", {}) local_mapping = self._get_local_sync_dirmap() mapping_enabled = mapping_sett.get("enabled") or bool(local_mapping) if not mapping_enabled: From 037db5dbd31ab615f80600d5926bb2ec901f0bf5 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 20 Dec 2024 12:23:43 +0100 Subject: [PATCH 5/7] Store in instance data whether the staging dir set is a custom one --- client/ayon_core/pipeline/publish/lib.py | 1 + client/ayon_core/pipeline/staging_dir.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/pipeline/publish/lib.py b/client/ayon_core/pipeline/publish/lib.py index ecdcc0f0c1..586b90a3fd 100644 --- a/client/ayon_core/pipeline/publish/lib.py +++ b/client/ayon_core/pipeline/publish/lib.py @@ -717,6 +717,7 @@ def get_instance_staging_dir(instance): instance.data.update({ "stagingDir": staging_dir_path, "stagingDir_persistent": staging_dir_info.persistent, + "stagingDir_custom": staging_dir_info.custom }) return staging_dir_path diff --git a/client/ayon_core/pipeline/staging_dir.py b/client/ayon_core/pipeline/staging_dir.py index ea22d99389..83878f17a2 100644 --- a/client/ayon_core/pipeline/staging_dir.py +++ b/client/ayon_core/pipeline/staging_dir.py @@ -12,6 +12,7 @@ from .tempdir import get_temp_dir class StagingDir: directory: str persistent: bool + custom: bool # Whether the staging dir is a custom staging dir def get_staging_dir_config( @@ -204,7 +205,8 @@ def get_staging_dir_info( dir_template = staging_dir_config["template"]["directory"] return StagingDir( dir_template.format_strict(ctx_data), - staging_dir_config["persistence"], + persistent=staging_dir_config["persistence"], + custom=True ) # no config found but force an output @@ -216,7 +218,8 @@ def get_staging_dir_info( prefix=prefix, suffix=suffix, ), - False, + persistent=False, + custom=False ) return None From 58d3852f2893e87cc16f47e81112232c2282f4e4 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 7 Jan 2025 06:27:26 +0100 Subject: [PATCH 6/7] Fix red dot for FORCE_NOT_OPEN_WORKFILE_ROLE to be drawn on wrong location if app is not on first row --- client/ayon_core/tools/launcher/ui/actions_widget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_core/tools/launcher/ui/actions_widget.py b/client/ayon_core/tools/launcher/ui/actions_widget.py index 2ffce13292..c64d718172 100644 --- a/client/ayon_core/tools/launcher/ui/actions_widget.py +++ b/client/ayon_core/tools/launcher/ui/actions_widget.py @@ -265,7 +265,7 @@ class ActionDelegate(QtWidgets.QStyledItemDelegate): if index.data(FORCE_NOT_OPEN_WORKFILE_ROLE): rect = QtCore.QRectF( - option.rect.x(), option.rect.height(), 5, 5) + option.rect.x(), option.rect.y() + option.rect.height(), 5, 5) painter.setPen(QtCore.Qt.NoPen) painter.setBrush(QtGui.QColor(200, 0, 0)) painter.drawEllipse(rect) From 2a22bbb0773700f818ab1f1e7dc4c981f5037373 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Wed, 8 Jan 2025 11:52:45 +0100 Subject: [PATCH 7/7] Fix Anatomy.format_all with unpadded int values. --- client/ayon_core/lib/path_templates.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/client/ayon_core/lib/path_templates.py b/client/ayon_core/lib/path_templates.py index e3cae78a87..057889403c 100644 --- a/client/ayon_core/lib/path_templates.py +++ b/client/ayon_core/lib/path_templates.py @@ -561,9 +561,6 @@ class FormattingPart: """ key = self._template_base - if key in result.really_used_values: - result.add_output(result.really_used_values[key]) - return result # ensure key is properly formed [({})] properly closed. if not self.validate_key_is_matched(key):