[Bf-blender-cvs] [4cf531f] master: Fix T41318: API change in OSL, I see no other cases but there might be
Martijn Berger
noreply at git.blender.org
Tue Aug 5 23:50:19 CEST 2014
Commit: 4cf531f7a05434a9bbd6144a7ec0314e60aaff40
Author: Martijn Berger
Date: Tue Aug 5 23:49:42 2014 +0200
Branches: master
https://developer.blender.org/rB4cf531f7a05434a9bbd6144a7ec0314e60aaff40
Fix T41318: API change in OSL, I see no other cases but there might be
===================================================================
M intern/cycles/blender/blender_python.cpp
===================================================================
diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp
index e82eb67..b756d6a 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) {
More information about the Bf-blender-cvs
mailing list