Fix T74307: Add missing brushes to versioning_defaults

At least a brush under each tool needs to exist by default in the blend
file to reset its properties. If it does not exist, the user needs to
reset it manually.

Reviewed By: brecht

Maniphest Tasks: T74307

Differential Revision: https://developer.blender.org/D6972
This commit is contained in:
Pablo Dobarro 2020-03-01 19:37:25 +01:00 committed by Pablo Dobarro
parent 3c9956a3ac
commit 233158b555
Notes: blender-bot 2023-02-14 05:36:11 +01:00
Referenced by issue #74307, 2.83 beta, Some sculpt brush default preferences don't match the "Reset Brush" preferences.
1 changed files with 24 additions and 0 deletions

View File

@ -542,6 +542,30 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
brush->sculpt_tool = SCULPT_TOOL_MULTIPLANE_SCRAPE;
}
brush_name = "Clay Thumb";
brush = BLI_findstring(&bmain->brushes, brush_name, offsetof(ID, name) + 2);
if (!brush) {
brush = BKE_brush_add(bmain, brush_name, OB_MODE_SCULPT);
id_us_min(&brush->id);
brush->sculpt_tool = SCULPT_TOOL_CLAY_THUMB;
}
brush_name = "Cloth";
brush = BLI_findstring(&bmain->brushes, brush_name, offsetof(ID, name) + 2);
if (!brush) {
brush = BKE_brush_add(bmain, brush_name, OB_MODE_SCULPT);
id_us_min(&brush->id);
brush->sculpt_tool = SCULPT_TOOL_CLOTH;
}
brush_name = "Slide Relax";
brush = BLI_findstring(&bmain->brushes, brush_name, offsetof(ID, name) + 2);
if (!brush) {
brush = BKE_brush_add(bmain, brush_name, OB_MODE_SCULPT);
id_us_min(&brush->id);
brush->sculpt_tool = SCULPT_TOOL_SLIDE_RELAX;
}
brush_name = "Simplify";
brush = BLI_findstring(&bmain->brushes, brush_name, offsetof(ID, name) + 2);
if (!brush) {