Fix wrong path for PXR_MTLX_STDLIB_SEARCH_PATHS #30

Merged
Bogdan Nagirniak merged 3 commits from BLEN-398 into hydra-render 2023-04-28 11:44:03 +02:00
Showing only changes of commit cd82bdd21b - Show all commits

View File

@ -66,8 +66,10 @@ class HydraRenderEngine(bpy.types.RenderEngine):
def register(cls): def register(cls):
_bpy_hydra.init() _bpy_hydra.init()
root_folder = "blender.shared" if platform.system() == 'Windows' else "lib" root_folder = "blender.shared" if platform.system() == 'Windows' else "lib"
os.environ['PXR_MTLX_STDLIB_SEARCH_PATHS'] = str(Path(bpy.app.binary_path).parent / f"{root_folder}/materialx/libraries") + \ os.environ['PXR_MTLX_STDLIB_SEARCH_PATHS'] = os.pathsep.join([Path(bpy.app.binary_path).parent /
os.pathsep + os.environ.get('PXR_MTLX_STDLIB_SEARCH_PATHS', "") f"{root_folder}/materialx/libraries",
os.environ.get('PXR_MTLX_STDLIB_SEARCH_PATHS', "")
])
@classmethod @classmethod
def unregister(cls): def unregister(cls):