[Bf-blender-cvs] [4fb33d8] master: Fix T44361: array modifier "fit curve" mode not working properly

Bastien Montagne noreply at git.blender.org
Mon Apr 13 10:53:11 CEST 2015


Commit: 4fb33d82e251e340d4ffee8efda62cfeb5c03135
Author: Bastien Montagne
Date:   Mon Apr 13 10:51:04 2015 +0200
Branches: master
https://developer.blender.org/rB4fb33d82e251e340d4ffee8efda62cfeb5c03135

Fix T44361: array modifier "fit curve" mode not working properly

'tot_length / step_length' gives the number of 'segments', not the number of
copies - we have to add 1 here.

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

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 409d862..8ebee0d 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -501,7 +501,7 @@ static DerivedMesh *arrayModifier_doArray(
 		if (dist > eps) {
 			/* this gives length = first copy start to last copy end
 			 * add a tiny offset for floating point rounding errors */
-			count = (length + eps) / dist;
+			count = (length + eps) / dist + 1;
 		}
 		else {
 			/* if the offset has no translation, just make one copy */




More information about the Bf-blender-cvs mailing list