MCPcopy Create free account
hub / github.com/20tab/UnrealEnginePython / UPythonClass

Class UPythonClass

Source/UnrealEnginePython/Public/PythonClass.h:7–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6UCLASS()
7class UPythonClass : public UClass
8{
9 GENERATED_BODY()
10
11public:
12
13 void SetPyConstructor(PyObject *callable) {
14 py_constructor = callable;
15 Py_INCREF(py_constructor);
16 }
17
18 void CallPyConstructor(ue_PyUObject *self) {
19 if (!py_constructor)
20 return;
21 PyObject *ret = PyObject_CallObject(py_constructor, Py_BuildValue("(O)", self));
22 if (!ret) {
23 unreal_engine_py_log_error();
24 return;
25 }
26 Py_DECREF(ret);
27 }
28
29 // __dict__ is stored here
30 ue_PyUObject *py_uobject;
31
32private:
33
34 PyObject *py_constructor;
35};
36

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected