diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-07 04:04:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-07 04:04:03 +0300 |
commit | 6bda925aa118bf0de2368c6fbd7387434cfa4dc3 (patch) | |
tree | 489fbf30a5fb4444dece0e07daa8e9e3c5a70ac8 /source/blender/editors/gpencil | |
parent | 101fd08348e5717f98af93481e6cc97d3bf920c3 (diff) |
Cleanup: remove GPENCIL_OT_sculpt_select
This can be done via WM_OT_context_set_enum
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_data.c | 46 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_ops.c | 2 |
3 files changed, 0 insertions, 50 deletions
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index 458e9d0eb41..a9cd868aff3 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -1546,52 +1546,6 @@ void GPENCIL_OT_brush_presets_create(wmOperatorType *ot) } -/* ***************** Select Sculpt Brush ************************ */ - -static int gp_sculpt_select_exec(bContext *C, wmOperator *op) -{ - ToolSettings *ts = CTX_data_tool_settings(C); - - /* if there's no existing container */ - if (ts == NULL) { - BKE_report(op->reports, RPT_ERROR, "Nowhere to go"); - return OPERATOR_CANCELLED; - } - - const int index = RNA_int_get(op->ptr, "index"); - GP_BrushEdit_Settings *gp_sculpt = &ts->gp_sculpt; - /* sanity checks */ - if (ELEM(NULL, gp_sculpt)) { - return OPERATOR_CANCELLED; - } - - if (index < TOT_GP_EDITBRUSH_TYPES - 1) { - gp_sculpt->brushtype = index; - } - /* notifiers */ - WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); - - return OPERATOR_FINISHED; -} - -void GPENCIL_OT_sculpt_select(wmOperatorType *ot) -{ - /* identifiers */ - ot->name = "Select Sculpt Brush"; - ot->idname = "GPENCIL_OT_sculpt_select"; - ot->description = "Select a Grease Pencil sculpt brush"; - - /* callbacks */ - ot->exec = gp_sculpt_select_exec; - ot->poll = gp_add_poll; - - /* flags */ - ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - - /* properties */ - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "Index of Sculpt Brush", 0, INT_MAX); -} - /*********************** Vertex Groups ***********************************/ static bool gpencil_vertex_group_poll(bContext *C) diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h index bed4811d7bb..4656c6fc20c 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -387,8 +387,6 @@ void GPENCIL_OT_stroke_split(struct wmOperatorType *ot); void GPENCIL_OT_brush_presets_create(struct wmOperatorType *ot); -void GPENCIL_OT_sculpt_select(struct wmOperatorType *ot); - /* undo stack ---------- */ void gpencil_undo_init(struct bGPdata *gpd); diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c index 968233866f6..6a3047d7c2f 100644 --- a/source/blender/editors/gpencil/gpencil_ops.c +++ b/source/blender/editors/gpencil/gpencil_ops.c @@ -764,8 +764,6 @@ void ED_operatortypes_gpencil(void) WM_operatortype_append(GPENCIL_OT_brush_presets_create); - WM_operatortype_append(GPENCIL_OT_sculpt_select); - /* vertex groups */ WM_operatortype_append(GPENCIL_OT_vertex_group_assign); WM_operatortype_append(GPENCIL_OT_vertex_group_remove_from); |