Skip to content

Commit 3a3671d

Browse files
committed
Bfres animation conversion fixes when frames are over 1023.
1 parent 77434c0 commit 3a3671d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Plugins/CafeLibrary/Bfres/Editing/AnimConversion/MaterialAnimConverter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ static CurveAnimHelper ConvertCurve(BfresAnimationTrack track, uint target)
156156
}
157157

158158
curve.KeyType = track.KeyType;
159-
curve.FrameType = track.FrameType;
160-
161159
//Get max frame value
162160
float frame = curve.KeyFrames.Max(x => x.Key);
161+
162+
curve.FrameType = AnimCurveFrameType.Single;
163163
if (frame < byte.MaxValue) curve.FrameType = AnimCurveFrameType.Byte;
164-
// else if (frame < ushort.MaxValue) curve.FrameType = AnimCurveFrameType.Decimal10x5;
164+
else if (frame <= 1023) curve.FrameType = AnimCurveFrameType.Decimal10x5; // (max 10 bits)
165165

166166
return curve;
167167
}

Track Studio/Lib/BfresLibrary.dll

2 KB
Binary file not shown.

0 commit comments

Comments
 (0)