From a31b162c6e457dd3c5475970deb4f0ff096c237d Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Mon, 22 Mar 2021 15:58:59 +0100 Subject: GPencil: Hide Interpolate Only Selected in Draw Mode This option is only valid in Edit mode. Also changed the space between options to improve UI. Reviewed by: @mendio --- .../blender/editors/gpencil/gpencil_interpolate.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/gpencil/gpencil_interpolate.c') diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c index 1281f1392d8..bfa1ee6bcaf 100644 --- a/source/blender/editors/gpencil/gpencil_interpolate.c +++ b/source/blender/editors/gpencil/gpencil_interpolate.c @@ -1427,15 +1427,26 @@ static void gpencil_interpolate_seq_ui(bContext *C, wmOperator *op) uiLayoutSetPropSep(layout, true); uiLayoutSetPropDecorate(layout, false); + row = uiLayoutRow(layout, true); + uiItemR(row, &ptr, "step", 0, NULL, ICON_NONE); + + row = uiLayoutRow(layout, true); + uiItemR(row, &ptr, "layers", 0, NULL, ICON_NONE); + + if (CTX_data_mode_enum(C) == CTX_MODE_EDIT_GPENCIL) { + row = uiLayoutRow(layout, true); + uiItemR(row, &ptr, "interpolate_selected_only", 0, NULL, ICON_NONE); + } + + row = uiLayoutRow(layout, true); + uiItemR(row, &ptr, "flip", 0, NULL, ICON_NONE); col = uiLayoutColumn(layout, true); - uiItemR(col, &ptr, "step", 0, NULL, ICON_NONE); - uiItemR(col, &ptr, "layers", 0, NULL, ICON_NONE); - uiItemR(col, &ptr, "interpolate_selected_only", 0, NULL, ICON_NONE); - uiItemR(col, &ptr, "flip", 0, NULL, ICON_NONE); uiItemR(col, &ptr, "smooth_factor", 0, NULL, ICON_NONE); uiItemR(col, &ptr, "smooth_steps", 0, NULL, ICON_NONE); - uiItemR(col, &ptr, "type", 0, NULL, ICON_NONE); + + row = uiLayoutRow(layout, true); + uiItemR(row, &ptr, "type", 0, NULL, ICON_NONE); if (type == GP_IPO_CURVEMAP) { /* Get an RNA pointer to ToolSettings to give to the custom curve. */ -- cgit v1.2.3