diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-04-10 10:49:02 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-04-10 13:44:31 +0300 |
commit | a1a8578d5c75b3f094ea18524273ed8053acbc4e (patch) | |
tree | 16d3e7617628caa15ffe0a23e28377ed37cb4532 /source/blender/draw/intern/draw_cache.c | |
parent | 1a12c9edab4ac89c8a87c20ad3a2195d0e681bc8 (diff) |
Fix T62449: Subsurf+hidden faces
When using subsurf (and other modifiers) the edit flags are not
propagated correctly. Currently we assume to read the edit flags
from the original object which is kind off hinding the real issue.
Modifiers use `mesh_new_nomain_from_template_ex` to create a copy
from an existing mesh. this method is only used by modifiers. So
by placing this we will make sure that editmesh is propagated.
Reviewed By: fclem, sergey
Maniphest Tasks: T62449
Differential Revision: https://developer.blender.org/D4666
Diffstat (limited to 'source/blender/draw/intern/draw_cache.c')
-rw-r--r-- | source/blender/draw/intern/draw_cache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index 0256564ffb5..717fd69149c 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -3808,10 +3808,11 @@ void drw_batch_cache_generate_requested(Object *ob) const enum eContextObjectMode mode = CTX_data_mode_enum_ex( draw_ctx->object_edit, draw_ctx->obact, draw_ctx->object_mode); const bool is_paint_mode = ELEM(mode, CTX_MODE_PAINT_TEXTURE, CTX_MODE_PAINT_VERTEX, CTX_MODE_PAINT_WEIGHT); + const bool use_hide = ( (ob->type == OB_MESH) && ((is_paint_mode && (ob == draw_ctx->obact) && - (BKE_paint_select_face_test(ob) || BKE_paint_select_vert_test(ob))) || + DRW_object_use_hide_faces(ob)) || ((mode == CTX_MODE_EDIT_MESH) && BKE_object_is_in_editmode(ob)))); struct Mesh *mesh_eval = ob->runtime.mesh_eval; |