diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-03-20 21:49:20 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-03-26 17:41:10 +0300 |
commit | c286fa309ef3939b8e0cf93515c4b9245edcf681 (patch) | |
tree | 16cbabee41da1699a3fdd0018d5e13a1868ee432 /source | |
parent | 32bb8488389ae8dc9abd8ae5f662ce4a7f16f104 (diff) |
Fix T74899: Add Draw Face Sets brush to versioning defaults
Brushes are created automatically when the tools is enabled, but this
way it gets correct defaults and it is accesible from scripts.
Reviewed By: jbakker
Maniphest Tasks: T74899
Differential Revision: https://developer.blender.org/D7199
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/versioning_defaults.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c index 045edc8413f..80395177100 100644 --- a/source/blender/blenloader/intern/versioning_defaults.c +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -582,6 +582,14 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template) brush->sculpt_tool = SCULPT_TOOL_SIMPLIFY; } + brush_name = "Draw Face Sets"; + 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_DRAW_FACE_SETS; + } + /* Use the same tool icon color in the brush cursor */ for (brush = bmain->brushes.first; brush; brush = brush->id.next) { if (brush->ob_mode & OB_MODE_SCULPT) { |