Skip to content

Commit fccc872

Browse files
rdeiorisslartibaartfast
authored andcommitted
completed porting to 4.23. fixes 20tab#777
1 parent 181e1ac commit fccc872

File tree

5 files changed

+23
-3
lines changed

5 files changed

+23
-3
lines changed

Source/UnrealEnginePython/Private/Slate/UEPySTextBlock.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ static int ue_py_stext_block_init(ue_PySTextBlock *self, PyObject *args, PyObjec
7070
ue_py_slate_farguments_float("line_height_percentage", LineHeightPercentage);
7171
ue_py_slate_farguments_struct("margin", Margin, FMargin);
7272
ue_py_slate_farguments_float("min_desired_width", MinDesiredWidth);
73+
#if ENGINE_MINOR_VERSION >= 23
74+
ue_py_slate_farguments_event("on_double_clicked", OnDoubleClicked, FPointerEventHandler, OnMouseEvent);
75+
#else
7376
ue_py_slate_farguments_event("on_double_clicked", OnDoubleClicked, FOnClicked, OnClicked);
77+
#endif
7478
ue_py_slate_farguments_flinear_color("shadow_color_and_opacity", ShadowColorAndOpacity);
7579
ue_py_slate_farguments_fvector2d("shadow_offset", ShadowOffset);
7680
ue_py_slate_farguments_text("text", Text);

Source/UnrealEnginePython/Private/Slate/UEPySlate.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,8 +1020,11 @@ class FPythonSlateCommands : public TCommands<FPythonSlateCommands>
10201020
virtual void RegisterCommands() override
10211021
{
10221022
commands = MakeShareable(new FUICommandList);
1023-
1023+
#if ENGINE_MINOR_VERSION >= 23
1024+
MakeUICommand_InternalUseOnly(this, command, nullptr, *name, *name, TCHAR_TO_UTF8(*name), *name, *name, EUserInterfaceActionType::Button, FInputGesture());
1025+
#else
10241026
UI_COMMAND_Function(this, command, nullptr, *name, *name, TCHAR_TO_UTF8(*name), *name, *name, EUserInterfaceActionType::Button, FInputGesture());
1027+
#endif
10251028
commands->MapAction(command, FExecuteAction::CreateRaw(this, &FPythonSlateCommands::Callback), FCanExecuteAction());
10261029
}
10271030

Source/UnrealEnginePython/Private/UEPyModule.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,9 @@ static PyMethodDef ue_PyUObject_methods[] = {
744744
{ "get_raw_animation_data", (PyCFunction)py_ue_anim_sequence_get_raw_animation_data, METH_VARARGS, "" },
745745
{ "get_raw_animation_track", (PyCFunction)py_ue_anim_sequence_get_raw_animation_track, METH_VARARGS, "" },
746746
{ "add_new_raw_track", (PyCFunction)py_ue_anim_sequence_add_new_raw_track, METH_VARARGS, "" },
747+
#if ENGINE_MINOR_VERSION <23
747748
{ "update_compressed_track_map_from_raw", (PyCFunction)py_ue_anim_sequence_update_compressed_track_map_from_raw, METH_VARARGS, "" },
749+
#endif
748750
{ "update_raw_track", (PyCFunction)py_ue_anim_sequence_update_raw_track, METH_VARARGS, "" },
749751
{ "apply_raw_anim_changes", (PyCFunction)py_ue_anim_sequence_apply_raw_anim_changes, METH_VARARGS, "" },
750752
{ "add_key_to_sequence", (PyCFunction)py_ue_anim_add_key_to_sequence, METH_VARARGS, "" },

Source/UnrealEnginePython/Private/UObject/UEPyObject.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,11 @@ PyObject *py_ue_broadcast(ue_PyUObject *self, PyObject *args)
10841084

10851085
if (auto casted_prop = Cast<UMulticastDelegateProperty>(u_property))
10861086
{
1087+
#if ENGINE_MINOR_VERSION >= 23
1088+
FMulticastScriptDelegate multiscript_delegate = *casted_prop->GetMulticastDelegate(self->ue_object);
1089+
#else
10871090
FMulticastScriptDelegate multiscript_delegate = casted_prop->GetPropertyValue_InContainer(self->ue_object);
1091+
#endif
10881092
uint8 *parms = (uint8 *)FMemory_Alloca(casted_prop->SignatureFunction->PropertiesSize);
10891093
FMemory::Memzero(parms, casted_prop->SignatureFunction->PropertiesSize);
10901094

Source/UnrealEnginePython/Private/Wrappers/UEPyFFoliageInstance.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ static FFoliageInstance* get_foliage_instance(ue_PyFFoliageInstance* self)
3333
}
3434

3535
#if ENGINE_MINOR_VERSION >= 23
36-
auto FoliageInfo = self->foliage_actor->FoliageInfos[self->foliage_type.Get()];
37-
FFoliageInfo& info = info;
36+
FFoliageInfo& info = self->foliage_actor->FoliageInfos[self->foliage_type.Get()].Get();
3837
#else
3938

4039
FFoliageMeshInfo& info = self->foliage_actor->FoliageMeshes[self->foliage_type.Get()].Get();
@@ -72,7 +71,11 @@ static int py_ue_ffoliage_instance_set_location(ue_PyFFoliageInstance* self, PyO
7271
{
7372
TArray<int32> instances;
7473
instances.Add(self->instance_id);
74+
#if ENGINE_MINOR_VERSION >= 23
75+
FFoliageInfo& info = self->foliage_actor->FoliageInfos[self->foliage_type.Get()].Get();
76+
#else
7577
FFoliageMeshInfo& info = self->foliage_actor->FoliageMeshes[self->foliage_type.Get()].Get();
78+
#endif
7679
info.PreMoveInstances(self->foliage_actor.Get(), instances);
7780
instance->Location = vec->vec;
7881
info.PostMoveInstances(self->foliage_actor.Get(), instances);
@@ -93,7 +96,11 @@ static int py_ue_ffoliage_instance_set_rotation(ue_PyFFoliageInstance* self, PyO
9396
{
9497
TArray<int32> instances;
9598
instances.Add(self->instance_id);
99+
#if ENGINE_MINOR_VERSION >= 23
100+
FFoliageInfo& info = self->foliage_actor->FoliageInfos[self->foliage_type.Get()].Get();
101+
#else
96102
FFoliageMeshInfo& info = self->foliage_actor->FoliageMeshes[self->foliage_type.Get()].Get();
103+
#endif
97104
info.PreMoveInstances(self->foliage_actor.Get(), instances);
98105
instance->Rotation = rot->rot;
99106
info.PostMoveInstances(self->foliage_actor.Get(), instances);

0 commit comments

Comments
 (0)