Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2009-10-04 01:48:15 +0400
committerDalai Felinto <dfelinto@gmail.com>2009-10-04 01:48:15 +0400
commit78d9891dfebe63433b47076583df812992b3db7c (patch)
tree1cc04d90ad2f23f0d027a5f9b0a875b1486316b5
parent14c1dd941ccf0fea706b8a8c5166c1641a23be51 (diff)
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 ####
-rw-r--r--source/blender/python/generic/matrix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/generic/matrix.c b/source/blender/python/generic/matrix.c
index edb6fb7af63..5a49118b519 100644
--- a/source/blender/python/generic/matrix.c
+++ b/source/blender/python/generic/matrix.c
@@ -1315,7 +1315,7 @@ static PyObject *column_vector_multiplication(MatrixObject * mat, VectorObject*
}
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];
}