[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45189] trunk/blender/source/blender/ modifiers/intern/MOD_array.c: Fix for position of array-modifier end cap when not using a fixed count.

Nicholas Bishop nicholasbishop at gmail.com
Mon Mar 26 21:50:46 CEST 2012


Revision: 45189
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45189
Author:   nicholasbishop
Date:     2012-03-26 19:50:45 +0000 (Mon, 26 Mar 2012)
Log Message:
-----------
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.

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-26 19:44:25 UTC (rev 45188)
+++ trunk/blender/source/blender/modifiers/intern/MOD_array.c	2012-03-26 19:50:45 UTC (rev 45189)
@@ -237,14 +237,6 @@
 		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 @@
 	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




More information about the Bf-blender-cvs mailing list