Fix T77105: Crashes when clicking "new scene" button
This was introduced on ecc395e473.
Effectively this is reverting that commit for cases when
scene->toolsettings->sculpt is NULL. But since the facesets are only
working for sculpting this should be fine.
This commit is contained in:
@@ -78,12 +78,15 @@ static void OVERLAY_engine_init(void *vedata)
|
||||
if (v3d->shading.type == OB_WIRE) {
|
||||
pd->overlay.flag |= V3D_OVERLAY_WIREFRAMES;
|
||||
}
|
||||
|
||||
if (ts->sculpt) {
|
||||
if (ts->sculpt->flags & SCULPT_HIDE_FACE_SETS) {
|
||||
pd->overlay.sculpt_mode_face_sets_opacity = 0.0f;
|
||||
}
|
||||
if (ts->sculpt->flags & SCULPT_HIDE_MASK) {
|
||||
pd->overlay.sculpt_mode_mask_opacity = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
pd->use_in_front = (v3d->shading.type <= OB_SOLID) ||
|
||||
BKE_scene_uses_blender_workbench(draw_ctx->scene);
|
||||
|
||||
Reference in New Issue
Block a user