forked from blender/blender-addons
BLEN-370: Find way not to modify PATH #5
@ -2,6 +2,9 @@
|
||||
# Copyright 2011-2022 Blender Foundation
|
||||
|
||||
# <pep8 compliant>
|
||||
import os
|
||||
import platform
|
||||
from pathlib import Path
|
||||
|
||||
import bpy
|
||||
from bpy_hydra import HydraRenderEngine
|
||||
@ -17,6 +20,13 @@ class StormHydraRenderEngine(HydraRenderEngine):
|
||||
|
||||
delegate_id = 'HdStormRendererPlugin'
|
||||
|
||||
@classmethod
|
||||
def register(cls):
|
||||
super().register()
|
||||
separator = ';' if platform.system() == 'Windows' else ':'
|
||||
os.environ['PXR_MTLX_STDLIB_SEARCH_PATHS'] = os.environ.get('PXR_MTLX_STDLIB_SEARCH_PATHS', '') + separator + \
|
||||
str(Path(bpy.app.binary_path).parent) + '/materialx/libraries;'
|
||||
|
||||
def get_delegate_settings(self, engine_type):
|
||||
settings = bpy.context.scene.hydra_storm
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user