[Bf-blender-cvs] [9cd47884032] blender2.8: Fix T55059: EEVEE UV not available until you go in and out of edit mode

Clément Foucault noreply at git.blender.org
Wed Sep 19 20:02:16 CEST 2018


Commit: 9cd47884032b7485aed3df6e5f3730929be89c65
Author: Clément Foucault
Date:   Wed Sep 19 19:33:08 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB9cd47884032b7485aed3df6e5f3730929be89c65

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.

===================================================================

M	source/blender/makesrna/intern/rna_space.c

===================================================================

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) {



More information about the Bf-blender-cvs mailing list