@@ -83,16 +83,47 @@ PyObject *py_ue_set_obj_flags(ue_PyUObject * self, PyObject * args)
8383 ue_py_check (self);
8484
8585 uint64 flags;
86- if (!PyArg_ParseTuple (args, " K:set_obj_flags" , &flags))
86+ PyObject *py_reset = nullptr ;
87+ if (!PyArg_ParseTuple (args, " K|O:set_obj_flags" , &flags, &py_reset))
8788 {
8889 return nullptr ;
8990 }
9091
92+ if (py_reset && PyObject_IsTrue (py_reset))
93+ {
94+ self->ue_object ->ClearFlags (self->ue_object ->GetFlags ());
95+ }
96+
9197 self->ue_object ->SetFlags ((EObjectFlags)flags);
9298
9399 Py_RETURN_NONE;
94100}
95101
102+ PyObject *py_ue_clear_obj_flags (ue_PyUObject * self, PyObject * args)
103+ {
104+
105+ ue_py_check (self);
106+
107+ uint64 flags;
108+ if (!PyArg_ParseTuple (args, " K:clear_obj_flags" , &flags))
109+ {
110+ return nullptr ;
111+ }
112+
113+ self->ue_object ->ClearFlags ((EObjectFlags)flags);
114+
115+ Py_RETURN_NONE;
116+ }
117+
118+ PyObject *py_ue_reset_obj_flags (ue_PyUObject * self, PyObject * args)
119+ {
120+
121+ ue_py_check (self);
122+
123+ self->ue_object ->ClearFlags (self->ue_object ->GetFlags ());
124+
125+ Py_RETURN_NONE;
126+ }
96127
97128#if WITH_EDITOR
98129PyObject *py_ue_class_set_config_name (ue_PyUObject * self, PyObject * args)
@@ -723,7 +754,7 @@ PyObject *py_ue_set_property_flags(ue_PyUObject *self, PyObject * args)
723754 else
724755 {
725756 u_struct = (UStruct *)self->ue_object ->GetClass ();
726- }
757+ }
727758
728759 UProperty *u_property = u_struct->FindPropertyByName (FName (UTF8_TO_TCHAR (property_name)));
729760 if (!u_property)
@@ -771,7 +802,7 @@ PyObject *py_ue_add_property_flags(ue_PyUObject *self, PyObject * args)
771802 u_property->SetPropertyFlags (u_property->GetPropertyFlags () | (EPropertyFlags)flags);
772803#endif
773804 Py_RETURN_NONE;
774- }
805+ }
775806
776807PyObject *py_ue_get_property_flags (ue_PyUObject *self, PyObject * args)
777808{
@@ -1543,7 +1574,7 @@ PyObject *py_ue_add_property(ue_PyUObject * self, PyObject * args)
15431574 if (is_array || is_map)
15441575 scope->MarkPendingKill ();
15451576 return PyErr_Format (PyExc_Exception, " unable to allocate new UProperty" );
1546- }
1577+ }
15471578 UMapProperty *u_map = (UMapProperty *)scope;
15481579
15491580#if ENGINE_MINOR_VERSION < 20
@@ -1592,7 +1623,7 @@ PyObject *py_ue_add_property(ue_PyUObject * self, PyObject * args)
15921623 u_map->ValueProp = u_property2;
15931624
15941625 u_property = u_map;
1595- }
1626+ }
15961627#endif
15971628
15981629 if (u_class == UMulticastDelegateProperty::StaticClass ())
0 commit comments