예제 #1
0
        public override bool Execute(TimelineWindow.TimelineState state)
        {
            IEnumerable <EditorClip> data = Clipboard.GetData <EditorClip>();

            foreach (EditorClip current in data)
            {
                double end = current.clip.parentTrack.clips.Last <TimelineClip>().end;
                current.clip.DuplicateAtTime(current.clip.parentTrack, end, state.currentDirector);
            }
            IEnumerable <EditorMarker> data2 = Clipboard.GetData <EditorMarker>();

            foreach (EditorMarker current2 in data2)
            {
                double newTime = current2.theMarker.parentTrack.end + 0.5;
                MarkerModifiers.DuplicateAtTime(current2.theMarker, state.currentDirector, newTime);
            }
            IEnumerable <TrackAsset> data3 = Clipboard.GetData <TrackAsset>();

            foreach (TrackAsset current3 in data3)
            {
                current3.Duplicate(state.currentDirector, state.timeline);
            }
            state.Refresh();
            return(true);
        }
예제 #2
0
 private static void DoPasteMarkers(TimelineWindow.TimelineState state, TrackAsset track)
 {
     if (track is ITimelineMarkerContainer)
     {
         List <TimelineMarker> list = (from x in Clipboard.GetData <EditorMarker>()
                                       select x.theMarker into x
                                       orderby x.time
                                       select x).ToList <TimelineMarker>();
         double num = 0.0;
         if (list.Count <TimelineMarker>() == 0)
         {
             num = 0.0;
         }
         else
         {
             num = list.Last <TimelineMarker>().time + 0.5;
         }
         TimelineMarker timelineMarker = null;
         foreach (TimelineMarker current in list)
         {
             if (current != null)
             {
                 if (timelineMarker != null)
                 {
                     num += current.time - timelineMarker.time;
                 }
                 MarkerModifiers.DuplicateAtTime(current, track, state.currentDirector, num);
                 timelineMarker = current;
             }
         }
     }
 }
 public static TimelineMarker DuplicateAtTime(TimelineMarker theMarker, PlayableDirector directorComponent, double newTime)
 {
     return(MarkerModifiers.DuplicateAtTime(theMarker, null, directorComponent, newTime));
 }
 public static TimelineMarker Duplicate(TimelineMarker theMarker, PlayableDirector directorComponent)
 {
     return(MarkerModifiers.DuplicateAtTime(theMarker, directorComponent, MarkerModifiers.FindEventInsertionTime(theMarker)));
 }