[Bf-blender-cvs] [8ac3c3d] master: Fix T42065: Shading issue using Array modifier

Bastien Montagne noreply at git.blender.org
Sat Oct 4 12:55:05 CEST 2014


Commit: 8ac3c3d3ee229ba5b2df90f2276db1049bd104cc
Author: Bastien Montagne
Date:   Sat Oct 4 12:52:06 2014 +0200
Branches: master
https://developer.blender.org/rB8ac3c3d3ee229ba5b2df90f2276db1049bd104cc

Fix T42065: Shading issue using Array modifier

Gah... Dirty normal flag should be set on *real* final dm, after merge is done. :/

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

M	source/blender/modifiers/intern/MOD_array.c

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

diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
index bae75d8..4dbe28e 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -704,13 +704,6 @@ static DerivedMesh *arrayModifier_doArray(
 	}
 	/* done capping */
 
-	/* In case org dm has dirty normals, or we made some merging, mark normals as dirty in new dm!
-	 * TODO: we may need to set other dirty flags as well?
-	 */
-	if (use_recalc_normals) {
-		result->dirty |= DM_DIRTY_NORMALS;
-	}
-
 	/* Handle merging */
 	tot_doubles = 0;
 	if (use_merge) {
@@ -729,6 +722,14 @@ static DerivedMesh *arrayModifier_doArray(
 		}
 		MEM_freeN(full_doubles_map);
 	}
+
+	/* In case org dm has dirty normals, or we made some merging, mark normals as dirty in new dm!
+	 * TODO: we may need to set other dirty flags as well?
+	 */
+	if (use_recalc_normals) {
+		result->dirty |= DM_DIRTY_NORMALS;
+	}
+
 	return result;
 }




More information about the Bf-blender-cvs mailing list