diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-27 17:08:40 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-27 17:08:40 +0400 |
commit | df5e551535d3954e6e46a9367f8c9b77e29946f4 (patch) | |
tree | e4edd892bab07cb364c478ed5b0a737044cece95 | |
parent | f71f09d71436c06c8d7cff0c578249a97b0ac03c (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.
-rw-r--r-- | source/blender/modifiers/intern/MOD_array.c | 9 |
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) |