[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23619] trunk/blender/source/blender/ python/generic/matrix.c: mathutils: bugfix for matrix * vector
Dalai Felinto
dfelinto at gmail.com
Sat Oct 3 23:48:23 CEST 2009
Revision: 23619
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23619
Author: dfelinto
Date: 2009-10-03 23:48:15 +0200 (Sat, 03 Oct 2009)
Log Message:
-----------
mathutils: bugfix for matrix * vector
- terrible typo was making the multiplication to run in an infinite loop.
- Any matrix * vector multiplication would crash Blender.
eg
####
import Mathutils
from Mathutils import *
vec_ray = Vector(0.0, 0.0, 1.0)
tilt_mat = RotationMatrix(0.0, 3, "y")
vec_ray = tilt_mat * vec_ray
####
Modified Paths:
--------------
trunk/blender/source/blender/python/generic/matrix.c
Modified: trunk/blender/source/blender/python/generic/matrix.c
===================================================================
--- trunk/blender/source/blender/python/generic/matrix.c 2009-10-03 18:25:54 UTC (rev 23618)
+++ trunk/blender/source/blender/python/generic/matrix.c 2009-10-03 21:48:15 UTC (rev 23619)
@@ -1315,7 +1315,7 @@
}
vecNew[3] = 1.0f;
- for(x = 0; x < mat->colSize; z++) {
+ for(x = 0; x < mat->colSize; x++) {
for(y = 0; y < mat->rowSize; y++) {
dot += mat->matrix[y][x] * vecCopy[y];
}
More information about the Bf-blender-cvs
mailing list