diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-09-19 20:33:08 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-09-19 21:02:12 +0300 |
commit | 9cd47884032b7485aed3df6e5f3730929be89c65 (patch) | |
tree | 5f7273938c75e37fa56513f36dfe83b1a684c1cb /source/blender/makesrna | |
parent | a53c81c60b69754408d9ada74677d24baa3aa1bb (diff) |
Fix T55059: EEVEE UV not available until you go in and out of edit mode
This is a dirty hack that should become irrelevant when depsgraph will
support CD masks.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index e5f6b36bb1f..db886692814 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -689,6 +689,17 @@ static void rna_3DViewShading_type_update(Main *bmain, Scene *UNUSED(scene), Poi return; } + for (Material *ma = bmain->mat.first; ma; ma = ma->id.next) { + /* XXX Dependency graph does not support CD mask tracking, + * so we trigger materials shading for until it's properly supported. + * This is to ensure material batches are all recreated when switching + * shading type. In the future DEG should replace this and just tag + * the meshes itself. + * This hack just tag BKE_MESH_BATCH_DIRTY_SHADING for every mesh that + * have a material. (see T55059) */ + DEG_id_tag_update(&ma->id, DEG_TAG_SHADING_UPDATE); + } + bScreen *screen = ptr->id.data; for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { |