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.
This commit is contained in:
Dalai Felinto 2022-06-15 12:14:21 +02:00
parent 0a3650210f
commit 7e89bbb2ff
17 changed files with 88 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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
}

View File

@ -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[] = {