Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2020-04-04 12:14:45 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-04-07 15:47:06 +0300
commit5e0465e4ecba5349418f3b76b3d0061788047e9a (patch)
treeec445eb0078e6692d16fcfa028cbefbcf5b8e1ef /source/blender/draw/intern
parent4a83832120647044908898a9afc5e54028d78617 (diff)
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
Diffstat (limited to 'source/blender/draw/intern')
-rw-r--r--source/blender/draw/intern/draw_cache_extract.h1
-rw-r--r--source/blender/draw/intern/draw_cache_extract_mesh.c16
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.c3
3 files changed, 17 insertions, 3 deletions
diff --git a/source/blender/draw/intern/draw_cache_extract.h b/source/blender/draw/intern/draw_cache_extract.h
index 0e02b07e95b..b2fea957227 100644
--- a/source/blender/draw/intern/draw_cache_extract.h
+++ b/source/blender/draw/intern/draw_cache_extract.h
@@ -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,
diff --git a/source/blender/draw/intern/draw_cache_extract_mesh.c b/source/blender/draw/intern/draw_cache_extract_mesh.c
index 70fe6a55461..0449601adf7 100644
--- a/source/blender/draw/intern/draw_cache_extract_mesh.c
+++ b/source/blender/draw/intern/draw_cache_extract_mesh.c
@@ -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;
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index 308d87f1385..1aaead27ee7 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -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,