[Bf-blender-cvs] [6bda925aa11] blender2.8: Cleanup: remove GPENCIL_OT_sculpt_select

Campbell Barton noreply at git.blender.org
Wed Nov 7 02:19:03 CET 2018


Commit: 6bda925aa118bf0de2368c6fbd7387434cfa4dc3
Author: Campbell Barton
Date:   Wed Nov 7 12:04:03 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB6bda925aa118bf0de2368c6fbd7387434cfa4dc3

Cleanup: remove GPENCIL_OT_sculpt_select

This can be done via WM_OT_context_set_enum

===================================================================

M	source/blender/editors/gpencil/gpencil_data.c
M	source/blender/editors/gpencil/gpencil_intern.h
M	source/blender/editors/gpencil/gpencil_ops.c

===================================================================

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



More information about the Bf-blender-cvs mailing list