diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-07-07 19:58:11 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-07-08 19:09:52 +0300 |
commit | 226c6f086aa255bb71e554c860545bb435c06756 (patch) | |
tree | 4c60367f561d5ecc08bb912049f937034b76e21d /source/blender/editors/space_view3d/view3d_iterators.c | |
parent | 0a16519f5df0fa74623d48b7786f1db22651110a (diff) |
Fix T62941 Subdivision Modifier Showing all face dots
Previously in 2.79 we were using a specialized drawing using derivedMesh.
Now the subsurf modifier tag each center vertex as facedot and let the
DRWManager pick it up.
Some modifiers (deforming ones) do not clear the tag so we can use this
technique even if there is deforming modifiers after subsurf modifiers.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_iterators.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_iterators.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_iterators.c b/source/blender/editors/space_view3d/view3d_iterators.c index 6ed0508f09f..2636062ed8b 100644 --- a/source/blender/editors/space_view3d/view3d_iterators.c +++ b/source/blender/editors/space_view3d/view3d_iterators.c @@ -38,6 +38,7 @@ #include "BKE_editmesh.h" #include "BKE_mesh_runtime.h" #include "BKE_mesh_iterators.h" +#include "BKE_modifier.h" #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" @@ -293,8 +294,15 @@ void mesh_foreachScreenFace( data.clip_flag = clip_flag; BM_mesh_elem_table_ensure(vc->em->bm, BM_FACE); - BKE_mesh_foreach_mapped_face_center( - me, mesh_foreachScreenFace__mapFunc, &data, MESH_FOREACH_NOP); + + if (modifiers_usesSubsurfFacedots(vc->scene, vc->obedit)) { + BKE_mesh_foreach_mapped_subdiv_face_center( + me, mesh_foreachScreenFace__mapFunc, &data, MESH_FOREACH_NOP); + } + else { + BKE_mesh_foreach_mapped_face_center( + me, mesh_foreachScreenFace__mapFunc, &data, MESH_FOREACH_NOP); + } } /* ------------------------------------------------------------------------ */ |