diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-05-26 12:31:58 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-05-26 17:22:41 +0300 |
commit | f3cf29ac96937bec76e6cfeb6b143625a814bc03 (patch) | |
tree | 82bf8939a52a793784d03930ca5ca8163d7f0eb1 /source/blender | |
parent | 4114e890202d92f683ec2fbe51183049932537d9 (diff) |
Fix T77074: Collections: Exclude From ViewLayer toggle crashes
Consider this a bandaid fix (similar to rBe2724abc22d5).
Real issue seems to be that object is still in OB_MODE_PARTICLE_EDIT
whereas it should be in OB_MODE_OBJECT after toggling 'Exclude From
ViewLayer'. So while this patch prevents the crash, it leaves the object
in a weird state (it cannot be selected for example), needs further
investigation.
Maniphest Tasks: T77074
Differential Revision: https://developer.blender.org/D7843
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_engine.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_engine.c b/source/blender/draw/engines/overlay/overlay_engine.c index 586b99c14da..0e1bbaf284d 100644 --- a/source/blender/draw/engines/overlay/overlay_engine.c +++ b/source/blender/draw/engines/overlay/overlay_engine.c @@ -243,7 +243,8 @@ static void OVERLAY_cache_populate(void *vedata, Object *ob) const bool renderable = DRW_object_is_renderable(ob); const bool in_pose_mode = ob->type == OB_ARMATURE && OVERLAY_armature_is_pose_mode(ob, draw_ctx); const bool in_edit_mode = overlay_object_is_edit_mode(pd, ob); - const bool in_particle_edit_mode = ob->mode == OB_MODE_PARTICLE_EDIT; + const bool in_particle_edit_mode = (ob->mode == OB_MODE_PARTICLE_EDIT) && + (pd->ctx_mode == CTX_MODE_PARTICLE); const bool in_paint_mode = (ob == draw_ctx->obact) && (draw_ctx->object_mode & OB_MODE_ALL_PAINT); const bool in_sculpt_mode = (ob == draw_ctx->obact) && (ob->sculpt != NULL) && |