diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-08-10 14:24:26 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-08-10 14:24:26 +0300 |
commit | b9898ebde44d6584ea37a05aaeca8760d31ccc7b (patch) | |
tree | e6dfc796cc82b4b8b8c248c4ff29d2e2047ff84c /source/blender/blenkernel/intern/paint_toolslots.c | |
parent | b17380971a144896b34b7863a82bbda3ff68a39f (diff) | |
parent | 553b581f25c1782c4231816965cd3f6ce58a449a (diff) |
Merge branch 'master' into filebrowser_redesign
Diffstat (limited to 'source/blender/blenkernel/intern/paint_toolslots.c')
-rw-r--r-- | source/blender/blenkernel/intern/paint_toolslots.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/paint_toolslots.c b/source/blender/blenkernel/intern/paint_toolslots.c index fbf586e3f49..a252329b635 100644 --- a/source/blender/blenkernel/intern/paint_toolslots.c +++ b/source/blender/blenkernel/intern/paint_toolslots.c @@ -67,11 +67,21 @@ void BKE_paint_toolslots_init_from_main(struct Main *bmain) for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) { ToolSettings *ts = scene->toolsettings; paint_toolslots_init(bmain, &ts->imapaint.paint); - paint_toolslots_init(bmain, &ts->sculpt->paint); - paint_toolslots_init(bmain, &ts->vpaint->paint); - paint_toolslots_init(bmain, &ts->wpaint->paint); - paint_toolslots_init(bmain, &ts->uvsculpt->paint); - paint_toolslots_init(bmain, &ts->gp_paint->paint); + if (ts->sculpt) { + paint_toolslots_init(bmain, &ts->sculpt->paint); + } + if (ts->vpaint) { + paint_toolslots_init(bmain, &ts->vpaint->paint); + } + if (ts->wpaint) { + paint_toolslots_init(bmain, &ts->wpaint->paint); + } + if (ts->uvsculpt) { + paint_toolslots_init(bmain, &ts->uvsculpt->paint); + } + if (ts->gp_paint) { + paint_toolslots_init(bmain, &ts->gp_paint->paint); + } } } |