Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2014-09-01 17:37:21 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-09-01 17:38:22 +0400
commitf0653c3d3f1b24b45e6f1c5ac659bf130b58af3f (patch)
tree82721843c274829a1441ad7291809545955db90c /intern/cycles/kernel/osl/osl_services.cpp
parenta8d2a6faf3beaf8363bd71c65c59e0ed1a1e7b5c (diff)
parent575cbf0172508eb9d846f1c62027a9c0f4fddd34 (diff)
Merge branch 'master' into soc-2014-viewport_context
Also fix scons issues with SDL. There is still a linking problem somewhere but i expect this is an issue in master as well. Conflicts: intern/cycles/SConscript intern/ghost/CMakeLists.txt intern/ghost/intern/GHOST_WindowX11.cpp source/blender/nodes/CMakeLists.txt
Diffstat (limited to 'intern/cycles/kernel/osl/osl_services.cpp')
-rw-r--r--intern/cycles/kernel/osl/osl_services.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/intern/cycles/kernel/osl/osl_services.cpp b/intern/cycles/kernel/osl/osl_services.cpp
index d5d995d490b..38cb5061346 100644
--- a/intern/cycles/kernel/osl/osl_services.cpp
+++ b/intern/cycles/kernel/osl/osl_services.cpp
@@ -479,7 +479,7 @@ static bool set_attribute_int(int i, TypeDesc type, bool derivatives, void *val)
static bool set_attribute_string(ustring str, TypeDesc type, bool derivatives, void *val)
{
- if(type.basetype == TypeDesc::INT && type.aggregate == TypeDesc::SCALAR && type.arraylen == 0) {
+ if(type.basetype == TypeDesc::STRING && type.aggregate == TypeDesc::SCALAR && type.arraylen == 0) {
ustring *sval = (ustring *)val;
sval[0] = str;
@@ -758,6 +758,12 @@ bool OSLRenderServices::get_attribute(OSL::ShaderGlobals *sg, bool derivatives,
return false;
ShaderData *sd = (ShaderData *)(sg->renderstate);
+ return get_attribute(sd, derivatives, object_name, type, name, val);
+}
+
+bool OSLRenderServices::get_attribute(ShaderData *sd, bool derivatives, ustring object_name,
+ TypeDesc type, ustring name, void *val)
+{
KernelGlobals *kg = sd->osl_globals;
bool is_curve;
int object;
@@ -1100,7 +1106,7 @@ bool OSLRenderServices::getmessage(OSL::ShaderGlobals *sg, ustring source, ustri
return set_attribute_float(f, type, derivatives, val);
}
- return get_attribute(sg, derivatives, u_empty, type, name, val);
+ return get_attribute(sd, derivatives, u_empty, type, name, val);
}
}
}