From 5c0d866c1efa4b194b0b0534ac1dd410042f8ad2 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Fri, 9 Feb 2024 14:50:53 +0100 Subject: [PATCH] fusion is handling AYON settings in code --- client/ayon_core/hosts/fusion/api/plugin.py | 11 ++++++- client/ayon_core/settings/ayon_settings.py | 33 --------------------- 2 files changed, 10 insertions(+), 34 deletions(-) diff --git a/client/ayon_core/hosts/fusion/api/plugin.py b/client/ayon_core/hosts/fusion/api/plugin.py index 12a29d2986..5d7a9dd87d 100644 --- a/client/ayon_core/hosts/fusion/api/plugin.py +++ b/client/ayon_core/hosts/fusion/api/plugin.py @@ -148,7 +148,16 @@ class GenericCreateSaver(Creator): }) # build file path to render - filepath = self.temp_rendering_path_template.format(**formatting_data) + # TODO make sure the keys are available in 'formatting_data' + temp_rendering_path_template = ( + self.temp_rendering_path_template + .replace("{product[name]}", "{subset}") + .replace("{product[type]}", "{family}") + .replace("{folder[name]}", "{asset}") + .replace("{task[name]}", "{task}") + ) + + filepath = temp_rendering_path_template.format(**formatting_data) comp = get_current_comp() tool["Clip"] = comp.ReverseMapPath(os.path.normpath(filepath)) diff --git a/client/ayon_core/settings/ayon_settings.py b/client/ayon_core/settings/ayon_settings.py index e2e569c233..39b0b117f7 100644 --- a/client/ayon_core/settings/ayon_settings.py +++ b/client/ayon_core/settings/ayon_settings.py @@ -324,39 +324,6 @@ def _convert_fusion_project_settings(ayon_settings, output): ayon_fusion = ayon_settings["fusion"] _convert_host_imageio(ayon_fusion) - ayon_imageio_fusion = ayon_fusion["imageio"] - - if "ocioSettings" in ayon_imageio_fusion: - ayon_ocio_setting = ayon_imageio_fusion.pop("ocioSettings") - paths = ayon_ocio_setting.pop("ocioPathModel") - for key, value in tuple(paths.items()): - new_value = [] - if value: - new_value.append(value) - paths[key] = new_value - - ayon_ocio_setting["configFilePath"] = paths - ayon_imageio_fusion["ocio"] = ayon_ocio_setting - elif "ocio" in ayon_imageio_fusion: - paths = ayon_imageio_fusion["ocio"].pop("configFilePath") - for key, value in tuple(paths.items()): - new_value = [] - if value: - new_value.append(value) - paths[key] = new_value - ayon_imageio_fusion["ocio"]["configFilePath"] = paths - - _convert_host_imageio(ayon_imageio_fusion) - - ayon_create_saver = ayon_fusion["create"]["CreateSaver"] - ayon_create_saver["temp_rendering_path_template"] = ( - ayon_create_saver["temp_rendering_path_template"] - .replace("{product[name]}", "{subset}") - .replace("{product[type]}", "{family}") - .replace("{folder[name]}", "{asset}") - .replace("{task[name]}", "{task}") - ) - output["fusion"] = ayon_fusion