forked from blender/blender
BLEN-370: Find way not to modify PATH #17
@ -37,7 +37,6 @@ __all__ = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import platform
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
@ -63,9 +62,8 @@ class HydraRenderEngine(bpy.types.RenderEngine):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def register(cls):
|
def register(cls):
|
||||||
_bpy_hydra.init()
|
_bpy_hydra.init()
|
||||||
mtlx_std_libs_folder = os.environ.get('PXR_MTLX_STDLIB_SEARCH_PATHS', None)
|
os.environ['PXR_MTLX_STDLIB_SEARCH_PATHS'] = str(Path(bpy.app.binary_path).parent / "materialx/libraries") + \
|
||||||
if not mtlx_std_libs_folder:
|
os.pathsep + os.environ.get('PXR_MTLX_STDLIB_SEARCH_PATHS', "")
|
||||||
os.environ['PXR_MTLX_STDLIB_SEARCH_PATHS'] = str(Path(bpy.app.binary_path).parent) + '/materialx/libraries;'
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def unregister(cls):
|
def unregister(cls):
|
||||||
|
Loading…
Reference in New Issue
Block a user