public ClipsLayer(Layer layerOrder, IRowGUI parent) : base(layerOrder) { var track = parent.asset; track.SortClips(); TimelineClipGUI previousClipGUI = null; foreach (var clip in track.clips) { var oldClipGUI = ItemToItemGui.GetGuiForClip(clip); var isInvalid = oldClipGUI != null && oldClipGUI.isInvalid; // HACK Make sure to carry invalidy state when refereshing the cache. var currentClipGUI = new TimelineClipGUI(clip, parent, this) { isInvalid = isInvalid }; if (previousClipGUI != null) { previousClipGUI.nextClip = currentClipGUI; } currentClipGUI.previousClip = previousClipGUI; AddItem(currentClipGUI); previousClipGUI = currentClipGUI; } }
public static IEnumerable <TimelineClipGUI> SelectedClipGUI() { foreach (var clip in SelectedClips()) { var gui = ItemToItemGui.GetGuiForClip(clip); if (gui != null) { yield return(gui); } } }
public TimelineClipGUI(TimelineClip clip, IRowGUI parent, IZOrderProvider provider) : base(parent) { zOrderProvider = provider; zOrder = provider.Next(); m_EditorItem = EditorClipFactory.GetEditorClip(clip); m_ClipEditor = CustomTimelineEditorCache.GetClipEditor(clip); supportResize = true; leftHandle = new TimelineClipHandle(this, TrimEdge.Start); rightHandle = new TimelineClipHandle(this, TrimEdge.End); ItemToItemGui.Add(clip, this); }
public TimelineClipGUI(TimelineClip clip, IRowGUI parent, IZOrderProvider provider) : base(parent) { zOrderProvider = provider; zOrder = provider.Next(); m_EditorItem = EditorClipFactory.GetEditorClip(clip); clip.dirtyHash = 0; supportResize = true; m_LeftHandle = new TimelineClipHandle(this, TrimEdge.Start); m_RightHandle = new TimelineClipHandle(this, TrimEdge.End); ItemToItemGui.Add(clip, this); }
public TimelineMarkerGUI(IMarker theMarker, IRowGUI parent, IZOrderProvider provider) : base(parent) { marker = theMarker; m_Selectable = marker.GetType().IsSubclassOf(typeof(UnityObject)); m_MarkerHash = 0; var o = marker as object; if (!o.Equals(null)) { m_MarkerHash = o.GetHashCode(); } zOrderProvider = provider; zOrder = zOrderProvider.Next(); ItemToItemGui.Add(marker, this); }