Example #1
0
 public void DrawBlendingCurves(TimelineWindow.TimelineState state)
 {
     if (Event.get_current().get_type() == 7)
     {
         Color color = (!SelectionManager.Contains(this.clip)) ? Color.get_white() : TrackDrawer.GetHighlightColor(Color.get_white());
         Color colorTrackBackground = DirectorStyles.Instance.customSkin.colorTrackBackground;
         Color color2 = (!SelectionManager.Contains(this.clip)) ? DirectorStyles.Instance.customSkin.colorTrackBackground : Color.get_white();
         if (this.blendInKind == TimelineClipGUI.BlendKind.Ease)
         {
             ClipRenderer.RenderTexture(this.mixInRect, DirectorStyles.Instance.timelineClip.get_normal().get_background(), DirectorStyles.Instance.blendingIn.get_normal().get_background(), color, false);
             EditorGUI.DrawRect(new Rect(this.mixInRect.get_xMax() - 2f, this.mixInRect.get_yMin(), 2f, this.mixInRect.get_height()), colorTrackBackground);
             Graphics.DrawAAPolyLine(4f, new Vector3[]
             {
                 new Vector3(this.mixInRect.get_xMin() + 1f, this.mixInRect.get_yMax() - 1f, 0f),
                 new Vector3(this.mixInRect.get_xMax(), this.mixInRect.get_yMin() - 1.5f, 0f)
             }, color2);
         }
         if (this.blendOutKind == TimelineClipGUI.BlendKind.Ease || this.blendOutKind == TimelineClipGUI.BlendKind.Mix)
         {
             ClipRenderer.RenderTexture(this.mixOutRect, DirectorStyles.Instance.timelineClip.get_normal().get_background(), DirectorStyles.Instance.blendingOut.get_normal().get_background(), color, false);
             EditorGUI.DrawRect(new Rect(this.mixOutRect.get_xMin(), this.mixOutRect.get_yMin(), 2f, this.mixOutRect.get_height()), colorTrackBackground);
             Graphics.DrawLineAA(4f, new Vector3(this.mixOutRect.get_xMin() + 1.5f, this.mixOutRect.get_yMin() + 1.5f, 0f), new Vector3(this.mixOutRect.get_xMax(), this.mixOutRect.get_yMax() - 1f, 0f), color2);
         }
         if (this.blendInKind == TimelineClipGUI.BlendKind.Mix)
         {
             ClipRenderer.RenderTexture(this.mixInRect, DirectorStyles.Instance.timelineClip.get_normal().get_background(), DirectorStyles.Instance.blendingOut.get_normal().get_background(), color, false);
             EditorGUI.DrawRect(new Rect(this.mixInRect.get_xMax(), this.mixInRect.get_yMin(), 2f, this.mixOutRect.get_height()), colorTrackBackground);
             Graphics.DrawAAPolyLine(4f, new Vector3[]
             {
                 new Vector3(this.mixInRect.get_xMin(), this.mixInRect.get_yMin(), 0f),
                 new Vector3(this.mixInRect.get_xMax(), this.mixInRect.get_yMax() - 1f, 0f)
             }, color2);
         }
     }
 }
 public static void RenderClip(Rect r, Color color)
 {
     ClipRenderer.RenderTexture(r, DirectorStyles.Instance.timelineClip, color);
 }