Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2012-03-27 17:08:40 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2012-03-27 17:08:40 +0400
commitdf5e551535d3954e6e46a9367f8c9b77e29946f4 (patch)
treee4edd892bab07cb364c478ed5b0a737044cece95 /source/blender/modifiers/intern
parentf71f09d71436c06c8d7cff0c578249a97b0ac03c (diff)
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.
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r--source/blender/modifiers/intern/MOD_array.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
index 4304b617d77..4bfe63dcaac 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -409,6 +409,15 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
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)