diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-26 23:50:45 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-26 23:50:45 +0400 |
commit | 57f7aca8ee7d64c66ce8de950d1856c962841589 (patch) | |
tree | a42a6ebb8f034d6d4a7ad35c75ca58caa4189d58 /source | |
parent | f02d67918343d1f1a489ca5817f6ed9de0f79276 (diff) |
Fix for position of array-modifier end cap when not using a fixed count.
Moved calculation of final offset so that correct count value has been set.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/modifiers/intern/MOD_array.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 18ccb357579..4304b617d77 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -237,14 +237,6 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, copy_m4_m4(offset, result_mat); } - /* calculate the offset matrix of the final copy (for merging) */ - unit_m4(final_offset); - - for (j=0; j < count - 1; j++) { - mult_m4_m4m4(tmp_mat, offset, final_offset); - copy_m4_m4(final_offset, tmp_mat); - } - if (amd->fit_type == MOD_ARR_FITCURVE && amd->curve_ob) { Curve *cu = amd->curve_ob->data; if (cu) { @@ -281,6 +273,14 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, if (count < 1) count = 1; + /* calculate the offset matrix of the final copy (for merging) */ + unit_m4(final_offset); + + for (j=0; j < count - 1; j++) { + mult_m4_m4m4(tmp_mat, offset, final_offset); + copy_m4_m4(final_offset, tmp_mat); + } + /* BMESH_TODO: bumping up the stack level avoids computing the normals * after every top-level operator execution (and this modifier has the * potential to execute a *lot* of top-level BMOps. There should be a |