diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-01-23 23:36:58 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-02-10 21:37:48 +0300 |
commit | 08d1df4729b670962ce0d61b275f9c5efe05c761 (patch) | |
tree | 1d19e11b366f04ebc118971cf180321e9499f325 /source/blender/draw | |
parent | a2248e2ec4b4f0fcae58c821253a311c583f6649 (diff) |
Fix T66349: Add missing update for face orientation overlay
This forces the full geometry when that overlay is enabled.
I would rather not support this and leave that bug as a know issues/
limitation because this is terrible for performance and people may not
be aware that by enabling the option they are disabling the
optimization.
Reviewed By: jbakker
Maniphest Tasks: T66349
Differential Revision: https://developer.blender.org/D6552
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_facing.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_facing.c b/source/blender/draw/engines/overlay/overlay_facing.c index fd974e9b8b8..74d82262019 100644 --- a/source/blender/draw/engines/overlay/overlay_facing.c +++ b/source/blender/draw/engines/overlay/overlay_facing.c @@ -21,6 +21,7 @@ */ #include "DRW_render.h" +#include "BKE_paint.h" #include "overlay_private.h" @@ -45,9 +46,17 @@ void OVERLAY_facing_cache_populate(OVERLAY_Data *vedata, Object *ob) { OVERLAY_PrivateData *pd = vedata->stl->pd; - struct GPUBatch *geom = DRW_cache_object_surface_get(ob); - if (geom) { - DRW_shgroup_call(pd->facing_grp, geom, ob); + const DRWContextState *draw_ctx = DRW_context_state_get(); + const bool use_sculpt_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->v3d) && + !DRW_state_is_image_render(); + if (use_sculpt_pbvh) { + DRW_shgroup_call_sculpt(pd->facing_grp, ob, false, false, false); + } + else { + struct GPUBatch *geom = DRW_cache_object_surface_get(ob); + if (geom) { + DRW_shgroup_call(pd->facing_grp, geom, ob); + } } } |