| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0c9838c commit 78c04cf
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,7 +50,18 @@ PyTypeObject ue_PySGraphEditorType = { | |||
| 50 | 50 | }; | |
| 51 | 51 | ||
| 52 | 52 | 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(); | ||
| 54 | 65 | return 0; | |
| 55 | 66 | } | |
| 56 | 67 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments