void Instance_MainM2SceneNodeChanged(object sender, M2SceneNode node) { _animationSelect.ClearAll(); if (node != null) { for (uint i = 0; i < node.AnimationCount; ++i) { SAnimation?anim = node.GetAnimation(i); if (anim != null) { string name = anim.Value.name; if (!(anim.Value.subIndex == 0 && anim.Value.next == -1)) { name += "(" + anim.Value.subIndex.ToString() + ")"; } _animationSelect.AddAnimation(name, anim.Value.length, anim.Value.animIndex); } } _animationSelect.RecalculateScrollWidth(); _animationSelect.SelectAnimation(node.AnimationPlayer.CurrentAnimationIndex, node.AnimationPlayer.Loop); } }