GPencil: New set of Brush icons
authorAntonio Vazquez <blendergit@gmail.com>
Thu, 12 Sep 2019 11:34:19 +0000 (13:34 +0200)
committerAntonio Vazquez <blendergit@gmail.com>
Thu, 12 Sep 2019 20:15:19 +0000 (22:15 +0200)
Added: Airbrush and Chisel
Changed: Marker

Design: @mendio

Subscribers: mendio

Differential Revision: https://developer.blender.org/D5774

release/datafiles/brushicons/gp_brush_airbrush.png [new file with mode: 0644]
release/datafiles/brushicons/gp_brush_chisel.png [new file with mode: 0644]
release/datafiles/brushicons/gp_brush_marker.png
source/blender/editors/datafiles/CMakeLists.txt
source/blender/editors/include/ED_datafiles.h
source/blender/editors/include/UI_icons.h
source/blender/editors/interface/interface_icons.c
source/blender/makesdna/DNA_brush_types.h
source/blender/makesrna/intern/rna_brush.c

diff --git a/release/datafiles/brushicons/gp_brush_airbrush.png b/release/datafiles/brushicons/gp_brush_airbrush.png
new file mode 100644 (file)
index 0000000..3c9aa42
Binary files /dev/null and b/release/datafiles/brushicons/gp_brush_airbrush.png differ
diff --git a/release/datafiles/brushicons/gp_brush_chisel.png b/release/datafiles/brushicons/gp_brush_chisel.png
new file mode 100644 (file)
index 0000000..6fa5071
Binary files /dev/null and b/release/datafiles/brushicons/gp_brush_chisel.png differ
index c7a62b78ca78f65e65625fe710f2683e73854964..35a6f38280fd3ef294f47eefdf8de7a83f0e4eab 100644 (file)
Binary files a/release/datafiles/brushicons/gp_brush_marker.png and b/release/datafiles/brushicons/gp_brush_marker.png differ
index 69738d2e008ceb0cd07a095b114c84421a351797..765362b374ee5cc064f4b22e81e49944e6e34364 100644 (file)
@@ -836,6 +836,8 @@ if(WITH_BLENDER)
     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_fill.png SRC)
+    data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_airbrush.png SRC)
+    data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_chisel.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)
     data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_erase_stroke.png SRC)
index 43d7117a1b2569053ac66198b0f2d80a7869e142..ada90205b4a5f064a42ff2098f71cf391b4a93f9 100644 (file)
@@ -285,6 +285,12 @@ extern char datatoc_gp_brush_marker_png[];
 extern int datatoc_gp_brush_fill_png_size;
 extern char datatoc_gp_brush_fill_png[];
 
+extern int datatoc_gp_brush_airbrush_png_size;
+extern char datatoc_gp_brush_airbrush_png[];
+
+extern int datatoc_gp_brush_chisel_png_size;
+extern char datatoc_gp_brush_chisel_png[];
+
 extern int datatoc_gp_brush_erase_soft_png_size;
 extern char datatoc_gp_brush_erase_soft_png[];
 
index dd052a8256b5dccbbd733f61f41742b1b90771fb..ffabace48c03e9545ecb035476b3d7b3c6b6d687 100644 (file)
@@ -937,6 +937,8 @@ DEF_ICON_COLOR(GPBRUSH_INKNOISE)
 DEF_ICON_COLOR(GPBRUSH_BLOCK)
 DEF_ICON_COLOR(GPBRUSH_MARKER)
 DEF_ICON_COLOR(GPBRUSH_FILL)
+DEF_ICON_COLOR(GPBRUSH_AIRBRUSH)
+DEF_ICON_COLOR(GPBRUSH_CHISEL)
 DEF_ICON_COLOR(GPBRUSH_ERASE_SOFT)
 DEF_ICON_COLOR(GPBRUSH_ERASE_HARD)
 DEF_ICON_COLOR(GPBRUSH_ERASE_STROKE)
