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:
authorJoshua Leung <aligorith@gmail.com>2009-05-18 06:23:20 +0400
committerJoshua Leung <aligorith@gmail.com>2009-05-18 06:23:20 +0400
commite67e7049f9413cc070a2b2f8818ead00fb789a1c (patch)
tree9ae630897f393b4d13a04a7cb15c86c36e04a96c /source/blender/editors/animation/anim_ipo_utils.c
parent7eeb8ac01cea69fc8dbf3e4a58179b1026fc6198 (diff)
Graph Editor: Attempts at Improving Curve Drawing
* Trying a slightly different approach with curve drawing. Now curves aren't drawn darker down the list, as that approach proved to have massive contrast issues all around. However, it's not completely back to the old rainbow style, as the colours are still grouped in 3's and 4's, only that they now use hue offsets... * Unselected curves are now drawn less opaque. However, selected curves still leave some brightness to be desired... * Bugfix - Deselecting keyframes in graph view now deselects the curves too.
Diffstat (limited to 'source/blender/editors/animation/anim_ipo_utils.c')
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 14780ebb794..c2a1199f6c6 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -242,14 +242,17 @@ void ipo_rainbow (int cur, int tot, float *out)
* with some other stuff
*/
fac = ((float)cur / (float)tot) * 0.7f;
- val = 1.0f - fac;
/* the base color can get offset a bit so that the colors aren't so identical */
hue += fac * HSV_BANDWIDTH;
if (hue > 1.0f) hue= fmod(hue, 1.0f);
- /* saturation fluctuates between 0.5 and 1.0 */
- sat = ((cur / grouping) % 2) ? 0.61f : 0.96f;
+ /* saturation adjustments for more visible range */
+ if ((hue > 0.5f) && (hue < 0.8f)) sat= 0.5f;
+ else sat= 0.6f;
+
+ /* value is fixed at 1.0f, otherwise we cannot clearly see the curves... */
+ val= 1.0f;
/* finally, conver this to RGB colors */
hsv_to_rgb(hue, sat, val, out, out+1, out+2);