diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2019-08-01 18:05:53 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-08-01 18:05:53 +0300 |
commit | 03bbd5f9dedf7b3dfea7119c172c61f0b50ae28c (patch) | |
tree | 79ab34e79af6a700c6f73f331e4ee4e253ab3751 /source/blender/blenkernel/intern/paint_toolslots.c | |
parent | 2204bfcf9e1c3a38e60830bd97775dd72158f4d6 (diff) | |
parent | 49b2162309da6abf66764d41d9fc4c45ad01936c (diff) |
Merge branch 'master' into temp-gpencil-drw-engine
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); + } } } |