@@ -59,6 +59,8 @@ PyObject *py_ue_graph_add_node_call_function(ue_PyUObject * self, PyObject * arg
5959 UEdGraphSchema_K2::SetNodeMetaData (node, FNodeMetadata::DefaultGraphNode);
6060 graph->AddNode (node);
6161
62+ node->MarkPackageDirty ();
63+
6264 PyObject *ret = (PyObject *)ue_get_python_wrapper (node);
6365 if (!ret)
6466 return PyErr_Format (PyExc_Exception, " uobject is in invalid state" );
@@ -96,6 +98,8 @@ PyObject *py_ue_graph_add_node_custom_event(ue_PyUObject * self, PyObject * args
9698 UEdGraphSchema_K2::SetNodeMetaData (node, FNodeMetadata::DefaultGraphNode);
9799 graph->AddNode (node);
98100
101+ node->MarkPackageDirty ();
102+
99103 PyObject *ret = (PyObject *)ue_get_python_wrapper (node);
100104 if (!ret)
101105 return PyErr_Format (PyExc_Exception, " uobject is in invalid state" );
@@ -147,6 +151,8 @@ PyObject *py_ue_graph_add_node_variable_get(ue_PyUObject * self, PyObject * args
147151 FEdGraphSchemaAction_K2NewNode::SpawnNodeFromTemplate<UK2Node_VariableGet>(graph, node, FVector2D (x, y));
148152 // graph->AddNode(node);
149153
154+ node->MarkPackageDirty ();
155+
150156 PyObject *ret = (PyObject *)ue_get_python_wrapper (node);
151157 if (!ret)
152158 return PyErr_Format (PyExc_Exception, " uobject is in invalid state" );
@@ -198,6 +204,8 @@ PyObject *py_ue_graph_add_node_variable_set(ue_PyUObject * self, PyObject * args
198204 FEdGraphSchemaAction_K2NewNode::SpawnNodeFromTemplate<UK2Node_VariableSet>(graph, node, FVector2D (x, y));
199205 // graph->AddNode(node);
200206
207+ node->MarkPackageDirty ();
208+
201209 PyObject *ret = (PyObject *)ue_get_python_wrapper (node);
202210 if (!ret)
203211 return PyErr_Format (PyExc_Exception, " uobject is in invalid state" );
@@ -222,4 +230,29 @@ PyObject *py_ue_node_pins(ue_PyUObject * self, PyObject * args) {
222230 }
223231 return pins_list;
224232}
233+
234+ PyObject *py_ue_node_find_pin (ue_PyUObject * self, PyObject * args) {
235+
236+ ue_py_check (self);
237+
238+ char *name = nullptr ;
239+ if (!PyArg_ParseTuple (args, " s:node_find_pin" , &name)) {
240+ return NULL ;
241+ }
242+
243+ if (!self->ue_object ->IsA <UEdGraphNode>()) {
244+ return PyErr_Format (PyExc_Exception, " uobject is not a UEdGraphNode" );
245+ }
246+
247+ UEdGraphNode *node = (UEdGraphNode *)self->ue_object ;
248+
249+ UEdGraphPin *pin = node->FindPin (UTF8_TO_TCHAR (name));
250+ if (!pin) {
251+ return PyErr_Format (PyExc_Exception, " unable to find pin \" %s\" " , name);
252+ }
253+
254+ PyObject *ret = py_ue_new_edgraphpin (pin);
255+ Py_INCREF (ret);
256+ return ret;
257+ }
225258#endif
0 commit comments