Fix T75343: Wireframe overylay is not working properly with multiple modifiers
Since rBcf258b02f449, only wires and edges that are mapped to the original mesh were drawn if the mesh was modified by modifiers. Above commit was only meant for showing orig wires for paint mask overlays [where final wireframe is not desired], so now only use MR_EXTRACT_MAPPED when we are in a paint mode. Maniphest Tasks: T75343 Differential Revision: https://developer.blender.org/D7333
This commit is contained in:
parent
4a83832120
commit
5e0465e4ec
Notes:
blender-bot
2023-02-13 22:59:13 +01:00
Referenced by issue #75343, Wireframe overylay is not working properly with multiple modifiers
|
@ -253,6 +253,7 @@ void mesh_buffer_cache_create_requested(MeshBatchCache *cache,
|
|||
MeshBufferCache mbc,
|
||||
Mesh *me,
|
||||
const bool is_editmode,
|
||||
const bool is_paint_mode,
|
||||
const float obmat[4][4],
|
||||
const bool do_final,
|
||||
const bool do_uvedit,
|
||||
|
|
|
@ -129,6 +129,7 @@ typedef struct MeshRenderData {
|
|||
|
||||
static MeshRenderData *mesh_render_data_create(Mesh *me,
|
||||
const bool is_editmode,
|
||||
const bool is_paint_mode,
|
||||
const float obmat[4][4],
|
||||
const bool do_final,
|
||||
const bool do_uvedit,
|
||||
|
@ -192,7 +193,7 @@ static MeshRenderData *mesh_render_data_create(Mesh *me,
|
|||
mr->me = me;
|
||||
mr->edit_bmesh = NULL;
|
||||
|
||||
bool use_mapped = mr->me && !mr->me->runtime.is_original;
|
||||
bool use_mapped = is_paint_mode && mr->me && !mr->me->runtime.is_original;
|
||||
if (use_mapped) {
|
||||
mr->v_origindex = CustomData_get_layer(&mr->me->vdata, CD_ORIGINDEX);
|
||||
mr->e_origindex = CustomData_get_layer(&mr->me->edata, CD_ORIGINDEX);
|
||||
|
@ -4596,6 +4597,7 @@ void mesh_buffer_cache_create_requested(MeshBatchCache *cache,
|
|||
MeshBufferCache mbc,
|
||||
Mesh *me,
|
||||
const bool is_editmode,
|
||||
const bool is_paint_mode,
|
||||
const float obmat[4][4],
|
||||
const bool do_final,
|
||||
const bool do_uvedit,
|
||||
|
@ -4657,8 +4659,16 @@ void mesh_buffer_cache_create_requested(MeshBatchCache *cache,
|
|||
double rdata_start = PIL_check_seconds_timer();
|
||||
#endif
|
||||
|
||||
MeshRenderData *mr = mesh_render_data_create(
|
||||
me, is_editmode, obmat, do_final, do_uvedit, iter_flag, data_flag, cd_layer_used, ts);
|
||||
MeshRenderData *mr = mesh_render_data_create(me,
|
||||
is_editmode,
|
||||
is_paint_mode,
|
||||
obmat,
|
||||
do_final,
|
||||
do_uvedit,
|
||||
iter_flag,
|
||||
data_flag,
|
||||
cd_layer_used,
|
||||
ts);
|
||||
mr->cache = cache; /* HACK */
|
||||
mr->use_hide = use_hide;
|
||||
mr->use_subsurf_fdots = use_subsurf_fdots;
|
||||
|
|
|
@ -1369,6 +1369,7 @@ void DRW_mesh_batch_cache_create_requested(
|
|||
cache->uv_cage,
|
||||
me,
|
||||
is_editmode,
|
||||
is_paint_mode,
|
||||
ob->obmat,
|
||||
false,
|
||||
true,
|
||||
|
@ -1384,6 +1385,7 @@ void DRW_mesh_batch_cache_create_requested(
|
|||
cache->cage,
|
||||
me,
|
||||
is_editmode,
|
||||
is_paint_mode,
|
||||
ob->obmat,
|
||||
false,
|
||||
false,
|
||||
|
@ -1398,6 +1400,7 @@ void DRW_mesh_batch_cache_create_requested(
|
|||
cache->final,
|
||||
me,
|
||||
is_editmode,
|
||||
is_paint_mode,
|
||||
ob->obmat,
|
||||
true,
|
||||
false,
|
||||
|
|
Loading…
Reference in New Issue