Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606>2020-03-01 21:37:25 +0300
committerPablo Dobarro <pablo@pop-os.localdomain>2020-03-01 21:37:49 +0300
commit233158b555156f89cd39d8ea0d42dd24d10956c7 (patch)
tree3dedd931bc5829ed91167b923d412ea0556df70f /source/blender/blenloader/intern
parent3c9956a3ace1b88e84353200c352fbaa20360b3a (diff)
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
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 3e484281f3b..6d074661dcc 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -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) {