Skip to content

Commit 240407b

Browse files
committed
fixed build for 4.15
1 parent 3afec1d commit 240407b

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Source/UnrealEnginePython/Private/UEPyModule.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3195,12 +3195,14 @@ UFunction *unreal_engine_add_function(UClass *u_class, char *name, PyObject *py_
31953195
prop_struct->Struct = TBaseStructure<FTransform>::Get();
31963196
prop = prop_struct;
31973197
}
3198+
#if ENGINE_MINOR_VERSION > 15
31983199
else if ((PyTypeObject *)value == &ue_PyFQuatType)
31993200
{
32003201
UStructProperty *prop_struct = NewObject<UStructProperty>(function, UTF8_TO_TCHAR(p_name), RF_Public);
32013202
prop_struct->Struct = TBaseStructure<FQuat>::Get();
32023203
prop = prop_struct;
32033204
}
3205+
#endif
32043206
else if (PyObject_IsInstance(value, (PyObject *)&PyType_Type))
32053207
{
32063208
// Method annotation like foo:typing.Type[Pawn] produces annotations like typing.Type[Pawn], with .__args__ = (Pawn,)
@@ -3246,6 +3248,7 @@ UFunction *unreal_engine_add_function(UClass *u_class, char *name, PyObject *py_
32463248
prop_base->SetPropertyClass(p_u_class);
32473249
prop = prop_base;
32483250
}
3251+
#if ENGINE_MINOR_VERSION > 15
32493252
else if (py_obj->ue_object->IsA<UEnum>())
32503253
{
32513254
UEnumProperty *prop_enum = NewObject<UEnumProperty>(function, UTF8_TO_TCHAR(p_name), RF_Public);
@@ -3254,6 +3257,7 @@ UFunction *unreal_engine_add_function(UClass *u_class, char *name, PyObject *py_
32543257
prop_enum->AddCppProperty(prop_underlying);
32553258
prop = prop_enum;
32563259
}
3260+
#endif
32573261
else if (py_obj->ue_object->IsA<UStruct>())
32583262
{
32593263
UStructProperty *prop_struct = NewObject<UStructProperty>(function, UTF8_TO_TCHAR(p_name), RF_Public);
@@ -3334,12 +3338,14 @@ UFunction *unreal_engine_add_function(UClass *u_class, char *name, PyObject *py_
33343338
prop_struct->Struct = TBaseStructure<FTransform>::Get();
33353339
prop = prop_struct;
33363340
}
3341+
#if ENGINE_MINOR_VERSION > 15
33373342
else if ((PyTypeObject *)py_return_value == &ue_PyFQuatType)
33383343
{
33393344
UStructProperty *prop_struct = NewObject<UStructProperty>(function, UTF8_TO_TCHAR(p_name), RF_Public);
33403345
prop_struct->Struct = TBaseStructure<FQuat>::Get();
33413346
prop = prop_struct;
33423347
}
3348+
#endif
33433349
else if (PyObject_IsInstance(py_return_value, (PyObject *)&PyType_Type))
33443350
{
33453351
// Method annotation like foo:typing.Type[Pawn] produces annotations like typing.Type[Pawn], with .__args__ = (Pawn,)
@@ -3385,6 +3391,7 @@ UFunction *unreal_engine_add_function(UClass *u_class, char *name, PyObject *py_
33853391
prop_base->SetPropertyClass(p_u_class);
33863392
prop = prop_base;
33873393
}
3394+
#if ENGINE_MINOR_VERSION > 15
33883395
else if (py_obj->ue_object->IsA<UEnum>())
33893396
{
33903397
UEnumProperty *prop_enum = NewObject<UEnumProperty>(function, UTF8_TO_TCHAR(p_name), RF_Public);
@@ -3393,6 +3400,7 @@ UFunction *unreal_engine_add_function(UClass *u_class, char *name, PyObject *py_
33933400
prop_enum->AddCppProperty(prop_underlying);
33943401
prop = prop_enum;
33953402
}
3403+
#endif
33963404
else if (py_obj->ue_object->IsA<UStruct>())
33973405
{
33983406
UStructProperty *prop_struct = NewObject<UStructProperty>(function, UTF8_TO_TCHAR(p_name), RF_Public);

Source/UnrealEnginePython/Private/UObject/UEPySequencer.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,8 @@ PyObject *py_ue_sequencer_get_playback_range(ue_PyUObject *self, PyObject * args
926926
UMovieScene *scene = seq->GetMovieScene();
927927

928928
#if ENGINE_MINOR_VERSION < 20
929-
scene->GetPlaybackRange();
929+
TRange<float> range = scene->GetPlaybackRange();
930+
return Py_BuildValue("(ff)", range.GetLowerBoundValue(), range.GetUpperBoundValue());
930931
#else
931932
TRange<FFrameNumber> range = scene->GetPlaybackRange();
932933

@@ -1044,7 +1045,8 @@ PyObject *py_ue_sequencer_get_selection_range(ue_PyUObject *self, PyObject * arg
10441045
UMovieScene *scene = seq->GetMovieScene();
10451046

10461047
#if ENGINE_MINOR_VERSION < 20
1047-
scene->GetSelectionRange();
1048+
TRange<float> range = scene->GetSelectionRange();
1049+
return Py_BuildValue("(ff)", range.GetLowerBoundValue(), range.GetUpperBoundValue());
10481050
#else
10491051
TRange<FFrameNumber> range = scene->GetSelectionRange();
10501052

0 commit comments

Comments
 (0)