Missing Animation Curves in Cooked Builds

anonymous_user_4ec72694
Fri, 29 Sep 2017 21:55:03 +0000
Character & Animation

We are noticing our animation curves in 4.17.2 is being dropped in cooked builds. I came across this piece of code in AnimSequence which clears the animation curves before serializing and then put back the curves. We basically disabled this portion of the code and now our animation curves came back in cooked builds. Is there another way to put in animation curves? Are we missing a step for cooking animation curves? Or is this the plan to not use animation curves?

thanks
–bill

void UAnimSequence::Serialize(FArchive& Ar)
{
	Ar.UsingCustomVersion(FFrameworkObjectVersion::GUID);

	FRawCurveTracks RawCurveCache;

	if (Ar.IsCooking())
	{
		RawCurveCache.FloatCurves = MoveTemp(RawCurveData.FloatCurves);
		RawCurveData.FloatCurves.Reset();

#if WITH_EDITORONLY_DATA
		RawCurveCache.VectorCurves = MoveTemp(RawCurveData.VectorCurves);
		RawCurveData.VectorCurves.Reset();

		RawCurveCache.TransformCurves = MoveTemp(RawCurveData.TransformCurves);
		RawCurveData.TransformCurves.Reset();
#endif
	}

	Super::Serialize(Ar);

	if (Ar.IsCooking())
	{
		RawCurveData.FloatCurves = MoveTemp(RawCurveCache.FloatCurves);
#if WITH_EDITORONLY_DATA
		RawCurveData.VectorCurves = MoveTemp(RawCurveCache.VectorCurves);
		RawCurveData.TransformCurves = MoveTemp(RawCurveCache.TransformCurves);
#endif
	}

9 posts - 1 participant