Cleanup: remove GPENCIL_OT_sculpt_select

This can be done via WM_OT_context_set_enum
This commit is contained in:
Campbell Barton
2018-11-07 12:04:03 +11:00
parent 101fd08348
commit 6bda925aa1
3 changed files with 0 additions and 50 deletions

View File

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

View File

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

View File

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