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:
Diffstat (limited to 'source/blender/python/mathutils/mathutils_Matrix.c')
-rw-r--r--source/blender/python/mathutils/mathutils_Matrix.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index 76a0994c3aa..3953171f263 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -1612,8 +1612,20 @@ static PyObject *Matrix_mul(PyObject *m1, PyObject *m2)
}
}
else if(mat1) {
+ /*VEC * MATRIX */
+ if(VectorObject_Check(m2)) {
+ VectorObject *vec2= (VectorObject *)m2;
+ float tvec[4];
+ if(BaseMath_ReadCallback(vec2) == -1)
+ return NULL;
+ if(column_vector_multiplication(tvec, vec2, mat1) == -1) {
+ return NULL;
+ }
+
+ return newVectorObject(tvec, vec2->size, Py_NEW, Py_TYPE(m2));
+ }
/*FLOAT/INT * MATRIX */
- if (((scalar= PyFloat_AsDouble(m2)) == -1.0f && PyErr_Occurred())==0) {
+ else if (((scalar= PyFloat_AsDouble(m2)) == -1.0f && PyErr_Occurred())==0) {
return matrix_mul_float(mat1, scalar);
}
}