diff options
author | Martijn Berger <martijn.berger@gmail.com> | 2014-08-06 01:49:42 +0400 |
---|---|---|
committer | Martijn Berger <martijn.berger@gmail.com> | 2014-08-06 01:49:42 +0400 |
commit | 4cf531f7a05434a9bbd6144a7ec0314e60aaff40 (patch) | |
tree | a2f58619355327e4ccf1deda520a86d03b094992 | |
parent | c82e256ad3b8b87e50b899aff5cafb1b460557f5 (diff) |
Fix T41318: API change in OSL, I see no other cases but there might be
-rw-r--r-- | intern/cycles/blender/blender_python.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp index e82eb67aae5..b756d6acdb2 100644 --- a/intern/cycles/blender/blender_python.cpp +++ b/intern/cycles/blender/blender_python.cpp @@ -363,7 +363,12 @@ static PyObject *osl_update_node_func(PyObject *self, PyObject *args) /* find socket socket */ BL::NodeSocket b_sock(PointerRNA_NULL); if (param->isoutput) { +#if OSL_LIBRARY_VERSION_CODE < 10500 b_sock = b_node.outputs[param->name]; +#else + b_sock = b_node.outputs[param->name.string()]; +#endif + /* remove if type no longer matches */ if(b_sock && b_sock.bl_idname() != socket_type) { @@ -372,7 +377,11 @@ static PyObject *osl_update_node_func(PyObject *self, PyObject *args) } } else { +#if OSL_LIBRARY_VERSION_CODE < 10500 b_sock = b_node.inputs[param->name]; +#else + b_sock = b_node.inputs[param->name.string()]; +#endif /* remove if type no longer matches */ if(b_sock && b_sock.bl_idname() != socket_type) { |