diff --git a/client/ayon_usd/hooks/pre_resolver_init.py b/client/ayon_usd/hooks/pre_resolver_init.py index d74aad8..f7d3b33 100644 --- a/client/ayon_usd/hooks/pre_resolver_init.py +++ b/client/ayon_usd/hooks/pre_resolver_init.py @@ -133,14 +133,17 @@ def execute(self): self.launch_context.env["PYTHONPATH"] += os.pathsep.join(python_path) if system().lower() == "windows": - self.launch_context.env["PATH"] += os.pathsep.join(ld_path) - else: - self.launch_context.env["LD_LIBRARY_PATH"] += \ - os.pathsep.join(ld_path) - - # is there used in the application? Can it hold multiple values? - # self.launch_context.env["USD_ASSET_RESOLVER"] = \ - # resolver_dir.as_posix() + if ld_path: + self.launch_context.env["PATH"] = \ + os.pathsep + os.pathsep.join(ld_path) + elif ld_path: + if "LD_LIBRARY_PATH" in os.environ: + self.launch_context.env["LD_LIBRARY_PATH"] += \ + os.pathsep + os.pathsep.join(ld_path) + else: + self.launch_context.env["LD_LIBRARY_PATH"] = \ + os.pathsep + os.pathsep.join(ld_path) + # TODO: move debug options to AYON settings self.launch_context.env["TF_DEBUG"] = "1"