Skip to content

Commit a14a1ae

Browse files
author
Roberto De Ioris
committed
added support for fixed array properties
1 parent 63dab96 commit a14a1ae

File tree

7 files changed

+149
-101
lines changed

7 files changed

+149
-101
lines changed

Source/UnrealEnginePython/Private/PythonDelegate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void UPythonDelegate::ProcessEvent(UFunction *function, void *Parms)
3939
for (; PArgs && argn < signature->NumParms && ((PArgs->PropertyFlags & (CPF_Parm | CPF_ReturnParm)) == CPF_Parm); ++PArgs)
4040
{
4141
UProperty *prop = *PArgs;
42-
PyObject *arg = ue_py_convert_property(prop, (uint8 *)Parms);
42+
PyObject *arg = ue_py_convert_property(prop, (uint8 *)Parms, 0);
4343
if (!arg)
4444
{
4545
unreal_engine_py_log_error();

Source/UnrealEnginePython/Private/PythonFunction.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void UPythonFunction::CallPythonCallable(FFrame& Stack, RESULT_DECL)
5656
if (prop->PropertyFlags & CPF_ReturnParm)
5757
continue;
5858
if (!on_error) {
59-
PyObject *arg = ue_py_convert_property(prop, (uint8 *)Stack.Locals);
59+
PyObject *arg = ue_py_convert_property(prop, (uint8 *)Stack.Locals, 0);
6060
if (!arg) {
6161
unreal_engine_py_log_error();
6262
on_error = true;
@@ -76,7 +76,7 @@ void UPythonFunction::CallPythonCallable(FFrame& Stack, RESULT_DECL)
7676
if (prop->PropertyFlags & CPF_ReturnParm)
7777
continue;
7878
if (!on_error) {
79-
PyObject *arg = ue_py_convert_property(prop, frame);
79+
PyObject *arg = ue_py_convert_property(prop, frame, 0);
8080
if (!arg) {
8181
unreal_engine_py_log_error();
8282
on_error = true;
@@ -108,7 +108,7 @@ void UPythonFunction::CallPythonCallable(FFrame& Stack, RESULT_DECL)
108108
#if defined(UEPY_MEMORY_DEBUG)
109109
UE_LOG(LogPython, Warning, TEXT("FOUND RETURN VALUE"));
110110
#endif
111-
if (ue_py_convert_pyobject(ret, return_property, frame)) {
111+
if (ue_py_convert_pyobject(ret, return_property, frame, 0)) {
112112
// copy value to stack result value
113113
FMemory::Memcpy(RESULT_PARAM, frame + function->ReturnValueOffset, return_property->ArrayDim * return_property->ElementSize);
114114
}

0 commit comments

Comments
 (0)