[Bf-blender-cvs] [ebe3923] master: Graph Editor: Disable interpolation setting for enum/boolean FCurves, as no interpolation is performed on those

Joshua Leung noreply at git.blender.org
Mon Oct 26 08:19:33 CET 2015


Commit: ebe3923137cadefafeba75f5a11f79f1d160c483
Author: Joshua Leung
Date:   Fri Oct 9 01:39:20 2015 +1300
Branches: master
https://developer.blender.org/rBebe3923137cadefafeba75f5a11f79f1d160c483

Graph Editor: Disable interpolation setting for enum/boolean FCurves, as no interpolation is performed on those

===================================================================

M	source/blender/editors/space_graph/graph_buttons.c

===================================================================

diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index 8e471ce..0e9922e 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -355,7 +355,12 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa)
 		
 		/* interpolation */
 		col = uiLayoutColumn(layout, false);
-		uiItemR(col, &bezt_ptr, "interpolation", 0, NULL, ICON_NONE);
+		if (fcu->flag & FCURVE_DISCRETE_VALUES) {
+			uiItemL(col, IFACE_("Interpolation: Enums/Booleans cannot be interpolated"), ICON_NONE);
+		}
+		else {
+			uiItemR(col, &bezt_ptr, "interpolation", 0, NULL, ICON_NONE);
+		}
 		
 		/* easing type */
 		if (bezt->ipo > BEZT_IPO_BEZ)




More information about the Bf-blender-cvs mailing list