Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Molina Garcia <jose_molinag@yahoo.es>2014-01-07 13:45:40 +0400
committerJoshua Leung <aligorith@gmail.com>2014-01-17 05:42:10 +0400
commit5e5b0cee4fc364eade49798baa9e312e9211799b (patch)
treee32bd4143a1144c871e71d35a573cc179fea1ca3 /source/blender/editors/animation/keyframes_draw.c
parent74ae93d1cd67becf89683be0b44a64e882a9429a (diff)
T37579: Theme settings for Keyframe Colours
This patch makes it possible to customise the colours used for the different keyframe types (Keyframe, Breakdown, Extreme, Jitter) and the border colours (normal and selected). Reviewed by: Joshua Leung
Diffstat (limited to 'source/blender/editors/animation/keyframes_draw.c')
-rw-r--r--source/blender/editors/animation/keyframes_draw.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index db51e3c2398..05c390d1462 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -599,27 +599,27 @@ void draw_keyframe_shape(float x, float y, float xscale, float hsize, short sel,
switch (key_type) {
case BEZT_KEYTYPE_BREAKDOWN: /* bluish frames for now */
{
- if (sel) glColor4f(0.33f, 0.75f, 0.93f, alpha);
- else glColor4f(0.70f, 0.86f, 0.91f, alpha);
+ if (sel) UI_ThemeColor(TH_KEYTYPE_BREAKDOWN_SELECT);
+ else UI_ThemeColor(TH_KEYTYPE_BREAKDOWN);
break;
}
case BEZT_KEYTYPE_EXTREME: /* redish frames for now */
{
- if (sel) glColor4f(0.95f, 0.5f, 0.5f, alpha);
- else glColor4f(0.91f, 0.70f, 0.80f, alpha);
+ if (sel) UI_ThemeColor(TH_KEYTYPE_EXTREME_SELECT);
+ else UI_ThemeColor(TH_KEYTYPE_EXTREME);
break;
}
case BEZT_KEYTYPE_JITTER: /* greenish frames for now? */
{
- if (sel) glColor4f(0.38f, 0.75f, 0.26f, alpha);
- else glColor4f(0.58f, 0.90f, 0.46f, alpha);
+ if (sel) UI_ThemeColor(TH_KEYTYPE_JITTER_SELECT);
+ else UI_ThemeColor(TH_KEYTYPE_JITTER);
break;
}
case BEZT_KEYTYPE_KEYFRAME: /* traditional yellowish frames for now */
default:
{
- if (sel) UI_ThemeColorShadeAlpha(TH_STRIP_SELECT, 50, -255 * (1.0f - alpha));
- else glColor4f(0.91f, 0.91f, 0.91f, alpha);
+ if (sel) UI_ThemeColor(TH_KEYTYPE_KEYFRAME_SELECT);
+ else UI_ThemeColor(TH_KEYTYPE_KEYFRAME);
break;
}
}
@@ -629,7 +629,8 @@ void draw_keyframe_shape(float x, float y, float xscale, float hsize, short sel,
if (ELEM(mode, KEYFRAME_SHAPE_FRAME, KEYFRAME_SHAPE_BOTH)) {
/* exterior - black frame */
- glColor4f(0.0f, 0.0f, 0.0f, alpha);
+ if (sel) UI_ThemeColor4(TH_KEYBORDER_SELECT);
+ else UI_ThemeColor4(TH_KEYBORDER);
glCallList(displist1);
}