diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-15 21:16:27 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-15 21:16:27 +0400 |
commit | 2324c80f50f9cb95435b66ea370d38fd9617760b (patch) | |
tree | e9fe125c911541a232ba868c138f8f44531af97c /intern/cycles | |
parent | 1c9b548d92e8a76ac0a3c730bff5634d4628e971 (diff) |
Cycles OSL: windows build system changes to support static OSL/OIIO.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/addon/osl.py | 7 | ||||
-rw-r--r-- | intern/cycles/kernel/shaders/CMakeLists.txt | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/intern/cycles/blender/addon/osl.py b/intern/cycles/blender/addon/osl.py index aac1e2422b9..79ce3df20c3 100644 --- a/intern/cycles/blender/addon/osl.py +++ b/intern/cycles/blender/addon/osl.py @@ -79,12 +79,13 @@ def update_script_node(node, report): if script.is_in_memory or script.is_dirty or script.is_modified or not os.path.exists(osl_path): # write text datablock contents to temporary file - osl_file = tempfile.NamedTemporaryFile(mode='w', suffix=".osl", delete=True) + osl_file = tempfile.NamedTemporaryFile(mode='w', suffix=".osl", delete=False) osl_file.write(script.as_string()) - osl_file.flush() + osl_file.close() + ok, oso_path = osl_compile(osl_file.name, report) oso_file_remove = False - osl_file.close() + os.remove(osl_file.name) else: # compile text datablock from disk directly ok, oso_path = osl_compile(osl_path, report) diff --git a/intern/cycles/kernel/shaders/CMakeLists.txt b/intern/cycles/kernel/shaders/CMakeLists.txt index 4f5a97c1bb6..f7fec62fd6d 100644 --- a/intern/cycles/kernel/shaders/CMakeLists.txt +++ b/intern/cycles/kernel/shaders/CMakeLists.txt @@ -89,7 +89,7 @@ foreach(_file ${SRC_OSL}) list(APPEND SRC_OSO ${_OSO_FILE} ) - + unset(_OSL_FILE) unset(_OSO_FILE) endforeach() |