コード例 #1
0
        public override bool Execute(TimelineWindow.TimelineState state)
        {
            bool result;

            if (SelectionManager.GetCurrentInlineEditorCurve() != null)
            {
                result = false;
            }
            else
            {
                ITimelineItem[] array = (from x in SelectionManager.SelectedItemGUI()
                                         select x.selectableObject as ITimelineItem).ToArray <ITimelineItem>();
                if (array.Length > 0)
                {
                    ItemActionInvoker.InvokeByName <TimelineClip>("DeleteClips", state, array);
                    ItemActionInvoker.InvokeByName <TimelineMarker>("DeleteMarkers", state, array);
                }
                TrackAsset[] array2 = SelectionManager.SelectedTracks().ToArray <TrackAsset>();
                if (array2.Length > 0)
                {
                    TrackAction.InvokeByName("DeleteTracks", state, array2);
                }
                result = (array.Length > 0 || array2.Length > 0);
            }
            return(result);
        }
コード例 #2
0
 public override bool Execute(TimelineWindow.TimelineState state)
 {
     ITimelineItem[] array = (from x in SelectionManager.SelectedItemGUI()
                              select x.selectableObject as ITimelineItem).ToArray <ITimelineItem>();
     if (array.Length > 0)
     {
         ItemActionInvoker.InvokeByName <TimelineClip>("DuplicateClips", state, array);
         ItemActionInvoker.InvokeByName <TimelineMarker>("DuplicateMarkers", state, array);
     }
     TrackAsset[] array2 = SelectionManager.SelectedTracks().ToArray <TrackAsset>();
     if (array2.Length > 0)
     {
         TrackAction.InvokeByName("DuplicateTracks", state, array2);
     }
     return(true);
 }