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/generic/mathutils_vector.c')
-rw-r--r--source/blender/python/generic/mathutils_vector.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/python/generic/mathutils_vector.c b/source/blender/python/generic/mathutils_vector.c
index 64f7eb6634b..e4027d7a80e 100644
--- a/source/blender/python/generic/mathutils_vector.c
+++ b/source/blender/python/generic/mathutils_vector.c
@@ -1145,11 +1145,14 @@ static PyObject *Vector_imul(PyObject * v1, PyObject * v2)
/* only support vec*=float and vec*=mat
vec*=vec result is a float so that wont work */
if (MatrixObject_Check(v2)) {
+ float rvec[MAX_DIMENSIONS];
if(!BaseMath_ReadCallback((MatrixObject *)v2))
return NULL;
- if(column_vector_multiplication(vec->vec, vec, (MatrixObject*)v2) == -1)
+ if(column_vector_multiplication(rvec, vec, (MatrixObject*)v2) == -1)
return NULL;
+
+ memcpy(vec->vec, rvec, sizeof(float) * vec->size);
}
else if (QuaternionObject_Check(v2)) {
/* VEC *= QUAT */