Skip to content

Commit

Permalink
fixed UE5 packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeioris committed Apr 30, 2022
1 parent 4b04349 commit befee90
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2051,9 +2051,15 @@ UAnimSequence* FglTFRuntimeParser::LoadSkeletalAnimation(USkeletalMesh * Skeleta
}

#if ENGINE_MAJOR_VERSION > 4
#if WITH_EDITOR
FAnimationCurveData& RawCurveData = const_cast<FAnimationCurveData&>(AnimSequence->GetDataModel()->GetCurveData());
int32 NewCurveIndex = RawCurveData.FloatCurves.Add(FFloatCurve(SmartName, 0));
FFloatCurve* NewCurve = &RawCurveData.FloatCurves[NewCurveIndex];
#else
FRawCurveTracks& CurveTracks = const_cast<FRawCurveTracks&>(AnimSequence->GetCurveData());
int32 NewCurveIndex = CurveTracks.FloatCurves.Add(FFloatCurve(SmartName, 0));
FFloatCurve* NewCurve = &CurveTracks.FloatCurves[NewCurveIndex];
#endif
#else
AnimSequence->RawCurveData.AddCurveData(SmartName);
FFloatCurve* NewCurve = (FFloatCurve*)AnimSequence->RawCurveData.GetCurveData(SmartName.UID, ERawCurveTrackTypes::RCT_Float);
Expand Down

0 comments on commit befee90

Please sign in to comment.