public void AddAnimation(STAnimation animation, bool reset = true) { if (animation == null) { return; } if (reset) { Reset(); } currentAnimations.Add(animation); ResetModels(); animation.Reset(); totalFrame.Maximum = (decimal)FrameCount; totalFrame.Value = (decimal)FrameCount; currentFrameUpDown.Maximum = (decimal)FrameCount; currentFrameUpDown.Minimum = (decimal)StartFrame; animationTrackBar.FrameCount = (float)FrameCount; animationTrackBar.StartTime = (int)StartFrame; animationTrackBar.ActiveAnimation = animation; currentFrameUpDown.Value = (decimal)StartFrame; SetAnimationsToFrame(0); UpdateViewport(); }
public void AddAnimation(STAnimation animation, bool reset = true) { if (animation == null) { return; } if (reset) { Reset(); } Console.WriteLine($"Add anim " + animation.Name); currentAnimations.Add(animation); ResetModels(); animation.Reset(); totalFrame.Maximum = (decimal)FrameCount; totalFrame.Value = (decimal)FrameCount; currentFrameUpDown.Maximum = (decimal)FrameCount; animationTrackBar.ActiveAnimation = animation; animationTrackBar.FrameCount = (float)FrameCount; currentFrameUpDown.Value = 0; SetAnimationsToFrame(0); UpdateViewport(); }
public void AddAnimation(STAnimation animation, bool reset = true) { AnimationPlayer.AddAnimation(animation, "", reset); //Todo, high frame counts can cause freeze issues atm // if (AnimationPlayer.FrameCount < 500) // CurveEditor.SetFrameRange(AnimationPlayer.FrameCount); }
public void AddAnimation(STAnimation animation, bool reset = true) { if (animation == null) { return; } if (reset) { Reset(); } currentAnimations.Add(animation); float frameCount = uint.MinValue; float startFrame = uint.MaxValue; for (int i = 0; i < currentAnimations.Count; i++) { frameCount = Math.Max(frameCount, currentAnimations[i].FrameCount); startFrame = Math.Min(startFrame, currentAnimations[i].StartFrame); } if (frameCount != uint.MinValue && frameCount > startFrame) { FrameCount = frameCount; } else { FrameCount = 1; } if (startFrame != uint.MaxValue && frameCount > startFrame) { StartFrame = startFrame; } else { StartFrame = 0; } FrameCount = (float)Math.Round(FrameCount, 0); ResetModels(); animation.Reset(); totalFrame.Maximum = (decimal)FrameCount; totalFrame.Value = (decimal)FrameCount; currentFrameUpDown.Maximum = (decimal)FrameCount; currentFrameUpDown.Minimum = (decimal)StartFrame; animationTrackBar.FrameCount = (float)FrameCount; animationTrackBar.StartTime = (int)StartFrame; animationTrackBar.ActiveAnimation = animation; currentFrameUpDown.Value = (decimal)StartFrame; frameSpeedUD.Maximum = (decimal)animation.FrameRate * 2; frameSpeedUD.Value = (decimal)animation.FrameRate; SetAnimationsToFrame(0); UpdateViewport(); }
public void ClosePanel() { ResetModels(); renderThread.Abort(); renderThreadIsUpdating = false; stCurrentAnimation = null; currentAnimation = null; isOpen = false; Dispose(); Console.WriteLine("Disposeing ANIM PANEL!!"); }
public void AddAnimation(STAnimation animation, string groupName, bool reset = true) { if (animation == null || CurrentAnimations.Contains(animation)) { return; } if (reset) { ResetModels(); CurrentAnimations.Clear(); } animation.CanPlay = true; CurrentAnimations.Add(animation); StartFrame = animation.StartFrame; CurrentFrame = StartFrame; FrameCount = Math.Max(CurrentAnimations.Max(x => x.FrameCount), 1); }
public void AddAnimation(STAnimation animation, bool reset = true) { if (animation == null) { return; } if (reset) { Reset(); } currentAnimations.Add(animation); animation.Reset(); totalFrame.Maximum = (decimal)FrameCount; totalFrame.Value = (decimal)FrameCount; currentFrameUpDown.Maximum = (decimal)FrameCount; currentFrameUpDown.Value = 0; animationTrackBar.Maximum = (int)FrameCount; SetAnimationsToFrame(0); }
public bool HasAnimation(STAnimation animation) => CurrentAnimations.Contains(animation);
public void LoadAnimationFormat(STAnimation animFormat) { AnimationPanel.AddAnimation(animFormat); }
public void LoadFileFormat(STAnimation fileFormat) { Viewport.LoadAnimationFormat(fileFormat); }