diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-22 08:11:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-22 08:15:21 +0300 |
commit | d9de8c469b404819806a63749a0e4e7cbd209044 (patch) | |
tree | 95021f21e04624804521a555936f2e580b2f7c77 /source/blender/editors/space_view3d | |
parent | f047224458774871f8bf946b86e64a6aa9c00db2 (diff) |
BMesh: loop-cut, display deformed coordinates
Previously this used derived mesh, now use evaluated data.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_gizmo_preselect_type.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.c b/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.c index 2934c55df6e..fffca6c0887 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.c @@ -32,10 +32,15 @@ #include "BLI_math.h" +#include "DNA_mesh_types.h" + #include "BKE_context.h" #include "BKE_layer.h" #include "BKE_editmesh.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_query.h" + #include "RNA_access.h" #include "RNA_define.h" @@ -134,9 +139,16 @@ static int gizmo_preselect_edgering_test_select( } else { if (best.eed) { - EDBM_preselect_edgering_update_from_edge( - gz_ring->psel, - bm, best.eed, 1); + const float (*coords)[3] = NULL; + { + Object *ob = gz_ring->objects[gz_ring->object_index]; + Depsgraph *depsgraph = CTX_data_depsgraph(C); + Mesh *me_eval = (Mesh *)DEG_get_evaluated_id(depsgraph, ob->data); + if (me_eval->runtime.edit_data) { + coords = me_eval->runtime.edit_data->vertexCos; + } + } + EDBM_preselect_edgering_update_from_edge(gz_ring->psel, bm, best.eed, 1, coords); } else { EDBM_preselect_edgering_clear(gz_ring->psel); |