Fix T41318: API change in OSL, I see no other cases but there might be

This commit is contained in:
Martijn Berger 2014-08-05 23:49:42 +02:00
parent c82e256ad3
commit 4cf531f7a0

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