From ebe3923137cadefafeba75f5a11f79f1d160c483 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 9 Oct 2015 01:39:20 +1300 Subject: Graph Editor: Disable interpolation setting for enum/boolean FCurves, as no interpolation is performed on those --- source/blender/editors/space_graph/graph_buttons.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_graph') diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 8e471ceca95..0e9922e82a3 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) -- cgit v1.2.3