Skip to content

Commit 8729f2c

Browse files
author
Roberto De Ioris
committed
added node_pin_type_changed and node_pin_default_value_changed
1 parent 5276c43 commit 8729f2c

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed

Source/UnrealEnginePython/Private/Blueprint/UEPyEdGraph.cpp

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,4 +582,57 @@ PyObject *py_ue_node_create_pin(ue_PyUObject * self, PyObject * args)
582582
Py_INCREF(ret);
583583
return ret;
584584
}
585+
586+
587+
PyObject *py_ue_node_pin_type_changed(ue_PyUObject * self, PyObject * args)
588+
{
589+
590+
ue_py_check(self);
591+
592+
PyObject *py_pin;
593+
if (!PyArg_ParseTuple(args, "O:node_pin_type_changed", &py_pin))
594+
{
595+
return nullptr;
596+
}
597+
598+
UEdGraphNode *node = ue_py_check_type<UEdGraphNode>(self);
599+
if (!node)
600+
return PyErr_Format(PyExc_Exception, "uobject is not a UEdGraphNode");
601+
602+
ue_PyEdGraphPin *pin = py_ue_is_edgraphpin(py_pin);
603+
if (!pin)
604+
return PyErr_Format(PyExc_Exception, "argument is not a EdGraphPin");
605+
606+
node->PinTypeChanged(pin->pin);
607+
608+
Py_RETURN_NONE;
609+
}
610+
611+
PyObject *py_ue_node_pin_default_value_changed(ue_PyUObject * self, PyObject * args)
612+
{
613+
614+
ue_py_check(self);
615+
616+
PyObject *py_pin;
617+
if (!PyArg_ParseTuple(args, "O:node_pin_default_value_changed", &py_pin))
618+
{
619+
return nullptr;
620+
}
621+
622+
UEdGraphNode *node = ue_py_check_type<UEdGraphNode>(self);
623+
if (!node)
624+
return PyErr_Format(PyExc_Exception, "uobject is not a UEdGraphNode");
625+
626+
ue_PyEdGraphPin *pin = py_ue_is_edgraphpin(py_pin);
627+
if (!pin)
628+
return PyErr_Format(PyExc_Exception, "argument is not a EdGraphPin");
629+
630+
node->PinDefaultValueChanged(pin->pin);
631+
632+
Py_RETURN_NONE;
633+
}
634+
635+
636+
637+
585638
#endif

Source/UnrealEnginePython/Private/Blueprint/UEPyEdGraph.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ PyObject *py_ue_node_pins(ue_PyUObject *, PyObject *);
2121
PyObject *py_ue_node_find_pin(ue_PyUObject *, PyObject *);
2222
PyObject *py_ue_node_create_pin(ue_PyUObject *, PyObject *);
2323

24+
PyObject *py_ue_node_pin_type_changed(ue_PyUObject *, PyObject *);
25+
PyObject *py_ue_node_pin_default_value_changed(ue_PyUObject *, PyObject *);
26+
2427
PyObject *py_ue_node_function_entry_set_pure(ue_PyUObject *, PyObject *);
2528

2629
PyObject *py_ue_node_get_title(ue_PyUObject *, PyObject *);

Source/UnrealEnginePython/Private/UEPyModule.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,8 @@ static PyMethodDef ue_PyUObject_methods[] = {
583583
{ "node_get_title", (PyCFunction)py_ue_node_get_title, METH_VARARGS, "" },
584584
{ "node_find_pin", (PyCFunction)py_ue_node_find_pin, METH_VARARGS, "" },
585585
{ "node_create_pin", (PyCFunction)py_ue_node_create_pin, METH_VARARGS, "" },
586+
{ "node_pin_type_changed", (PyCFunction)py_ue_node_pin_type_changed, METH_VARARGS, "" },
587+
{ "node_pin_default_value_changed", (PyCFunction)py_ue_node_pin_default_value_changed, METH_VARARGS, "" },
586588

587589
{ "node_function_entry_set_pure", (PyCFunction)py_ue_node_function_entry_set_pure, METH_VARARGS, "" },
588590

@@ -3232,4 +3234,4 @@ static PyObject *init_unreal_engine()
32323234

32333235
return new_unreal_engine_module;
32343236
}
3235-
#endif
3237+
#endif

0 commit comments

Comments
 (0)