@@ -21,6 +21,26 @@ PyObject *py_ue_get_class(ue_PyUObject * self, PyObject * args)
2121 return (PyObject *)ret;
2222}
2323
24+ PyObject *py_ue_class_generated_by (ue_PyUObject * self, PyObject * args)
25+ {
26+
27+ ue_py_check (self);
28+
29+ UClass *u_class = ue_py_check_type<UClass>(self);
30+ if (!u_class)
31+ return PyErr_Format (PyExc_Exception, " uobject is a not a UClass" );
32+
33+ UObject *u_object = u_class->ClassGeneratedBy ;
34+ if (!u_object)
35+ Py_RETURN_NONE;
36+
37+ ue_PyUObject *ret = ue_get_python_wrapper (u_object);
38+ if (!ret)
39+ return PyErr_Format (PyExc_Exception, " PyUObject is in invalid state" );
40+ Py_INCREF (ret);
41+ return (PyObject *)ret;
42+ }
43+
2444PyObject *py_ue_get_property_struct (ue_PyUObject * self, PyObject * args)
2545{
2646
@@ -81,7 +101,11 @@ PyObject *py_ue_get_outer(ue_PyUObject *self, PyObject * args)
81101
82102 ue_py_check (self);
83103
84- ue_PyUObject *ret = ue_get_python_wrapper (self->ue_object ->GetOuter ());
104+ UObject *outer = self->ue_object ->GetOuter ();
105+ if (!outer)
106+ Py_RETURN_NONE;
107+
108+ ue_PyUObject *ret = ue_get_python_wrapper (outer);
85109 if (!ret)
86110 return PyErr_Format (PyExc_Exception, " uobject is in invalid state" );
87111 Py_INCREF (ret);
@@ -93,7 +117,11 @@ PyObject *py_ue_get_outermost(ue_PyUObject *self, PyObject * args)
93117
94118 ue_py_check (self);
95119
96- ue_PyUObject *ret = ue_get_python_wrapper (self->ue_object ->GetOutermost ());
120+ UObject *outermost = self->ue_object ->GetOutermost ();
121+ if (!outermost)
122+ Py_RETURN_NONE;
123+
124+ ue_PyUObject *ret = ue_get_python_wrapper (outermost);
97125 if (!ret)
98126 return PyErr_Format (PyExc_Exception, " uobject is in invalid state" );
99127 Py_INCREF (ret);
@@ -497,8 +525,7 @@ PyObject *py_ue_save_config(ue_PyUObject *self, PyObject * args)
497525
498526 self->ue_object ->SaveConfig ();
499527
500- Py_INCREF (Py_None);
501- return Py_None;
528+ Py_RETURN_NONE;
502529}
503530
504531PyObject *py_ue_set_property (ue_PyUObject *self, PyObject * args)
@@ -534,8 +561,7 @@ PyObject *py_ue_set_property(ue_PyUObject *self, PyObject * args)
534561 return PyErr_Format (PyExc_Exception, " unable to set property %s" , property_name);
535562 }
536563
537- Py_INCREF (Py_None);
538- return Py_None;
564+ Py_RETURN_NONE;
539565
540566}
541567
@@ -676,8 +702,7 @@ PyObject *py_ue_call(ue_PyUObject *self, PyObject * args)
676702 return PyErr_Format (PyExc_Exception, " error while calling \" %s\" " , call_args);
677703 }
678704
679- Py_INCREF (Py_None);
680- return Py_None;
705+ Py_RETURN_NONE;
681706}
682707
683708PyObject *py_ue_broadcast (ue_PyUObject *self, PyObject *args)
@@ -707,8 +732,7 @@ PyObject *py_ue_broadcast(ue_PyUObject *self, PyObject *args)
707732 return PyErr_Format (PyExc_Exception, " property is not a UMulticastDelegateProperty" );
708733 }
709734
710- Py_INCREF (Py_None);
711- return Py_None;
735+ Py_RETURN_NONE;
712736}
713737
714738PyObject *py_ue_get_property (ue_PyUObject *self, PyObject * args)
0 commit comments