[Bf-blender-cvs] [ba85cecc63e] greasepencil-object: New icons for drawing brushes

Antonio Vazquez noreply at git.blender.org
Wed Jan 3 17:46:53 CET 2018


Commit: ba85cecc63e72218b295fd43d268df5210480e7a
Author: Antonio Vazquez
Date:   Wed Jan 3 16:43:42 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rBba85cecc63e72218b295fd43d268df5210480e7a

New icons for drawing brushes

Icons designed by Matias Mendiola

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

A	release/datafiles/brushicons/gp_brush_draw.png
A	release/datafiles/brushicons/gp_brush_fill.png
M	source/blender/editors/datafiles/CMakeLists.txt
M	source/blender/editors/gpencil/gpencil_utils.c
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/makesrna/intern/rna_scene.c

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

diff --git a/release/datafiles/brushicons/gp_brush_draw.png b/release/datafiles/brushicons/gp_brush_draw.png
new file mode 100644
index 00000000000..4e7620bcd78
Binary files /dev/null and b/release/datafiles/brushicons/gp_brush_draw.png differ
diff --git a/release/datafiles/brushicons/gp_brush_fill.png b/release/datafiles/brushicons/gp_brush_fill.png
new file mode 100644
index 00000000000..5cf49058900
Binary files /dev/null and b/release/datafiles/brushicons/gp_brush_fill.png differ
diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt
index 418a623eb0e..f8c7a26051e 100644
--- a/source/blender/editors/datafiles/CMakeLists.txt
+++ b/source/blender/editors/datafiles/CMakeLists.txt
@@ -137,6 +137,9 @@ if(WITH_BLENDER)
 		data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_clone.png SRC)
 		data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_weight.png SRC)
 
+		data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_draw.png SRC)
+		data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_fill.png SRC)
+
 	endif()
 
 	data_to_c_simple(../../../../release/datafiles/startup.blend SRC)
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 64190a33d73..25b92246e53 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -950,10 +950,10 @@ const EnumPropertyItem *ED_gpencil_brushes_enum_itemf(
 
 		if (brush->flag & GP_BRUSH_ACTIVE)
 			if (brush->flag & GP_BRUSH_FILL_ONLY) {
-				item_tmp.icon = ICON_GROUP_VCOL;
+				item_tmp.icon = ICON_GPBRUSH_FILL;
 			}
 			else {
-				item_tmp.icon = ICON_BRUSH_DATA;
+				item_tmp.icon = ICON_GPBRUSH_DRAW;
 			}
 		else
 			item_tmp.icon = ICON_NONE;
diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h
index 817f246a3f1..6553e79d66e 100644
--- a/source/blender/editors/include/ED_datafiles.h
+++ b/source/blender/editors/include/ED_datafiles.h
@@ -271,5 +271,11 @@ extern char datatoc_gp_brush_clone_png[];
 extern int datatoc_gp_brush_weight_png_size;
 extern char datatoc_gp_brush_weight_png[];
 
+extern int datatoc_gp_brush_draw_png_size;
+extern char datatoc_gp_brush_draw_png[];
+
+extern int datatoc_gp_brush_fill_png_size;
+extern char datatoc_gp_brush_fill_png[];
+
 #endif /* __ED_DATAFILES_H__ */
 
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h
index 9b08c2489df..00e2bd618d2 100644
--- a/source/blender/editors/include/UI_icons.h
+++ b/source/blender/editors/include/UI_icons.h
@@ -1013,6 +1013,8 @@ DEF_ICON(GPBRUSH_PINCH)
 DEF_ICON(GPBRUSH_RANDOMIZE)
 DEF_ICON(GPBRUSH_CLONE)
 DEF_ICON(GPBRUSH_WEIGHT)
+DEF_ICON(GPBRUSH_DRAW)
+DEF_ICON(GPBRUSH_FILL)
 
 /* 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 70910f5aa07..01f44aa21d7 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -428,6 +428,10 @@ static void init_brush_icons(void)
 	INIT_BRUSH_ICON(ICON_GPBRUSH_CLONE, gp_brush_clone);
 	INIT_BRUSH_ICON(ICON_GPBRUSH_WEIGHT, gp_brush_weight);
 
+	/* grease pencil drawing brushes */
+	INIT_BRUSH_ICON(ICON_GPBRUSH_DRAW, gp_brush_draw);
+	INIT_BRUSH_ICON(ICON_GPBRUSH_FILL, gp_brush_fill);
+
 #undef INIT_BRUSH_ICON
 }
 
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index a3427e4443c..434ee92b1d3 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -645,10 +645,10 @@ static const EnumPropertyItem *rna_GPencilBrush_enum_itemf(
 		item_tmp.name = brush->info;
 		item_tmp.value = i;
 		if (brush->flag & GP_BRUSH_FILL_ONLY) {
-			item_tmp.icon = ICON_GROUP_VCOL;
+			item_tmp.icon = ICON_GPBRUSH_FILL;
 		}
 		else {
-			item_tmp.icon = ICON_BRUSH_DATA;
+			item_tmp.icon = ICON_GPBRUSH_DRAW;
 		}
 
 		RNA_enum_item_add(&item, &totitem, &item_tmp);



More information about the Bf-blender-cvs mailing list