BLEN-370: Find way not to modify PATH #5

Closed
Georgiy Markelov wants to merge 2 commits from BLEN-370 into storm-hydra-addon

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit 1af1b21f76 - Show all commits

View File

@ -3,6 +3,7 @@
# <pep8 compliant>
import os
import platform
from pathlib import Path
import bpy
@ -22,7 +23,8 @@ class StormHydraRenderEngine(HydraRenderEngine):
@classmethod
def register(cls):
super().register()
os.environ['PXR_MTLX_STDLIB_SEARCH_PATHS'] = os.environ.get('PXR_MTLX_STDLIB_SEARCH_PATHS', '') + ';' + \
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):