Skip to content

Commit cd985c3

Browse files
author
Roberto De Ioris
committed
fixed 4.17 support
1 parent ca1a3c9 commit cd985c3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Source/UnrealEnginePython/Private/UObject/UEPySequencer.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@
2020
#include "Sections/MovieSceneVectorSection.h"
2121
#include "Runtime/MovieScene/Public/MovieSceneFolder.h"
2222
#include "Runtime/MovieScene/Public/MovieSceneSpawnable.h"
23+
#if ENGINE_MINOR_VERSION < 18
24+
#include "Editor/UnrealEd/Private/FbxImporter.h"
25+
#else
2326
#include "Editor/UnrealEd/Public/FbxImporter.h"
27+
#endif
2428
#include "Editor/MovieSceneTools/Public/MatineeImportTools.h"
2529
#endif
2630

@@ -1063,7 +1067,11 @@ PyObject *py_ue_sequencer_import_fbx_transform(ue_PyUObject *self, PyObject * ar
10631067
FbxImporter->PopulateAnimatedCurveData(CurveAPI);
10641068

10651069
TArray<FString> AllNodeNames;
1070+
#if ENGINE_MINOR_VERSION < 18
1071+
CurveAPI.GetAnimatedNodeNameArray(AllNodeNames);
1072+
#else
10661073
CurveAPI.GetAllNodeNameArray(AllNodeNames);
1074+
#endif
10671075

10681076
for (FString NodeName : AllNodeNames)
10691077
{
@@ -1075,6 +1083,7 @@ PyObject *py_ue_sequencer_import_fbx_transform(ue_PyUObject *self, PyObject * ar
10751083
FInterpCurveFloat EulerRotation[3];
10761084
FInterpCurveFloat Scale[3];
10771085
FTransform DefaultTransform;
1086+
#if ENGINE_MINOR_VERSION >= 18
10781087
CurveAPI.GetConvertedTransformCurveData(NodeName, Translation[0], Translation[1], Translation[2], EulerRotation[0], EulerRotation[1], EulerRotation[2], Scale[0], Scale[1], Scale[2], DefaultTransform);
10791088

10801089
for (int32 ChannelIndex = 0; ChannelIndex < 3; ++ChannelIndex)
@@ -1092,6 +1101,10 @@ PyObject *py_ue_sequencer_import_fbx_transform(ue_PyUObject *self, PyObject * ar
10921101
section->GetRotationCurve(ChannelAxis).SetDefaultValue(DefaultTransform.GetRotation().Euler()[ChannelIndex]);
10931102
section->GetScaleCurve(ChannelAxis).SetDefaultValue(DefaultTransform.GetScale3D()[ChannelIndex]);
10941103
}
1104+
#else
1105+
CurveAPI.GetConvertedTransformCurveData(NodeName, Translation[0], Translation[1], Translation[2], EulerRotation[0], EulerRotation[1], EulerRotation[2], Scale[0], Scale[1], Scale[2]);
1106+
1107+
#endif
10951108

10961109
float MinTime = FLT_MAX;
10971110
float MaxTime = -FLT_MAX;

0 commit comments

Comments
 (0)