diff options
author | Dalai Felinto <dalai@blender.org> | 2022-06-15 13:14:21 +0300 |
---|---|---|
committer | Dalai Felinto <dalai@blender.org> | 2022-06-15 19:59:33 +0300 |
commit | 7e89bbb2ff3e060807beaef200d9173befeba528 (patch) | |
tree | 6fe424e551c2b5afaa2720f5dc67c6ee86294ba8 /source | |
parent | 0a3650210f83de7d0983eed7d52efe5ec602b4d4 (diff) |
UI: Implement icons for the curve sculpt tools brushes
I'm using the tool icons for the brush themselves.
Note: This includes a few brushes that are only defined in D15134.
Those are simply the icons rendered with a world background of #282828.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/datafiles/CMakeLists.txt | 14 | ||||
-rw-r--r-- | source/blender/editors/include/ED_datafiles.h | 38 | ||||
-rw-r--r-- | source/blender/editors/include/UI_icons.h | 14 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 14 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 14 |
5 files changed, 88 insertions, 6 deletions
diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt index a7abaab88ff..9da2c4819a3 100644 --- a/source/blender/editors/datafiles/CMakeLists.txt +++ b/source/blender/editors/datafiles/CMakeLists.txt @@ -933,6 +933,7 @@ if(WITH_BLENDER) data_to_c_simple(../../../../release/datafiles/brushicons/mask.png SRC) data_to_c_simple(../../../../release/datafiles/brushicons/mix.png SRC) data_to_c_simple(../../../../release/datafiles/brushicons/nudge.png SRC) + data_to_c_simple(../../../../release/datafiles/brushicons/paint_select.png SRC) data_to_c_simple(../../../../release/datafiles/brushicons/pinch.png SRC) data_to_c_simple(../../../../release/datafiles/brushicons/scrape.png SRC) data_to_c_simple(../../../../release/datafiles/brushicons/smear.png SRC) @@ -970,6 +971,19 @@ if(WITH_BLENDER) 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) + # curve sculpt + data_to_c_simple(../../../../release/datafiles/brushicons/curves_sculpt_add.png SRC) + data_to_c_simple(../../../../release/datafiles/brushicons/curves_sculpt_comb.png SRC) + data_to_c_simple(../../../../release/datafiles/brushicons/curves_sculpt_cut.png SRC) + data_to_c_simple(../../../../release/datafiles/brushicons/curves_sculpt_delete.png SRC) + data_to_c_simple(../../../../release/datafiles/brushicons/curves_sculpt_density.png SRC) + data_to_c_simple(../../../../release/datafiles/brushicons/curves_sculpt_grow_shrink.png SRC) + data_to_c_simple(../../../../release/datafiles/brushicons/curves_sculpt_pinch.png SRC) + data_to_c_simple(../../../../release/datafiles/brushicons/curves_sculpt_puff.png SRC) + data_to_c_simple(../../../../release/datafiles/brushicons/curves_sculpt_slide.png SRC) + data_to_c_simple(../../../../release/datafiles/brushicons/curves_sculpt_smooth.png SRC) + data_to_c_simple(../../../../release/datafiles/brushicons/curves_sculpt_snake_hook.png SRC) + endif() data_to_c_simple(../../../../release/datafiles/startup.blend SRC) diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h index c3a66e4a7dd..e3b091430e8 100644 --- a/source/blender/editors/include/ED_datafiles.h +++ b/source/blender/editors/include/ED_datafiles.h @@ -103,6 +103,9 @@ extern const char datatoc_multiply_png[]; extern int datatoc_nudge_png_size; extern const char datatoc_nudge_png[]; +extern int datatoc_paint_select_png_size; +extern const char datatoc_paint_select_png[]; + extern int datatoc_pinch_png_size; extern const char datatoc_pinch_png[]; @@ -284,6 +287,41 @@ extern const char datatoc_gp_brush_erase_hard_png[]; extern int datatoc_gp_brush_erase_stroke_png_size; extern const char datatoc_gp_brush_erase_stroke_png[]; +/* curves sculpt brushes files */ + +extern int datatoc_curves_sculpt_add_png_size; +extern const char datatoc_curves_sculpt_add_png[]; + +extern int datatoc_curves_sculpt_comb_png_size; +extern const char datatoc_curves_sculpt_comb_png[]; + +extern int datatoc_curves_sculpt_cut_png_size; +extern const char datatoc_curves_sculpt_cut_png[]; + +extern int datatoc_curves_sculpt_delete_png_size; +extern const char datatoc_curves_sculpt_delete_png[]; + +extern int datatoc_curves_sculpt_density_png_size; +extern const char datatoc_curves_sculpt_density_png[]; + +extern int datatoc_curves_sculpt_grow_shrink_png_size; +extern const char datatoc_curves_sculpt_grow_shrink_png[]; + +extern int datatoc_curves_sculpt_pinch_png_size; +extern const char datatoc_curves_sculpt_pinch_png[]; + +extern int datatoc_curves_sculpt_puff_png_size; +extern const char datatoc_curves_sculpt_puff_png[]; + +extern int datatoc_curves_sculpt_slide_png_size; +extern const char datatoc_curves_sculpt_slide_png[]; + +extern int datatoc_curves_sculpt_smooth_png_size; +extern const char datatoc_curves_sculpt_smooth_png[]; + +extern int datatoc_curves_sculpt_snake_hook_png_size; +extern const char datatoc_curves_sculpt_snake_hook_png[]; + #ifdef __cplusplus } #endif diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index d650f4215b9..f1c0acf43f7 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -891,6 +891,7 @@ DEF_ICON_COLOR(BRUSH_LAYER) DEF_ICON_COLOR(BRUSH_MASK) DEF_ICON_COLOR(BRUSH_MIX) DEF_ICON_COLOR(BRUSH_NUDGE) +DEF_ICON_COLOR(BRUSH_PAINT_SELECT) DEF_ICON_COLOR(BRUSH_PINCH) DEF_ICON_COLOR(BRUSH_SCRAPE) DEF_ICON_COLOR(BRUSH_SCULPT_DRAW) @@ -928,6 +929,19 @@ DEF_ICON_COLOR(GPBRUSH_ERASE_SOFT) DEF_ICON_COLOR(GPBRUSH_ERASE_HARD) DEF_ICON_COLOR(GPBRUSH_ERASE_STROKE) +/* Curves sculpt. */ +DEF_ICON_COLOR(BRUSH_CURVES_ADD) +DEF_ICON_COLOR(BRUSH_CURVES_COMB) +DEF_ICON_COLOR(BRUSH_CURVES_CUT) +DEF_ICON_COLOR(BRUSH_CURVES_DELETE) +DEF_ICON_COLOR(BRUSH_CURVES_DENSITY) +DEF_ICON_COLOR(BRUSH_CURVES_GROW_SHRINK) +DEF_ICON_COLOR(BRUSH_CURVES_PINCH) +DEF_ICON_COLOR(BRUSH_CURVES_PUFF) +DEF_ICON_COLOR(BRUSH_CURVES_SLIDE) +DEF_ICON_COLOR(BRUSH_CURVES_SMOOTH) +DEF_ICON_COLOR(BRUSH_CURVES_SNAKE_HOOK) + /* Vector icons. */ DEF_ICON_VECTOR(KEYTYPE_KEYFRAME_VEC) DEF_ICON_VECTOR(KEYTYPE_BREAKDOWN_VEC) diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index ca4021a9be8..c19e842aad8 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -546,6 +546,7 @@ static void init_brush_icons(void) INIT_BRUSH_ICON(ICON_BRUSH_MASK, mask); INIT_BRUSH_ICON(ICON_BRUSH_MIX, mix); INIT_BRUSH_ICON(ICON_BRUSH_NUDGE, nudge); + INIT_BRUSH_ICON(ICON_BRUSH_PAINT_SELECT, paint_select); INIT_BRUSH_ICON(ICON_BRUSH_PINCH, pinch); INIT_BRUSH_ICON(ICON_BRUSH_SCRAPE, scrape); INIT_BRUSH_ICON(ICON_BRUSH_SMEAR, smear); @@ -584,6 +585,19 @@ static void init_brush_icons(void) INIT_BRUSH_ICON(ICON_GPBRUSH_ERASE_HARD, gp_brush_erase_hard); INIT_BRUSH_ICON(ICON_GPBRUSH_ERASE_STROKE, gp_brush_erase_stroke); + /* Curves sculpt. */ + INIT_BRUSH_ICON(ICON_BRUSH_CURVES_ADD, curves_sculpt_add); + INIT_BRUSH_ICON(ICON_BRUSH_CURVES_COMB, curves_sculpt_comb); + INIT_BRUSH_ICON(ICON_BRUSH_CURVES_CUT, curves_sculpt_cut); + INIT_BRUSH_ICON(ICON_BRUSH_CURVES_DELETE, curves_sculpt_delete); + INIT_BRUSH_ICON(ICON_BRUSH_CURVES_DENSITY, curves_sculpt_density); + INIT_BRUSH_ICON(ICON_BRUSH_CURVES_GROW_SHRINK, curves_sculpt_grow_shrink); + INIT_BRUSH_ICON(ICON_BRUSH_CURVES_PINCH, curves_sculpt_pinch); + INIT_BRUSH_ICON(ICON_BRUSH_CURVES_PUFF, curves_sculpt_puff); + INIT_BRUSH_ICON(ICON_BRUSH_CURVES_SLIDE, curves_sculpt_slide); + INIT_BRUSH_ICON(ICON_BRUSH_CURVES_SMOOTH, curves_sculpt_smooth); + INIT_BRUSH_ICON(ICON_BRUSH_CURVES_SNAKE_HOOK, curves_sculpt_snake_hook); + # undef INIT_BRUSH_ICON } diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 46b009191ca..423cb084f27 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -243,15 +243,17 @@ const EnumPropertyItem rna_enum_brush_gpencil_weight_types_items[] = { {0, NULL, 0, NULL, NULL}, }; +/* clang-format off */ const EnumPropertyItem rna_enum_brush_curves_sculpt_tool_items[] = { - {CURVES_SCULPT_TOOL_COMB, "COMB", ICON_NONE, "Comb Curves", ""}, - {CURVES_SCULPT_TOOL_DELETE, "DELETE", ICON_NONE, "Delete Curves", ""}, - {CURVES_SCULPT_TOOL_SNAKE_HOOK, "SNAKE_HOOK", ICON_NONE, "Curves Snake Hook", ""}, - {CURVES_SCULPT_TOOL_ADD, "ADD", ICON_NONE, "Add Curves", ""}, - {CURVES_SCULPT_TOOL_GROW_SHRINK, "GROW_SHRINK", ICON_NONE, "Grow / Shrink Curves", ""}, - {CURVES_SCULPT_TOOL_SELECTION_PAINT, "SELECTION_PAINT", ICON_NONE, "Paint Selection", ""}, + {CURVES_SCULPT_TOOL_COMB, "COMB", ICON_BRUSH_CURVES_COMB, "Comb Curves", ""}, + {CURVES_SCULPT_TOOL_DELETE, "DELETE", ICON_BRUSH_CURVES_DELETE, "Delete Curves", ""}, + {CURVES_SCULPT_TOOL_SNAKE_HOOK, "SNAKE_HOOK", ICON_BRUSH_CURVES_SNAKE_HOOK, "Curves Snake Hook", ""}, + {CURVES_SCULPT_TOOL_ADD, "ADD", ICON_BRUSH_CURVES_ADD, "Add Curves", ""}, + {CURVES_SCULPT_TOOL_GROW_SHRINK, "GROW_SHRINK", ICON_BRUSH_CURVES_GROW_SHRINK, "Grow / Shrink Curves", ""}, + {CURVES_SCULPT_TOOL_SELECTION_PAINT, "SELECTION_PAINT", ICON_BRUSH_PAINT_SELECT, "Paint Selection", ""}, {0, NULL, 0, NULL, NULL}, }; +/* clang-format om */ #ifndef RNA_RUNTIME static EnumPropertyItem rna_enum_gpencil_brush_eraser_modes_items[] = { |