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:
authorCampbell Barton <ideasman42@gmail.com>2018-11-03 08:52:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-03 08:52:06 +0300
commit888a0735eee5fbe05fc60d8755d83974a2f74680 (patch)
tree3ff8fb4e0712303b36ec7ddf9cbd6bf0c072e35e /source/blender/editors/sculpt_paint/sculpt.c
parent13c3c9b22fd8453d4418577efbc2ccb93209e92e (diff)
Tool System: validate tool slots when setting modes
Needed for entering paint modes on new scenes.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 7365101b9f2..d5e629f205d 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -5819,6 +5819,7 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op)
Main *bmain = CTX_data_main(C);
Depsgraph *depsgraph = CTX_data_depsgraph_on_load(C);
Scene *scene = CTX_data_scene(C);
+ ToolSettings *ts = scene->toolsettings;
Object *ob = CTX_data_active_object(C);
const int mode_flag = OB_MODE_SCULPT;
const bool is_mode_set = (ob->mode & mode_flag) != 0;
@@ -5834,6 +5835,7 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op)
}
else {
ED_object_sculptmode_enter_ex(bmain, depsgraph, scene, ob, op->reports);
+ BKE_paint_toolslots_brush_validate(bmain, scene, &ts->sculpt->paint);
}
WM_event_add_notifier(C, NC_SCENE | ND_MODE, scene);