mirror of
https://github.com/4sval/FModel.git
synced 2026-03-21 17:24:26 -05:00
Fix issue with animation RateScale
Co-authored-by: Asval <asval.contactme@gmail.com>
This commit is contained in:
parent
500fa59f85
commit
83b5330d1e
|
|
@ -1,6 +1,5 @@
|
|||
using System.Numerics;
|
||||
using CUE4Parse_Conversion.Animations.PSA;
|
||||
using CUE4Parse.Utils;
|
||||
using ImGuiNET;
|
||||
|
||||
namespace FModel.Views.Snooper.Animations;
|
||||
|
|
@ -8,24 +7,24 @@ namespace FModel.Views.Snooper.Animations;
|
|||
public class Sequence
|
||||
{
|
||||
public readonly string Name;
|
||||
public readonly float TimePerFrame;
|
||||
public readonly float StartTime;
|
||||
public readonly float Duration;
|
||||
public readonly float EndTime;
|
||||
public readonly int EndFrame;
|
||||
public readonly int LoopingCount;
|
||||
public readonly bool IsAdditive;
|
||||
public readonly float TimePerFrame;
|
||||
|
||||
public Sequence(CAnimSequence sequence)
|
||||
{
|
||||
Name = sequence.Name;
|
||||
TimePerFrame = 1.0f / sequence.FramesPerSecond;
|
||||
StartTime = sequence.StartPos;
|
||||
Duration = sequence.AnimEndTime;
|
||||
EndTime = StartTime + Duration;
|
||||
EndFrame = (Duration / TimePerFrame).FloorToInt() - 1;
|
||||
EndFrame = sequence.NumFrames;
|
||||
LoopingCount = sequence.LoopingCount;
|
||||
IsAdditive = sequence.IsAdditive;
|
||||
TimePerFrame = Duration / EndFrame;
|
||||
}
|
||||
|
||||
public void DrawSequence(ImDrawListPtr drawList, ImFontPtr fontPtr, float x, Vector2 p2, Vector2 timeStep, Vector2 timeRatio, float t, bool animSelected)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user