Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
 public static IEnumerable <TimelineClipGUI> SelectedClipGUI()
 {
     foreach (var clip in SelectedClips())
     {
         var gui = ItemToItemGui.GetGuiForClip(clip);
         if (gui != null)
         {
             yield return(gui);
         }
     }
 }