diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-06-21 08:54:40 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-06-22 17:45:20 +0300 |
commit | 6c3965c0271ce9cc9ed2833200bd6b1c131d7911 (patch) | |
tree | 4515567bc1a396c31b613c0751dbfd268f2bf514 /source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc | |
parent | cebc5531e9445a4f5cc5da85d6c0f0a7dd75fdaa (diff) |
Fix T98773: GPU Subdivision breaks auto selection in UV edit mode
When GPU subdivision is used, and the modifier is not set to be applied
on the cage, UV selection is not synced with the face selection in the
viewport.
This happens because the extraction, despite being in edit mode, is set
to `MESH` instead of `BMESH` (or `MAPPED` in some cases) like for CPU
subdivision, and since the mesh is not always synchrnised with the BMesh
the edit mode flags are not always updated.
With GPU subdivision, when creating the `MeshRenderData`, the condition
`has_mdata && do_final && editmesh_eval_final != editmesh_eval_cage` is
true which forces the `MESH` extraction. Following comment in D14485,
this replace the `has_mdata` in the condition with `use_mapped` which
solves the issue.
Differential Revision: https://developer.blender.org/D15248
Diffstat (limited to 'source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc')
-rw-r--r-- | source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc b/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc index baea0c7b646..77cbb5efa12 100644 --- a/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc +++ b/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc @@ -514,7 +514,7 @@ MeshRenderData *mesh_render_data_create(Object *object, /* Seems like the mesh_eval_final do not have the right origin indices. * Force not mapped in this case. */ - if (has_mdata && do_final && editmesh_eval_final != editmesh_eval_cage) { + if (use_mapped && do_final && editmesh_eval_final != editmesh_eval_cage) { // mr->edit_bmesh = nullptr; mr->extract_type = MR_EXTRACT_MESH; } |