public ITimelineItem CloneTo(TrackAsset parent, double time) { var item = new MarkerItem(MarkerModifier.CloneMarkerToParent(m_Marker, parent)); item.start = time; return(item); }
internal static ItemsPerTrack DuplicateItems(ItemsPerTrack items, TrackAsset target, WindowState state, string undoOperation) { var duplicatedItems = new List <ITimelineItem>(); PlayableDirector director = null; if (state != null) { director = state.editSequence.director; } var clips = items.clips.ToList(); if (clips.Any()) { TimelineUndo.PushUndo(target, undoOperation); duplicatedItems.AddRange(DuplicateClips(clips, director, target).ToItems()); TimelineUndo.PushUndo(target, undoOperation); // second undo causes reference fixups on redo (case 1063868) } var markers = items.markers.ToList(); if (markers.Any()) { duplicatedItems.AddRange(MarkerModifier.CloneMarkersToParent(markers, target).ToItems()); } return(new ItemsPerTrack(target, duplicatedItems.ToArray())); }
public static IMarker AddMarkerCommand(TrackAsset target, Type markerType, double time) { SelectionManager.Clear(); var marker = MarkerModifier.CreateMarkerAtTime(target, markerType, time); TimelineWindow.instance.state.Refresh(); return(marker); }
internal static ItemsPerTrack DuplicateItems(ItemsPerTrack items, TrackAsset target, IExposedPropertyTable sourceTable, IExposedPropertyTable destTable, string undoOperation) { var duplicatedItems = new List <ITimelineItem>(); var clips = items.clips.ToList(); if (clips.Any()) { TimelineUndo.PushUndo(target, undoOperation); duplicatedItems.AddRange(DuplicateClips(clips, sourceTable, destTable, target).ToItems()); TimelineUndo.PushUndo(target, undoOperation); // second undo causes reference fixups on redo (case 1063868) } var markers = items.markers.ToList(); if (markers.Any()) { duplicatedItems.AddRange(MarkerModifier.CloneMarkersToParent(markers, target).ToItems()); } return(new ItemsPerTrack(target, duplicatedItems.ToArray())); }
public void Delete() { MarkerModifier.DeleteMarker(m_Marker); }