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:
authorCampbell Barton <ideasman42@gmail.com>2018-10-24 09:59:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-24 10:47:36 +0300
commitc8ab88fb89146a6bdc2a8825b9a8e2454aeb1ced (patch)
treedf402e583b79c9bcb3556ec4b5a379bb2db9ba23 /source/blender/python/mathutils/mathutils.c
parentee18b21201479e87ac8683196bb2f868e63b216b (diff)
Partially revert "GPUShader: shader.uniform_float parameters"
`mathutils_array_parse` is meant to parse 1d arrays of numbers. Using matrices internal memory layout is confusing since mathutils matrices are exposed as row major. Also, the matrix shape wasn't checked for. Callers that want to handle matrices should check for them explicitly.
Diffstat (limited to 'source/blender/python/mathutils/mathutils.c')
-rw-r--r--source/blender/python/mathutils/mathutils.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index a3e8089c936..07905d2be89 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -136,9 +136,7 @@ int mathutils_array_parse(float *array, int array_min, int array_max, PyObject *
if ((size = VectorObject_Check(value) ? ((VectorObject *)value)->size : 0) ||
(size = EulerObject_Check(value) ? 3 : 0) ||
(size = QuaternionObject_Check(value) ? 4 : 0) ||
- (size = ColorObject_Check(value) ? 3 : 0) ||
- (size = MatrixObject_Check(value) ? ((MatrixObject *)value)->num_col
- * ((MatrixObject *)value)->num_row : 0))
+ (size = ColorObject_Check(value) ? 3 : 0))
{
if (BaseMath_ReadCallback((BaseMathObject *)value) == -1) {
return -1;