Commit: 9bf620392f75358ca85d25ba86da0942fc81743c Author: Nick Wu Date: Mon May 28 21:26:19 2018 +0800 Branches: soc-2018-npr https://developer.blender.org/rB9bf620392f75358ca85d25ba86da0942fc81743c
fixed weird problem in blender/blender_python.cpp =================================================================== M intern/cycles/blender/blender_python.cpp =================================================================== diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp index 56c19c1827a..b167da69fd0 100644 --- a/intern/cycles/blender/blender_python.cpp +++ b/intern/cycles/blender/blender_python.cpp @@ -408,7 +408,7 @@ static PyObject *available_devices_func(PyObject * /*self*/, PyObject * /*args*/ #ifdef WITH_OSL -static PyObject *osl_update_node_func(PyObject * /*self*/, PyObject *args) +static PyObject *osl_update_node_func(PyObject * self, PyObject *args) { PyObject *pynodegroup, *pynode; const char *filepath = NULL; @@ -514,7 +514,7 @@ static PyObject *osl_update_node_func(PyObject * /*self*/, PyObject *args) b_sock = b_node.outputs[param->name.string()]; /* remove if type no longer matches */ if(b_sock && b_sock.bl_idname() != socket_type) { - b_node.outputs.remove(b_sock); + b_node.outputs.remove(self, b_sock); b_sock = BL::NodeSocket(PointerRNA_NULL); } } @@ -522,7 +522,7 @@ static PyObject *osl_update_node_func(PyObject * /*self*/, PyObject *args) b_sock = b_node.inputs[param->name.string()]; /* remove if type no longer matches */ if(b_sock && b_sock.bl_idname() != socket_type) { - b_node.inputs.remove(b_sock); + b_node.inputs.remove(self, b_sock); b_sock = BL::NodeSocket(PointerRNA_NULL); } } @@ -530,9 +530,9 @@ static PyObject *osl_update_node_func(PyObject * /*self*/, PyObject *args) if(!b_sock) { /* create new socket */ if(param->isoutput) - b_sock = b_node.outputs.create(socket_type.c_str(), param->name.c_str(), param->name.c_str()); + b_sock = b_node.outputs.create(self, socket_type.c_str(), param->name.c_str(), param->name.c_str()); else - b_sock = b_node.inputs.create(socket_type.c_str(), param->name.c_str(), param->name.c_str()); + b_sock = b_node.inputs.create(self, socket_type.c_str(), param->name.c_str(), param->name.c_str()); /* set default value */ if(data_type == BL::NodeSocket::type_VALUE) { @@ -566,7 +566,7 @@ static PyObject *osl_update_node_func(PyObject * /*self*/, PyObject *args) for(b_node.inputs.begin(b_input); b_input != b_node.inputs.end(); ++b_input) { if(used_sockets.find(b_input->ptr.data) == used_sockets.end()) { - b_node.inputs.remove(*b_input); + b_node.inputs.remove(self, *b_input); removed = true; break; } @@ -574,7 +574,7 @@ static PyObject *osl_update_node_func(PyObject * /*self*/, PyObject *args) for(b_node.outputs.begin(b_output); b_output != b_node.outputs.end(); ++b_output) { if(used_sockets.find(b_output->ptr.data) == used_sockets.end()) { - b_node.outputs.remove(*b_output); + b_node.outputs.remove(self, *b_output); removed = true; break; } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs