diff options
author | Jacques Lucke <jacques@blender.org> | 2020-11-24 19:32:40 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-11-24 19:32:56 +0300 |
commit | e922dd7d8a307c54d49bc01649a12610b022192b (patch) | |
tree | 21ab3edb04efa7eb95aec6f8df0868acd820ea1c /source/blender/draw/engines/overlay/overlay_metaball.c | |
parent | 256a9d983d4862560071393f7ddf44bcbd34ad74 (diff) |
Viewport: cannot select object by clicking on its instances
Selecting an object by clicking on its instances only worked,
when the object itself is visible. However, it is possible to hide
the object and still keep the instances visible.
The solution is to give every object the correct `select_id` in the
depsgraph object iterator right before rendering.
Reviewers: fclem, brecht
Differential Revision: https://developer.blender.org/D9640
Diffstat (limited to 'source/blender/draw/engines/overlay/overlay_metaball.c')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_metaball.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_metaball.c b/source/blender/draw/engines/overlay/overlay_metaball.c index c10c0a84247..f973c1eda8a 100644 --- a/source/blender/draw/engines/overlay/overlay_metaball.c +++ b/source/blender/draw/engines/overlay/overlay_metaball.c @@ -82,8 +82,7 @@ void OVERLAY_edit_metaball_cache_populate(OVERLAY_Data *vedata, Object *ob) int select_id = 0; if (is_select) { - const Object *orig_object = DEG_get_original_object(ob); - select_id = orig_object->runtime.select_id; + select_id = ob->runtime.select_id; } LISTBASE_FOREACH (MetaElem *, ml, mb->editelems) { |