[Bf-blender-cvs] [65b450d9cd0] greasepencil-object: Add new Brush Eraser icon

Antonio Vazquez noreply at git.blender.org
Wed Feb 28 18:23:23 CET 2018


Commit: 65b450d9cd06e9d7b3f6a04fd53e3dd12f488ba0
Author: Antonio Vazquez
Date:   Wed Feb 28 18:22:49 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB65b450d9cd06e9d7b3f6a04fd53e3dd12f488ba0

Add new Brush Eraser icon

This is part of the new eraser brush.

Design by Matias Mendiola

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

A	release/datafiles/brushicons/gp_brush_erase.png
M	source/blender/editors/datafiles/CMakeLists.txt
M	source/blender/editors/include/ED_datafiles.h
M	source/blender/editors/include/UI_icons.h
M	source/blender/editors/interface/interface_icons.c
M	source/blender/makesdna/DNA_gpencil_types.h
M	source/blender/makesrna/intern/rna_scene.c

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

diff --git a/release/datafiles/brushicons/gp_brush_erase.png b/release/datafiles/brushicons/gp_brush_erase.png
new file mode 100644
index 00000000000..2ac52840678
Binary files /dev/null and b/release/datafiles/brushicons/gp_brush_erase.png differ
diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt
index a7fd23f648c..152a671f087 100644
--- a/source/blender/editors/datafiles/CMakeLists.txt
+++ b/source/blender/editors/datafiles/CMakeLists.txt
@@ -639,6 +639,7 @@ if(WITH_BLENDER)
 		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.png SRC)
 
 	endif()
 
diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h
index 996d1ad76f0..9559011e714 100644
--- a/source/blender/editors/include/ED_datafiles.h
+++ b/source/blender/editors/include/ED_datafiles.h
@@ -295,5 +295,8 @@ extern char datatoc_gp_brush_custom_png[];
 extern int datatoc_gp_brush_fill_png_size;
 extern char datatoc_gp_brush_fill_png[];
 
+extern int datatoc_gp_brush_erase_png_size;
+extern char datatoc_gp_brush_erase_png[];
+
 #endif /* __ED_DATAFILES_H__ */
 
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h
index 07a9eb6cfe0..8a90e1c8a9f 100644
--- a/source/blender/editors/include/UI_icons.h
+++ b/source/blender/editors/include/UI_icons.h
@@ -1022,6 +1022,7 @@ DEF_ICON(GPBRUSH_BLOCK)
 DEF_ICON(GPBRUSH_MARKER)
 DEF_ICON(GPBRUSH_CUSTOM)
 DEF_ICON(GPBRUSH_FILL)
+DEF_ICON(GPBRUSH_ERASE)
 
 /* vector icons, VICO_ prefix added */	
 DEF_VICO(SMALL_TRI_RIGHT_VEC)
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 0c81906a383..8dd89119b46 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -440,6 +440,7 @@ static void init_brush_icons(void)
 	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, gp_brush_fill);
 
 #undef INIT_BRUSH_ICON
 }
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index e73198ee4f2..9c863a666de 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -562,7 +562,8 @@ typedef enum eGP_BrushIcons {
 	GPBRUSH_INKNOISE = 4,
 	GPBRUSH_BLOCK = 5,
 	GPBRUSH_MARKER = 6,
-	GPBRUSH_FILL = 7
+	GPBRUSH_FILL = 7,
+	GPBRUSH_ERASE = 8
 } eGP_BrushIcons;
 
 /* ***************************************** */
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 19576eafa8b..0869978ba40 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -658,6 +658,8 @@ static int gpencil_get_brush_icon(int type)
 			return ICON_GPBRUSH_MARKER;
 		case GPBRUSH_FILL:
 			return ICON_GPBRUSH_FILL;
+		case GPBRUSH_ERASE:
+			return ICON_GPBRUSH_ERASE;
 		default:
 			return ICON_GPBRUSH_CUSTOM;
 	}



More information about the Bf-blender-cvs mailing list