[Bf-blender-cvs] [b9e4929] master: Fix: T41318 OSL compiler signature changed with 1.5.
Martijn Berger
noreply at git.blender.org
Tue Aug 5 11:12:05 CEST 2014
Commit: b9e4929846a59b0f274ec0b898582becb58718d0
Author: Martijn Berger
Date: Tue Aug 5 11:11:52 2014 +0200
Branches: master
https://developer.blender.org/rBb9e4929846a59b0f274ec0b898582becb58718d0
Fix: T41318
OSL compiler signature changed with 1.5.
===================================================================
M intern/cycles/render/osl.cpp
===================================================================
diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp
index fa7a242..c95c626 100644
--- a/intern/cycles/render/osl.cpp
+++ b/intern/cycles/render/osl.cpp
@@ -260,12 +260,18 @@ bool OSLShaderManager::osl_compile(const string& inputfile, const string& output
options.push_back(outputfile);
/* specify standard include path */
- options.push_back("-I" + path_get("shader"));
+ options.push_back("-I");
+ options.push_back(path_get("shader"));
+
stdosl_path = path_get("shader/stdosl.h");
/* compile */
OSL::OSLCompiler *compiler = OSL::OSLCompiler::create();
+#if OSL_LIBRARY_VERSION_CODE >= 10500
+ bool ok = compiler->compile(string_view(inputfile), options, string_view(stdosl_path));
+#else
bool ok = compiler->compile(inputfile, options, stdosl_path);
+#endif
delete compiler;
return ok;
More information about the Bf-blender-cvs
mailing list