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.
This commit is contained in:
2018-10-24 17:59:41 +11:00
parent ee18b21201
commit c8ab88fb89

View File

@@ -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;