Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        private void UpdateAnimationPlayer(BxlanHeader animHeader)
        {
            if (AnimationPanel == null)
            {
                return;
            }

            if (ActiveLayout != null)
            {
                AnimationPanel.AddAnimation(animHeader.ToGenericAnimation(ActiveLayout), false);
                //   foreach (var anim in AnimationFiles)
                //     AnimationPanel.AddAnimation(anim.ToGenericAnimation(ActiveLayout), false);
            }
        }