Пример #1
0
        private void RemoveAnimationTrack()
        {
            USUndoManager.RegisterCompleteObjectUndo(AnimationTimeline, "Remove Track");
            AnimationTimeline.RemoveTrack(AnimationTrack);

            AnimationTimelineHierarchy.RemoveAnimationTrack(AnimationTrack);
        }
        public void RemoveAnimationTrack(AnimationTrack track)
        {
            USUndoManager.RegisterCompleteObjectUndo(AnimationTimeline, "Add New Track");
            AnimationTimeline.RemoveTrack(track);

            USUndoManager.RegisterCompleteObjectUndo(USHierarchy, "Add New Track");
            USHierarchy.RootItems.Remove(USHierarchy.RootItems.Where(item => ((USAnimationTimelineTrackHierarchyItem)item).AnimationTrack == track).First());

            USUndoManager.DestroyImmediate(track);
        }