示例#1
0
        public override bool Execute(TimelineWindow.TimelineState state, TimelineMarker[] markers)
        {
            PlayableDirector directorComponent = (state == null) ? null : state.currentDirector;
            bool             result;

            if (!markers.Any <TimelineMarker>())
            {
                result = false;
            }
            else
            {
                SelectionManager.Clear();
                for (int i = 0; i < markers.Length; i++)
                {
                    TimelineMarker theMarker      = markers[i];
                    TimelineMarker timelineMarker = MarkerModifiers.Duplicate(theMarker, directorComponent);
                    if (timelineMarker != null && state != null)
                    {
                        SelectionManager.Add(timelineMarker);
                    }
                }
                if (state != null)
                {
                    state.Refresh();
                }
                result = true;
            }
            return(result);
        }
 public static bool DuplicateEvents(TimelineMarker[] markers, PlayableDirector directorComponent)
 {
     for (int i = 0; i < markers.Length; i++)
     {
         TimelineMarker theMarker = markers[i];
         MarkerModifiers.Duplicate(theMarker, directorComponent);
     }
     return(true);
 }