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/intern | |
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/intern')
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index c5edf9577a4..99f102680e5 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -2422,11 +2422,7 @@ void DRW_draw_select_loop(struct Depsgraph *depsgraph, } } - /* This relies on dupli instances being after their instancing object. */ - if ((ob->base_flag & BASE_FROM_DUPLI) == 0) { - Object *ob_orig = DEG_get_original_object(ob); - DRW_select_load_id(ob_orig->runtime.select_id); - } + DRW_select_load_id(ob->runtime.select_id); DST.dupli_parent = data_.dupli_parent; DST.dupli_source = data_.dupli_object_current; drw_duplidata_load(DST.dupli_source); |