diff options
author | Hans Goudey <h.goudey@me.com> | 2021-11-09 19:12:05 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-11-09 19:12:05 +0300 |
commit | aa13c4b386b1311162e74378ad864a51b2f1b7af (patch) | |
tree | bbfe7c9a7aa9e7e5b996edd828ed76d1f74771a1 /source/blender/draw/intern/draw_manager_data.c | |
parent | 570331ca96a5e7a30c8896a07aad1960d5bd706e (diff) |
Viewport: Remove different outline color for instances
With instancing becoming more common with geometry nodes,
instances are less of a separate thing and more of an essential part
of evaluated data. Displaying them with a separate outline, while
helpful in some cases, is not worth the lack of visibility or confusion
about selected/active status. Information about the performance
of the scene due to instancing is always available with the statistics
like vertex count, etc.
The problems were compounded by the fact that the instancing
system is used to output geometry components that don't correspond
to the object's original type. So this patch also fixes that problem.
Fixes T92079, T81010
Ref T91310
Differential Revision: https://developer.blender.org/D13133
Diffstat (limited to 'source/blender/draw/intern/draw_manager_data.c')
-rw-r--r-- | source/blender/draw/intern/draw_manager_data.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c index 5d3e3db866f..c98ecc8ac00 100644 --- a/source/blender/draw/intern/draw_manager_data.c +++ b/source/blender/draw/intern/draw_manager_data.c @@ -538,7 +538,12 @@ static void drw_call_obinfos_init(DRWObjectInfos *ob_infos, Object *ob) ob_infos->ob_flag += (ob->base_flag & BASE_SELECTED) ? (1 << 1) : 0; ob_infos->ob_flag += (ob->base_flag & BASE_FROM_DUPLI) ? (1 << 2) : 0; ob_infos->ob_flag += (ob->base_flag & BASE_FROM_SET) ? (1 << 3) : 0; - ob_infos->ob_flag += (ob == DST.draw_ctx.obact) ? (1 << 4) : 0; + if (ob->base_flag & BASE_FROM_DUPLI) { + ob_infos->ob_flag += (DRW_object_get_dupli_parent(ob) == DST.draw_ctx.obact) ? (1 << 4) : 0; + } + else { + ob_infos->ob_flag += (ob == DST.draw_ctx.obact) ? (1 << 4) : 0; + } /* Negative scaling. */ ob_infos->ob_flag *= (ob->transflag & OB_NEG_SCALE) ? -1.0f : 1.0f; /* Object Color. */ |