PyAPI: allow non-vector args for geometry module

Previously only vector args were accepted,
now allow generic sequence of numbers.

Was annoying to create vectors just to pass in args.
This commit is contained in:
2014-12-30 21:50:47 +11:00
parent d993bad5e7
commit 68600920ce
3 changed files with 285 additions and 398 deletions

View File

@@ -109,6 +109,12 @@ int mathutils_array_parse_alloc(float **array, int array_min, PyObject *value, c
int mathutils_array_parse_alloc_v(float **array, int array_dim, PyObject *value, const char *error_prefix);
int mathutils_any_to_rotmat(float rmat[3][3], PyObject *value, const char *error_prefix);
/* zero remaining unused elements of the array */
#define MU_ARRAY_ZERO (1 << 30)
/* ignore larger py sequences than requested (just use first elements),
* handy when using 3d vectors as 2d */
#define MU_ARRAY_SPILL (1 << 31)
int column_vector_multiplication(float rvec[4], VectorObject *vec, MatrixObject *mat);
#ifndef MATH_STANDALONE