UI: Remove unused brush preview icons, now replaced by asset previews
Since 7b0ea0f1b4, brushes use the asset system and previews are stored
in the asset source blend files. The bundled ones are part of the
essentials asset library, see
`release/datafiles/assets/publis/brushes/essentials_brushes.blend`.
Note that this doesn't remove the toolbar icons for these brushes yet.
Initially reviewed in (but this commit contains further changes missing
in the PR):
https://projects.blender.org/blender/blender/pulls/123842
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
@@ -969,73 +969,6 @@ if(WITH_BLENDER)
|
||||
# Images.
|
||||
data_to_c_simple(../../../../release/datafiles/splash.png SRC)
|
||||
|
||||
# Brushes.
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/blob.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/blur.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/clay.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/claystrips.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/clone.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/crease.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/draw.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/fill.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/flatten.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/grab.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/inflate.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/layer.png SRC)
|
||||
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)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/smooth.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/snake_hook.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/soften.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/texdraw.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/texfill.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/texmask.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/thumb.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/twist.png SRC)
|
||||
|
||||
# Grease pencil sculpt.
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_smooth.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_thickness.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_strength.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_grab.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_push.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_twist.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_pinch.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_randomize.png SRC)
|
||||
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_pencil.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_pen.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_ink.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/gp_brush_inknoise.png SRC)
|
||||
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)
|
||||
|
||||
# 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)
|
||||
|
||||
@@ -1322,19 +1322,6 @@ static ImBuf *icon_preview_imbuf_from_brush(Brush *brush)
|
||||
/* Use default color-spaces for brushes. */
|
||||
brush->icon_imbuf = IMB_loadiffname(filepath, flags, nullptr);
|
||||
|
||||
/* Otherwise lets try to find it in other directories. */
|
||||
if (!(brush->icon_imbuf)) {
|
||||
const std::optional<std::string> brushicons_dir = BKE_appdir_folder_id(BLENDER_DATAFILES,
|
||||
"brushicons");
|
||||
/* Expected to be found, but don't crash if it's not. */
|
||||
if (brushicons_dir.has_value()) {
|
||||
BLI_path_join(filepath, sizeof(filepath), brushicons_dir->c_str(), brush->icon_filepath);
|
||||
|
||||
/* Use default color spaces. */
|
||||
brush->icon_imbuf = IMB_loadiffname(filepath, flags, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
if (brush->icon_imbuf) {
|
||||
BKE_icon_changed(BKE_icon_id_ensure(&brush->id));
|
||||
}
|
||||
|
||||