| 715 | } |
| 716 | |
| 717 | PyObject *py_ue_as_dict(ue_PyUObject * self, PyObject * args) { |
| 718 | |
| 719 | ue_py_check(self); |
| 720 | |
| 721 | UStruct *u_struct = nullptr; |
| 722 | |
| 723 | if (self->ue_object->IsA<UStruct>()) { |
| 724 | u_struct = (UStruct *)self->ue_object; |
| 725 | } |
| 726 | else { |
| 727 | u_struct = (UStruct *)self->ue_object->GetClass(); |
| 728 | } |
| 729 | |
| 730 | PyObject *py_struct_dict = PyDict_New(); |
| 731 | TFieldIterator<UProperty> SArgs(u_struct); |
| 732 | for (; SArgs; ++SArgs) { |
| 733 | PyObject *struct_value = ue_py_convert_property(*SArgs, (uint8 *)self->ue_object); |
| 734 | if (!struct_value) { |
| 735 | Py_DECREF(py_struct_dict); |
| 736 | return NULL; |
| 737 | } |
| 738 | PyDict_SetItemString(py_struct_dict, TCHAR_TO_UTF8(*SArgs->GetName()), struct_value); |
| 739 | } |
| 740 | return py_struct_dict; |
| 741 | } |
| 742 | |
| 743 | PyObject *py_ue_get_cdo(ue_PyUObject * self, PyObject * args) { |
| 744 |
nothing calls this directly
no test coverage detected