forked from blender/blender
Fix wrong path for PXR_MTLX_STDLIB_SEARCH_PATHS #30
@ -37,6 +37,7 @@ __all__ = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
import traceback
|
import traceback
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
@ -64,8 +65,10 @@ class HydraRenderEngine(bpy.types.RenderEngine):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def register(cls):
|
def register(cls):
|
||||||
_bpy_hydra.init()
|
_bpy_hydra.init()
|
||||||
os.environ['PXR_MTLX_STDLIB_SEARCH_PATHS'] = str(Path(bpy.app.binary_path).parent / "materialx/libraries") + \
|
root_folder = "blender.shared" if platform.system() == 'Windows' else "lib"
|
||||||
os.pathsep + os.environ.get('PXR_MTLX_STDLIB_SEARCH_PATHS', "")
|
os.environ['PXR_MTLX_STDLIB_SEARCH_PATHS'] = os.pathsep.join([
|
||||||
|
Path(bpy.app.binary_path).parent / f"{root_folder}/materialx/libraries",
|
||||||
|
os.environ.get('PXR_MTLX_STDLIB_SEARCH_PATHS', "")])
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def unregister(cls):
|
def unregister(cls):
|
||||||
|
Loading…
Reference in New Issue
Block a user