diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-06-21 08:54:40 +0300 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2022-06-24 11:27:54 +0300 |
commit | e2c02655c78b2c669468ae568ddf4b17953cc98d (patch) | |
tree | 6994db6e27d0a2d1031117c6c32b234bdfb7b167 /source/blender | |
parent | c5c384d6eadf0a6698511cb8d81fb975389cc9ac (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')
-rw-r--r-- | source/blender/draw/intern/draw_cache_extract_mesh_render_data.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_cache_extract_mesh_render_data.c b/source/blender/draw/intern/draw_cache_extract_mesh_render_data.c index 0a93f346b37..4fb1b9a7bc7 100644 --- a/source/blender/draw/intern/draw_cache_extract_mesh_render_data.c +++ b/source/blender/draw/intern/draw_cache_extract_mesh_render_data.c @@ -502,8 +502,8 @@ 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) { - // mr->edit_bmesh = NULL; + if (use_mapped && do_final && editmesh_eval_final != editmesh_eval_cage) { + // mr->edit_bmesh = nullptr; mr->extract_type = MR_EXTRACT_MESH; } } |