[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45215] trunk/blender/source/blender/ modifiers/intern/MOD_array.c: Fix bug 30697, strange shading on array modifier with offset object.
Nicholas Bishop
nicholasbishop at gmail.com
Tue Mar 27 15:08:52 CEST 2012
Revision: 45215
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45215
Author: nicholasbishop
Date: 2012-03-27 13:08:40 +0000 (Tue, 27 Mar 2012)
Log Message:
-----------
Fix bug 30697, strange shading on array modifier with offset object.
* An offset object can rotate output, so need to update normals to
reflect that. Fix by adding a normals recalc, but only if there's an
offset object.
* Added BMESH_TODO comment to check whether there are other cases were
normals need to be updated.
Modified Paths:
--------------
trunk/blender/source/blender/modifiers/intern/MOD_array.c
Modified: trunk/blender/source/blender/modifiers/intern/MOD_array.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_array.c 2012-03-27 12:34:00 UTC (rev 45214)
+++ trunk/blender/source/blender/modifiers/intern/MOD_array.c 2012-03-27 13:08:40 UTC (rev 45215)
@@ -409,6 +409,15 @@
BLI_assert(em->looptris == NULL);
result = CDDM_from_BMEditMesh(em, NULL, FALSE, FALSE);
+ if ((amd->offset_type & MOD_ARR_OFF_OBJ) && (amd->offset_ob)) {
+ /* Update normals in case offset object has rotation. */
+
+ /* BMESH_TODO: check if normal recalc needed under any other
+ conditions? */
+
+ CDDM_calc_normals(result);
+ }
+
BMEdit_Free(em);
MEM_freeN(em);
if (indexMap)
More information about the Bf-blender-cvs
mailing list