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/space_graph/graph_draw.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/space_graph/graph_draw.c')
-rw-r--r--source/blender/editors/space_graph/graph_draw.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index e3a6d502332..f6d9406e7da 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -782,11 +782,20 @@ static short fcurve_needs_draw_fmodifier_controls (FCurve *fcu, FModifier *fcm)
if (fcu->modifiers.first == NULL)
return 0;
- /* if there's an active modifier - don't draw if it is cycles modifier, since
- * that basically still shows the original points
+ /* if there's an active modifier - don't draw if it doesn't drastically
+ * alter the curve...
*/
- if ((fcm) && (fcm->type == FMODIFIER_TYPE_CYCLES))
- return 0;
+ if (fcm) {
+ switch (fcm->type) {
+ /* clearly harmless */
+ case FMODIFIER_TYPE_CYCLES:
+ return 0;
+
+ /* borderline... */
+ case FMODIFIER_TYPE_NOISE:
+ return 0;
+ }
+ }
/* if only one modifier - don't draw if it is muted or disabled */
if (fcu->modifiers.first == fcu->modifiers.last) {
@@ -853,8 +862,10 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri
UI_ThemeColorShade(TH_HEADER, 50);
}
else {
- /* set whatever color the curve has set */
- glColor3fv(fcu->color);
+ /* set whatever color the curve has set
+ * - unselected curves draw less opaque to help distinguish the selected ones
+ */
+ glColor4f(fcu->color[0], fcu->color[1], fcu->color[2], ((sel) ? 1.0f : 0.5f));
}
/* anti-aliased lines for less jagged appearance */