From 31a9436a281ae7bb67b4468b1c1e6f4003c08a77 Mon Sep 17 00:00:00 2001 From: Tadeas Hejnic Date: Mon, 20 Apr 2026 14:35:11 +0200 Subject: [PATCH 1/2] apply the changes of the variable names --- client/ayon_usd/hooks/usd_pinning_root.py | 8 ++++---- .../plugins/publish/extract_skeleton_pinning_json.py | 8 ++++---- .../usd/pinning/_pinning_file_generation_funcs.py | 10 +++++----- client/ayon_usd/utils.py | 6 +++--- docs/Ayon_Docs/Dev_Docs.md | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/client/ayon_usd/hooks/usd_pinning_root.py b/client/ayon_usd/hooks/usd_pinning_root.py index 8f0a0eb..4346091 100644 --- a/client/ayon_usd/hooks/usd_pinning_root.py +++ b/client/ayon_usd/hooks/usd_pinning_root.py @@ -13,16 +13,16 @@ class UsdPinningRoot(PreLaunchHook): def execute(self) -> None: """Set environments necessary for pinning.""" - if not self.launch_context.env.get("PINNING_FILE_PATH"): + if not self.launch_context.env.get("AYON_USD_RESOLVER_PINNING_FILE"): return anatomy = self.data["anatomy"] - self.launch_context.env["PINNING_FILE_PATH"] = anatomy.fill_root( - self.launch_context.env.get("PINNING_FILE_PATH"), + self.launch_context.env["AYON_USD_RESOLVER_PINNING_FILE"] = anatomy.fill_root( + self.launch_context.env.get("AYON_USD_RESOLVER_PINNING_FILE"), ) roots = anatomy.roots self.launch_context.env[ - "PROJECT_ROOTS" + "AYON_USD_RESOLVER_PINNING_ROOTS" ] = ",".join(f"{key}={value}" for key, value in roots.items()) diff --git a/client/ayon_usd/plugins/publish/extract_skeleton_pinning_json.py b/client/ayon_usd/plugins/publish/extract_skeleton_pinning_json.py index 80f3cdc..19d50bb 100644 --- a/client/ayon_usd/plugins/publish/extract_skeleton_pinning_json.py +++ b/client/ayon_usd/plugins/publish/extract_skeleton_pinning_json.py @@ -60,12 +60,12 @@ def process(self, instance: pyblish.api.Instance) -> None: os.path.dirname(usd_file_path), pin_file_name ) - project_roots = ayon_api.get_project_roots_by_site_id( + AYON_USD_RESOLVER_PINNING_ROOTS = ayon_api.get_AYON_USD_RESOLVER_PINNING_ROOTS_by_site_id( instance.context.data["projectName"] ) generate_pinning_file( usd_file_path, - project_roots, + AYON_USD_RESOLVER_PINNING_ROOTS, pin_file_path ) @@ -77,8 +77,8 @@ def process(self, instance: pyblish.api.Instance) -> None: FARM_JOB_ENV_DATA_KEY, {} ) farm_job_data.update({ - "PINNING_FILE_PATH": pin_file_path, - "ENABLE_STATIC_GLOBAL_CACHE": "1", + "AYON_USD_RESOLVER_PINNING_FILE": pin_file_path, + "AYON_USD_RESOLVER_ENABLE_PINNING": "1", }) def get_usd_file_path(self, instance): diff --git a/client/ayon_usd/standalone/usd/pinning/_pinning_file_generation_funcs.py b/client/ayon_usd/standalone/usd/pinning/_pinning_file_generation_funcs.py index 1827181..08c821a 100644 --- a/client/ayon_usd/standalone/usd/pinning/_pinning_file_generation_funcs.py +++ b/client/ayon_usd/standalone/usd/pinning/_pinning_file_generation_funcs.py @@ -301,7 +301,7 @@ def _write_pinning_file( def generate_pinning_file( - entry_usd: str, root_info: Dict[str, str], pinning_file_path: str + entry_usd: str, root_info: Dict[str, str], AYON_USD_RESOLVER_PINNING_FILE: str ): """Generate a AYON USD Resolver pinning file. @@ -315,13 +315,13 @@ def generate_pinning_file( root_info: The project roots for the site the pinning should resolve to. These can be obtained via e.g. the AYON REST API get `/api/projects/{project_name}/siteRoots". - pinning_file_path: The destination path to write the pinning file to. + AYON_USD_RESOLVER_PINNING_FILE: The destination path to write the pinning file to. """ - if not pinning_file_path.endswith(".json"): + if not AYON_USD_RESOLVER_PINNING_FILE.endswith(".json"): raise RuntimeError( - f"Pinning file path is not a json file {pinning_file_path}") + f"Pinning file path is not a json file {AYON_USD_RESOLVER_PINNING_FILE}") # Assume that the environment sets up the correct default AyonUsdResolver resolver = Ar.GetResolver() @@ -344,6 +344,6 @@ def generate_pinning_file( ) _write_pinning_file( - pinning_file_path, + AYON_USD_RESOLVER_PINNING_FILE, rootless_pinning_data, ) diff --git a/client/ayon_usd/utils.py b/client/ayon_usd/utils.py index c629a8e..0cce3cb 100644 --- a/client/ayon_usd/utils.py +++ b/client/ayon_usd/utils.py @@ -210,9 +210,9 @@ def _append(_env: dict, key: str, path: str): resolver_settings = settings["usd"]["ayon_usd_resolver"] return { "TF_DEBUG": settings["usd"]["usd"]["usd_tf_debug"], - "AYONLOGGERLOGLVL": resolver_settings["ayon_log_lvl"], - "AYONLOGGERSFILELOGGING": resolver_settings["ayon_file_logger_enabled"], # noqa - "AYONLOGGERSFILEPOS": resolver_settings["file_logger_file_path"], + "AYON_USD_RESOLVER_LOG_LVL": resolver_settings["ayon_log_lvl"], + "AYON_USD_RESOLVER_LOG_FILE_ENABLED": resolver_settings["ayon_file_logger_enabled"], # noqa + "AYON_USD_RESOLVER_LOG_FILE": resolver_settings["file_logger_file_path"], "AYON_LOGGIN_LOGGIN_KEYS": resolver_settings["ayon_logger_logging_keys"], # noqa "PXR_PLUGINPATH_NAME": pxr_pluginpath_name, "PYTHONPATH": python_path, diff --git a/docs/Ayon_Docs/Dev_Docs.md b/docs/Ayon_Docs/Dev_Docs.md index a2064c4..f01cbb5 100644 --- a/docs/Ayon_Docs/Dev_Docs.md +++ b/docs/Ayon_Docs/Dev_Docs.md @@ -29,7 +29,7 @@ creates a pinning file JSON from a given USD stage ```py def generate_pinning_file( - entry_usd: str, root_info: Dict[str, str], pinning_file_path: str + entry_usd: str, root_info: Dict[str, str], AYON_USD_RESOLVER_PINNING_FILE: str ): ``` From 32de05340797a6ce13e77dceb63688213972f762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tade=C3=A1=C5=A1=20Hejnic?= <65614308+tadeas-hejnic@users.noreply.github.com> Date: Mon, 20 Apr 2026 21:36:41 +0200 Subject: [PATCH 2/2] Update client/ayon_usd/plugins/publish/extract_skeleton_pinning_json.py Co-authored-by: Mustafa Zaky Jafar --- .../ayon_usd/plugins/publish/extract_skeleton_pinning_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_usd/plugins/publish/extract_skeleton_pinning_json.py b/client/ayon_usd/plugins/publish/extract_skeleton_pinning_json.py index 19d50bb..24ff5a6 100644 --- a/client/ayon_usd/plugins/publish/extract_skeleton_pinning_json.py +++ b/client/ayon_usd/plugins/publish/extract_skeleton_pinning_json.py @@ -60,7 +60,7 @@ def process(self, instance: pyblish.api.Instance) -> None: os.path.dirname(usd_file_path), pin_file_name ) - AYON_USD_RESOLVER_PINNING_ROOTS = ayon_api.get_AYON_USD_RESOLVER_PINNING_ROOTS_by_site_id( + AYON_USD_RESOLVER_PINNING_ROOTS = ayon_api.get_project_roots_by_site_id( instance.context.data["projectName"] ) generate_pinning_file(