index 085ae5bdb93711ac0c9e124ca95b8fb106cc3cf4..bbf55dc221337eb4512c67b513c9577fb56068cf 100644 (file)
@@ -554,6 +554,8 @@ static void init_brush_icons(void)
   INIT_BRUSH_ICON(ICON_GPBRUSH_BLOCK, gp_brush_block);
   INIT_BRUSH_ICON(ICON_GPBRUSH_MARKER, gp_brush_marker);
   INIT_BRUSH_ICON(ICON_GPBRUSH_FILL, gp_brush_fill);
+  INIT_BRUSH_ICON(ICON_GPBRUSH_AIRBRUSH, gp_brush_airbrush);
+  INIT_BRUSH_ICON(ICON_GPBRUSH_CHISEL, gp_brush_chisel);
   INIT_BRUSH_ICON(ICON_GPBRUSH_ERASE_SOFT, gp_brush_erase_soft);
   INIT_BRUSH_ICON(ICON_GPBRUSH_ERASE_HARD, gp_brush_erase_hard);
   INIT_BRUSH_ICON(ICON_GPBRUSH_ERASE_STROKE, gp_brush_erase_stroke);
@@ -2060,6 +2062,12 @@ static int ui_id_brush_get_icon(const bContext *C, ID *id)
         case GP_BRUSH_ICON_FILL:
           br->id.icon_id = ICON_GPBRUSH_FILL;
           break;
+        case GP_BRUSH_ICON_AIRBRUSH:
+          br->id.icon_id = ICON_GPBRUSH_AIRBRUSH;
+          break;
+        case GP_BRUSH_ICON_CHISEL:
+          br->id.icon_id = ICON_GPBRUSH_CHISEL;
+          break;
         case GP_BRUSH_ICON_ERASE_SOFT:
           br->id.icon_id = ICON_GPBRUSH_ERASE_SOFT;
           break;
index 957f5b7597425092bd512745eacd9a1962fd1222..a503d3b6739af6bd7418c1e7f48864dea5cf51e6 100644 (file)
@@ -185,6 +185,8 @@ typedef enum eGP_BrushIcons {
   GP_BRUSH_ICON_ERASE_SOFT = 8,
   GP_BRUSH_ICON_ERASE_HARD = 9,
   GP_BRUSH_ICON_ERASE_STROKE = 10,
+  GP_BRUSH_ICON_AIRBRUSH = 11,
+  GP_BRUSH_ICON_CHISEL = 12,
 } eGP_BrushIcons;
 
 typedef enum eBrushCurvePreset {
@@ -512,7 +514,7 @@ typedef enum eBrushUVSculptTool {
         SCULPT_TOOL_ELASTIC_DEFORM, \
         SCULPT_TOOL_POSE, \
 \
-        /* These brushes could handle dynamic topology, \
+        /* These brushes could handle dynamic topology, \ \
          * but user feedback indicates it's better not to */ \
         SCULPT_TOOL_SMOOTH, \
         SCULPT_TOOL_MASK) == 0)
index 9be64a44414659b07e777cc158b70fb9ae9372c0..716e85260712c5f8540ca71e265759baecc6d3fb 100644 (file)
@@ -170,6 +170,8 @@ static EnumPropertyItem rna_enum_gpencil_brush_icons_items[] = {
     {GP_BRUSH_ICON_INKNOISE, "INKNOISE", ICON_GPBRUSH_INKNOISE, "Ink Noise", ""},
     {GP_BRUSH_ICON_BLOCK, "BLOCK", ICON_GPBRUSH_BLOCK, "Block", ""},
     {GP_BRUSH_ICON_MARKER, "MARKER", ICON_GPBRUSH_MARKER, "Marker", ""},
+    {GP_BRUSH_ICON_AIRBRUSH, "AIRBRUSH", ICON_GPBRUSH_AIRBRUSH, "Airbrush", ""},
+    {GP_BRUSH_ICON_CHISEL, "CHISEL", ICON_GPBRUSH_CHISEL, "Chisel", ""},
     {GP_BRUSH_ICON_FILL, "FILL", ICON_GPBRUSH_FILL, "Fill", ""},
     {GP_BRUSH_ICON_ERASE_SOFT, "SOFT", ICON_GPBRUSH_ERASE_SOFT, "Eraser Soft", ""},
     {GP_BRUSH_ICON_ERASE_HARD, "HARD", ICON_GPBRUSH_ERASE_HARD, "Eraser Hard", ""},