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

This commit is contained in:
Joshua Leung
2015-10-09 01:39:20 +13:00
parent c3cec828e8
commit ebe3923137

View File

@@ -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)