[Bf-blender-cvs] [033f1871b65] greasepencil-object: Fix error with select sculpt brush with keys
Antonio Vazquez
noreply at git.blender.org
Mon Jun 12 12:00:30 CEST 2017
Commit: 033f1871b657d8dd9619574b0a987fb5079bd2a3
Author: Antonio Vazquez
Date: Mon Jun 12 12:00:06 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB033f1871b657d8dd9619574b0a987fb5079bd2a3
Fix error with select sculpt brush with keys
When press 3, the brush 4 was selected. Fixed the error and reorganized brushes.
===================================================================
M source/blender/editors/gpencil/gpencil_data.c
M source/blender/makesdna/DNA_scene_types.h
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 7612454ca6f..f76cd7b1385 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -1459,14 +1459,8 @@ static int gp_sculpt_select_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- if (index < TOT_GP_EDITBRUSH_TYPES) {
- if (index < 7) {
- gp_sculpt->brushtype = index;
- }
- else {
- /* brushes 7 and 8 not used */
- gp_sculpt->brushtype = index + 2;
- }
+ if (index < TOT_GP_EDITBRUSH_TYPES - 1) {
+ gp_sculpt->brushtype = index;
}
/* notifiers */
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 6eb5875ff77..91453cc492f 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1186,15 +1186,15 @@ enum {
typedef enum eGP_EditBrush_Types {
GP_EDITBRUSH_TYPE_SMOOTH = 0,
GP_EDITBRUSH_TYPE_THICKNESS = 1,
- GP_EDITBRUSH_TYPE_GRAB = 2,
- GP_EDITBRUSH_TYPE_PUSH = 3,
- GP_EDITBRUSH_TYPE_TWIST = 4,
- GP_EDITBRUSH_TYPE_PINCH = 5,
- GP_EDITBRUSH_TYPE_RANDOMIZE = 6,
- GP_EDITBRUSH_TYPE_SUBDIVIDE = 7,
- GP_EDITBRUSH_TYPE_SIMPLIFY = 8,
- GP_EDITBRUSH_TYPE_CLONE = 9,
- GP_EDITBRUSH_TYPE_STRENGTH = 10,
+ GP_EDITBRUSH_TYPE_STRENGTH = 2,
+ GP_EDITBRUSH_TYPE_GRAB = 3,
+ GP_EDITBRUSH_TYPE_PUSH = 4,
+ GP_EDITBRUSH_TYPE_TWIST = 5,
+ GP_EDITBRUSH_TYPE_PINCH = 6,
+ GP_EDITBRUSH_TYPE_RANDOMIZE = 7,
+ GP_EDITBRUSH_TYPE_CLONE = 8,
+ GP_EDITBRUSH_TYPE_SUBDIVIDE = 9,
+ GP_EDITBRUSH_TYPE_SIMPLIFY = 10,
/* !!! Update GP_EditBrush_Data brush[###]; below !!! */
TOT_GP_EDITBRUSH_TYPES
More information about the Bf-blender-cvs
mailing list