diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-02-03 10:16:38 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-02-04 09:46:15 +0300 |
commit | d09646a40b1928308025d8ceb2c2d505651fc9a4 (patch) | |
tree | 0974a71a1b6f049c0f21c9b437d32c60ee8209f3 /source/blender/draw/intern/draw_cache.c | |
parent | fdb68e184714f480c87c13c3c34480e9adfe4620 (diff) |
Fix T73095: Edit Mode Overlay Linked Mesh
When using duplicate linked meshes, objects that are not in edit-mode will be drawn as
it is in edit mode, when another object with the same mesh is in edit mode.
This will not be the case when one of the objects are influenced by modifiers. The change
reflects more how it was done in Blender 2.79.
The current change introduces a draw manager method that checks in detail who is responsible
for the drawing (render engine or overlay engine). If the edit mesh is not the original or
the object that is drawn doesn't draw the original mesh the object will be drawn by the render
engine.
Known Limitation of this patch is that the rendering outside edit mode doesn't reflect the
latest changes until the user switches between object and edit mode. When there are no
modifiers in use, the updating is done immediately.
IMO this would be sufficient for blender 2.82, it also fixes parts of T72733.
The updating of the surface batches requires more development and is
post-poned for now.
Reviewed By: fclem, brecht
Differential Revision: https://developer.blender.org/D6737
Diffstat (limited to 'source/blender/draw/intern/draw_cache.c')
-rw-r--r-- | source/blender/draw/intern/draw_cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index d1823292585..1dcc605fc50 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -3449,7 +3449,7 @@ void drw_batch_cache_generate_requested(Object *ob) const bool use_hide = ((ob->type == OB_MESH) && ((is_paint_mode && (ob == draw_ctx->obact) && DRW_object_use_hide_faces(ob)) || - ((mode == CTX_MODE_EDIT_MESH) && BKE_object_is_in_editmode(ob)))); + ((mode == CTX_MODE_EDIT_MESH) && DRW_object_is_in_edit_mode(ob)))); struct Mesh *mesh_eval = ob->runtime.mesh_eval; switch (ob->type) { |