Skip to content

Commit

Permalink
added check for LD_LIBPATH so that resolver can be started even if LD…
Browse files Browse the repository at this point in the history
…_LIBPATH has been empty
  • Loading branch information
lyon040502003 committed Jun 3, 2024
1 parent fcb21d8 commit ddbc1df
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions client/ayon_usd/hooks/pre_resolver_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ddbc1df

Please sign in to comment.