private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { if (e.Node.Tag == null) { return; } CurveEditor.Tracks.Clear(); if (ActiveAnim != null) { LytAnimation animation = ActiveAnim.ToGenericAnimation(ParentEditor.ActiveLayout); Console.WriteLine($"animation {animation != null}"); if (animation != null) { Console.WriteLine($"tag {e.Node.Tag}"); if (e.Node.Tag is BxlanPaiTag) { var target = (BxlanPaiTag)e.Node.Tag; var track = animation.FindTarget(target, 0); if (track != null) { CurveEditor.Tracks.Add(track); } } } } CurveEditor.UpdateViewport(); stPropertyGrid1.LoadProperty(e.Node.Tag, PropertyChanged); }
public void LoadFile(LytAnimation lytAnimation) { ActiveAnimation = lytAnimation; var bxlan = lytAnimation.BxlanAnimation; stComboBox1.BeginUpdate(); stComboBox1.Items.Clear(); foreach (var group in lytAnimation.AnimGroups) { stComboBox1.Items.Add(group.Name); } stComboBox1.EndUpdate(); // keyedAnimTimeline1.AddAnimation(lytAnimation, true); // keyedAnimTimeline1.OnAnimationFrameAdvance += AnimationFrameAdvance; }