Blender Git Commit Log

Git Commits -> Revision 844db37

Revision 844db37 by Joshua Leung (master)
February 15, 2009, 10:58 (GMT)
Graph Editor: F-Curve Colouring

Now F-Curve channels in channels region are drawn with the same colour as their respective curve is drawn in the curves area. I've had to make a compromise to store such colour info in F-Curves themselves, which is not terribly ideal if the F-Curve gets reused in some way. However, for now, this will do (special tweaks can be made to make this work better though).

I've also added a colour-determination mode per curve which should in future allow more control over this. By default, all curves still use the old 'rainbow' style. The available types area:
* Old Rainbow - Colour is determined 'automatically' using a magic method which uses curve position + total curves to generate a colour.
* Auto RGB - Color is determined using the 'array index' stored in F-Curve for data-access. An unresolved issue with this is that all the curves with this will end up with exactly the same colour, leading to confusion (i.e. all location.x and scale.x properties could potentially all be the same red colour).
* Custom colour - self explanatory

Currently, there's a minor bug when loading old files where the colours don't get initialised yet. For now, just clicking in the Graph Editor after file-load will solve any of these problems.
Ton: it looks like area->refresh() isn't getting called after file read.

Commit Details:

Full Hash: 844db375593d2a02f9182f9c195316de01253b67
SVN Revision: 18978
Parent Commit: 394b3fc
Lines Changed: +102, -33

5 Modified Paths:

/source/blender/editors/animation/anim_ipo_utils.c (+5, -2) (Diff)
/source/blender/editors/include/ED_anim_api.h (+1, -1) (Diff)
/source/blender/editors/space_graph/graph_draw.c (+12, -30) (Diff)
/source/blender/editors/space_graph/space_graph.c (+73, -0) (Diff)
/source/blender/makesdna/DNA_anim_types.h (+11, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021