Skip to content

Commit

Permalink
added support for fixed array properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto De Ioris committed Mar 28, 2018
1 parent 63dab96 commit a14a1ae
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 101 deletions.
2 changes: 1 addition & 1 deletion Source/UnrealEnginePython/Private/PythonDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void UPythonDelegate::ProcessEvent(UFunction *function, void *Parms)
for (; PArgs && argn < signature->NumParms && ((PArgs->PropertyFlags & (CPF_Parm | CPF_ReturnParm)) == CPF_Parm); ++PArgs)
{
UProperty *prop = *PArgs;
PyObject *arg = ue_py_convert_property(prop, (uint8 *)Parms);
PyObject *arg = ue_py_convert_property(prop, (uint8 *)Parms, 0);
if (!arg)
{
unreal_engine_py_log_error();
Expand Down
6 changes: 3 additions & 3 deletions Source/UnrealEnginePython/Private/PythonFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void UPythonFunction::CallPythonCallable(FFrame& Stack, RESULT_DECL)
if (prop->PropertyFlags & CPF_ReturnParm)
continue;
if (!on_error) {
PyObject *arg = ue_py_convert_property(prop, (uint8 *)Stack.Locals);
PyObject *arg = ue_py_convert_property(prop, (uint8 *)Stack.Locals, 0);
if (!arg) {
unreal_engine_py_log_error();
on_error = true;
Expand All @@ -76,7 +76,7 @@ void UPythonFunction::CallPythonCallable(FFrame& Stack, RESULT_DECL)
if (prop->PropertyFlags & CPF_ReturnParm)
continue;
if (!on_error) {
PyObject *arg = ue_py_convert_property(prop, frame);
PyObject *arg = ue_py_convert_property(prop, frame, 0);
if (!arg) {
unreal_engine_py_log_error();
on_error = true;
Expand Down Expand Up @@ -108,7 +108,7 @@ void UPythonFunction::CallPythonCallable(FFrame& Stack, RESULT_DECL)
#if defined(UEPY_MEMORY_DEBUG)
UE_LOG(LogPython, Warning, TEXT("FOUND RETURN VALUE"));
#endif
if (ue_py_convert_pyobject(ret, return_property, frame)) {
if (ue_py_convert_pyobject(ret, return_property, frame, 0)) {
// copy value to stack result value
FMemory::Memcpy(RESULT_PARAM, frame + function->ReturnValueOffset, return_property->ArrayDim * return_property->ElementSize);
}
Expand Down
Loading

0 comments on commit a14a1ae

Please sign in to comment.