FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fixed GraphEditor · hdev-moliver/UnrealEnginePython@78c04cf · GitHub

Repository navigation

Commit 78c04cf

Browse files
Roberto De Ioris
committed
fixed GraphEditor
1 parent 0c9838c commit 78c04cf

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

‎Source/UnrealEnginePython/Private/Slate/UEPySGraphEditor.cpp‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,18 @@ PyTypeObject ue_PySGraphEditorType = {
5050
};
5151

5252
static int ue_py_sgraph_editor_init(ue_PySGraphEditor *self, PyObject *args, PyObject *kwargs) {
53-
ue_py_snew(SGraphEditor, s_compound_widget.s_widget);
53+
PyObject *py_graph;
54+
if (!PyArg_ParseTuple(args, "O", &py_graph)) {
55+
return -1;
56+
}
57+
58+
UEdGraph *graph = ue_py_check_type<UEdGraph>(py_graph);
59+
if (!graph) {
60+
PyErr_SetString(PyExc_Exception, "argument is not a EdGraph");
61+
return -1;
62+
}
63+
self->s_compound_widget.s_widget.s_widget_owned = SNew(SGraphEditor).GraphToEdit(graph);
64+
self->s_compound_widget.s_widget.s_widget = &self->s_compound_widget.s_widget.s_widget_owned.Get();
5465
return 0;
5566
}
5667

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL