[Bf-blender-cvs] [3fc0c418a15] greasepencil-object: Remove Custom Brush icon
Antonio Vazquez
noreply at git.blender.org
Wed Mar 21 19:49:18 CET 2018
Commit: 3fc0c418a15a23f80627342d3a5b1d9ca27ef7b1
Author: Antonio Vazquez
Date: Wed Mar 21 19:49:12 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB3fc0c418a15a23f80627342d3a5b1d9ca27ef7b1
Remove Custom Brush icon
Now the user can assign as icon any custom image with the brush options.
===================================================================
D release/datafiles/brushicons/gp_brush_custom.png
M source/blender/blenkernel/intern/brush.c
M source/blender/editors/datafiles/CMakeLists.txt
M source/blender/editors/include/ED_datafiles.h
M source/blender/editors/interface/interface_icons.c
M source/blender/makesdna/DNA_brush_types.h
M source/blender/makesrna/intern/rna_brush.c
===================================================================
diff --git a/release/datafiles/brushicons/gp_brush_custom.png b/release/datafiles/brushicons/gp_brush_custom.png
deleted file mode 100644
index 7f2a2f0b236..00000000000
Binary files a/release/datafiles/brushicons/gp_brush_custom.png and /dev/null differ
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index f65c5e4942c..3d12af115cd 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -141,7 +141,7 @@ static void brush_defaults(Brush *brush)
brush->draw_strength = 1.0f;
brush->draw_jitter = 0.0f;
brush->gp_flag |= GP_BRUSH_USE_JITTER_PRESSURE;
- brush->gp_icon_id = GPBRUSH_CUSTOM;
+ brush->gp_icon_id = GPBRUSH_PEN;
/* curves */
brush->cur_sensitivity = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt
index 87cb5d75795..3bcd3eccc3e 100644
--- a/source/blender/editors/datafiles/CMakeLists.txt
+++ b/source/blender/editors/datafiles/CMakeLists.txt
@@ -637,7 +637,6 @@ if(WITH_BLENDER)
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_inknoise.png SRC)
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_block.png SRC)
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_marker.png SRC)
- data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_custom.png SRC)
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_fill.png SRC)
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_erase_soft.png SRC)
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_erase_hard.png SRC)
diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h
index fbf00020da2..ab03e7476f1 100644
--- a/source/blender/editors/include/ED_datafiles.h
+++ b/source/blender/editors/include/ED_datafiles.h
@@ -289,9 +289,6 @@ extern char datatoc_gp_brush_block_png[];
extern int datatoc_gp_brush_marker_png_size;
extern char datatoc_gp_brush_marker_png[];
-extern int datatoc_gp_brush_custom_png_size;
-extern char datatoc_gp_brush_custom_png[];
-
extern int datatoc_gp_brush_fill_png_size;
extern char datatoc_gp_brush_fill_png[];
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 160a34d482c..7c3b405dcac 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -439,7 +439,6 @@ static void init_brush_icons(void)
INIT_BRUSH_ICON(ICON_GPBRUSH_INKNOISE, gp_brush_inknoise);
INIT_BRUSH_ICON(ICON_GPBRUSH_BLOCK, gp_brush_block);
INIT_BRUSH_ICON(ICON_GPBRUSH_MARKER, gp_brush_marker);
- INIT_BRUSH_ICON(ICON_GPBRUSH_CUSTOM, gp_brush_custom);
INIT_BRUSH_ICON(ICON_GPBRUSH_FILL, gp_brush_fill);
INIT_BRUSH_ICON(ICON_GPBRUSH_ERASE_SOFT, gp_brush_erase_soft);
INIT_BRUSH_ICON(ICON_GPBRUSH_ERASE_HARD, gp_brush_erase_hard);
@@ -1249,9 +1248,6 @@ static int ui_id_brush_get_icon(const bContext *C, ID *id)
/* reset the icon */
if (workspace->object_mode & OB_MODE_GPENCIL_PAINT) {
switch (br->gp_icon_id) {
- case GPBRUSH_CUSTOM:
- br->id.icon_id = ICON_GPBRUSH_CUSTOM;
- break;
case GPBRUSH_PENCIL:
br->id.icon_id = ICON_GPBRUSH_PENCIL;
break;
@@ -1283,7 +1279,7 @@ static int ui_id_brush_get_icon(const bContext *C, ID *id)
br->id.icon_id = ICON_GPBRUSH_ERASE_STROKE;
break;
default:
- br->id.icon_id = ICON_GPBRUSH_CUSTOM;
+ br->id.icon_id = ICON_GPBRUSH_PEN;
break;
}
return id->icon_id;
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index 79071298449..2443dbcbca3 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -236,7 +236,6 @@ typedef enum eGP_BrushEraserMode {
/* default brush icons */
typedef enum eGP_BrushIcons {
- GPBRUSH_CUSTOM = 0,
GPBRUSH_PENCIL = 1,
GPBRUSH_PEN = 2,
GPBRUSH_INK = 3,
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 8e22eb968b8..a3b0dc28ae1 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -148,7 +148,6 @@ static EnumPropertyItem rna_enum_gpencil_fill_draw_modes_items[] = {
};
static EnumPropertyItem rna_enum_gpencil_brush_icons_items[] = {
- { GPBRUSH_CUSTOM, "CUSTOM", ICON_GPBRUSH_CUSTOM, "Custom", "" },
{ GPBRUSH_PENCIL, "PENCIL", ICON_GPBRUSH_PENCIL, "Pencil", "" },
{ GPBRUSH_PEN, "PEN", ICON_GPBRUSH_PEN, "Pen", "" },
{ GPBRUSH_INK, "INK", ICON_GPBRUSH_INK, "Ink", "" },
More information about the Bf-blender-cvs
mailing list