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:
authorJacques Lucke <mail@jlucke.com>2018-10-23 11:17:38 +0300
committerJacques Lucke <mail@jlucke.com>2018-10-23 11:19:08 +0300
commitfc3d771801ab3a864ae73cf881037063abcf89ce (patch)
tree076bc07f068a378e0e6cfd857e76160eb9ac1570 /source/blender/python/mathutils/mathutils.c
parent13cfb641c6d91f4418d00cfbba616448a15aab22 (diff)
GPUShader: shader.uniform_float parameters
Allow to pass in single numbers, sequences and mathutils.* types into `shader.uniform_float`. Reviewers: mano-wii Differential Revision: https://developer.blender.org/D3820
Diffstat (limited to 'source/blender/python/mathutils/mathutils.c')
-rw-r--r--source/blender/python/mathutils/mathutils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index 07905d2be89..a3e8089c936 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -136,7 +136,9 @@ 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 = ColorObject_Check(value) ? 3 : 0) ||
+ (size = MatrixObject_Check(value) ? ((MatrixObject *)value)->num_col
+ * ((MatrixObject *)value)->num_row : 0))
{
if (BaseMath_ReadCallback((BaseMathObject *)value) == -1) {
return -1;