diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-08-20 23:40:50 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-08-20 23:40:50 -0400 |
| commit | 3af4c218c0e70167db23a6303d2af30aff37d2fe (patch) | |
| tree | 927f29edcf54ab562f40f3d1c6cb69287c7f5980 /Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ClipsLayer.cs | |
| parent | b6daed0af784f4e9bc13329dd87c671b06ee1c65 (diff) | |
| download | Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.gz Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.bz2 Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.zip | |
Removed a bunch of stuff; Changes
Diffstat (limited to 'Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ClipsLayer.cs')
| -rw-r--r-- | Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ClipsLayer.cs | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ClipsLayer.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ClipsLayer.cs deleted file mode 100644 index 910123e..0000000 --- a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ClipsLayer.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using UnityEngine; -using UnityEngine.Timeline; - -namespace UnityEditor.Timeline -{ - class ClipsLayer : ItemsLayer - { - static readonly GUIStyle k_ConnectorIcon = DirectorStyles.Instance.connector; - - 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 override void Draw(Rect rect, WindowState state) - { - base.Draw(rect, state); //draw clips - DrawConnector(items.OfType<TimelineClipGUI>()); - } - - static void DrawConnector(IEnumerable<TimelineClipGUI> clips) - { - if (Event.current.type != EventType.Repaint) - return; - - foreach (var clip in clips) - { - if (clip.previousClip != null && clip.visible && clip.treeViewRect.width > 14 && - (DiscreteTime)clip.start == (DiscreteTime)clip.previousClip.end) - { - // draw little connector widget - var localRect = clip.treeViewRect; - localRect.x -= Mathf.Floor(k_ConnectorIcon.fixedWidth / 2.0f); - localRect.width = k_ConnectorIcon.fixedWidth; - localRect.height = k_ConnectorIcon.fixedHeight; - GUI.Label(localRect, GUIContent.none, k_ConnectorIcon); - } - } - } - } -} |
