diff options
author | Luca Rood <dev@lucarood.com> | 2017-06-26 15:52:59 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2017-06-26 15:52:59 +0300 |
commit | bafb90480706ad0c380a8eb1907beb046bfbcf1e (patch) | |
tree | 1e28e4c1946ba7ed2b112f9fc4891a39cce6d2e7 /source/blender/makesrna | |
parent | 37593b6a4242c8a31ffd6ce82b861b2097769ccf (diff) |
Fix T51559: Update draw cache when changing flat/smooth shading
This also renames some flags/variables to be more generic for updating
purposes. The call used here was previously only used for updating
paint data, but as it was reused here, flags and variables were renamed
to accomodate more clearly to the new usages.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index e78bdb7520f..3accd2f23f1 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -240,7 +240,7 @@ static void rna_Mesh_update_data_edit_color(Main *bmain, Scene *scene, PointerRN static void rna_Mesh_update_data_edit_weight(Main *bmain, Scene *scene, PointerRNA *ptr) { - BKE_mesh_batch_cache_dirty(rna_mesh(ptr), BKE_MESH_BATCH_DIRTY_PAINT); + BKE_mesh_batch_cache_dirty(rna_mesh(ptr), BKE_MESH_BATCH_DIRTY_NOCHECK); rna_Mesh_update_data(bmain, scene, ptr); } @@ -248,7 +248,7 @@ static void rna_Mesh_update_data_edit_weight(Main *bmain, Scene *scene, PointerR static void rna_Mesh_update_data_edit_active_color(Main *bmain, Scene *scene, PointerRNA *ptr) { - BKE_mesh_batch_cache_dirty(rna_mesh(ptr), BKE_MESH_BATCH_DIRTY_PAINT); + BKE_mesh_batch_cache_dirty(rna_mesh(ptr), BKE_MESH_BATCH_DIRTY_NOCHECK); rna_Mesh_update_data(bmain, scene, ptr); } @@ -278,7 +278,7 @@ static void rna_Mesh_update_vertmask(Main *bmain, Scene *scene, PointerRNA *ptr) me->editflag &= ~ME_EDIT_PAINT_FACE_SEL; } - BKE_mesh_batch_cache_dirty(me, BKE_MESH_BATCH_DIRTY_PAINT); + BKE_mesh_batch_cache_dirty(me, BKE_MESH_BATCH_DIRTY_NOCHECK); rna_Mesh_update_draw(bmain, scene, ptr); } @@ -290,7 +290,7 @@ static void rna_Mesh_update_facemask(Main *bmain, Scene *scene, PointerRNA *ptr) me->editflag &= ~ME_EDIT_PAINT_VERT_SEL; } - BKE_mesh_batch_cache_dirty(me, BKE_MESH_BATCH_DIRTY_PAINT); + BKE_mesh_batch_cache_dirty(me, BKE_MESH_BATCH_DIRTY_NOCHECK); rna_Mesh_update_draw(bmain, scene, ptr); } diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 22e5833b20f..b8182c813e2 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2649,7 +2649,7 @@ static void rna_LayerCollectionEngineSettings_wire_update(bContext *C, PointerRN Object *ob = OBACT_NEW; if (ob != NULL && ob->type == OB_MESH) { - BKE_mesh_batch_cache_dirty(ob->data, BKE_MESH_BATCH_DIRTY_PAINT); + BKE_mesh_batch_cache_dirty(ob->data, BKE_MESH_BATCH_DIRTY_NOCHECK); } /* TODO(sergey): Use proper flag for tagging here. */ |