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) {