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
This commit is contained in:
parent
c5c384d6ea
commit
e2c02655c7
Notes:
blender-bot
2023-02-14 06:00:45 +01:00
Referenced by commit fb42c5838c
, Revert "Fix T98773: GPU Subdivision breaks auto selection in UV edit mode"
Referenced by issue #99805, Regression: Crash on entering in edit mode while rendering
Referenced by issue #99323, Regression: Geometry nodes result does not show in mesh edit mode
Referenced by issue #98773, GPU Subdivision breaks auto selection in UV edit mode
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue