[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18935] branches/blender2.5/blender/source /blender/editors/space_graph/graph_draw.c: Graph Editor: Experimental variations of curve display

Joshua Leung aligorith at gmail.com
Thu Feb 12 02:47:45 CET 2009


Revision: 18935
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18935
Author:   aligorith
Date:     2009-02-12 02:47:45 +0100 (Thu, 12 Feb 2009)

Log Message:
-----------
Graph Editor: Experimental variations of curve display

* Uneditable F-Curves are drawn with dotted lines (and no handles)
* Muted F-Curves are drawn with a greyish colour. I'm not sure how visible this will be under some other colour schemes. Perhaps this needs as separate theme colour?

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/editors/space_graph/graph_draw.c

Modified: branches/blender2.5/blender/source/blender/editors/space_graph/graph_draw.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_graph/graph_draw.c	2009-02-12 01:46:38 UTC (rev 18934)
+++ branches/blender2.5/blender/source/blender/editors/space_graph/graph_draw.c	2009-02-12 01:47:45 UTC (rev 18935)
@@ -707,11 +707,29 @@
 		
 		/* draw curve - we currently calculate colour on the fly, but that should probably be done in advance instead */
 		if ( ((fcu->bezt) || (fcu->fpt)) && (fcu->totvert) ) { 
-			col= ipo_rainbow(i, items);
-			cpack(col);
+			/* set color/drawing style for curve itself */
+			if (fcu->flag & FCURVE_PROTECTED) {
+				/* protected curves (non editable) are drawn with dotted lines */
+				setlinestyle(2);
+			}
+			if (fcu->flag & FCURVE_MUTED) {
+				/* muted curves are drawn in a greyish hue */
+				// XXX should we have some variations?
+				UI_ThemeColorShade(TH_HEADER, 50);
+			}
+			else {
+				// XXX color calculation here really needs to be done in advance instead
+				col= ipo_rainbow(i, items);
+				cpack(col);
+			}
 			
+			/* draw F-Curve */
 			draw_fcurve_repeat(fcu, &ar->v2d, 0, 0, &fac); // XXX this call still needs a lot more work
 			
+			/* restore settings */
+			setlinestyle(0);
+			
+			
 			/* draw handles and vertices as appropriate */
 			if (fcu->bezt) {
 				/* only draw handles/vertices on keyframes */





More information about the Bf-blender-cvs mailing list