diff options
Diffstat (limited to 'source/blender/python/mathutils/mathutils_interpolate.c')
-rw-r--r-- | source/blender/python/mathutils/mathutils_interpolate.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/python/mathutils/mathutils_interpolate.c b/source/blender/python/mathutils/mathutils_interpolate.c index c8cb71874db..720fac7c276 100644 --- a/source/blender/python/mathutils/mathutils_interpolate.c +++ b/source/blender/python/mathutils/mathutils_interpolate.c @@ -60,10 +60,10 @@ static PyObject *M_Interpolate_poly_3d_calc(PyObject *UNUSED(self), PyObject *ar float fp[3]; float (*vecs)[3]; Py_ssize_t len; - + PyObject *point, *veclist, *ret; int i; - + if (!PyArg_ParseTuple( args, "OO!:poly_3d_calc", &veclist, @@ -71,27 +71,27 @@ static PyObject *M_Interpolate_poly_3d_calc(PyObject *UNUSED(self), PyObject *ar { return NULL; } - + if (BaseMath_ReadCallback((VectorObject *)point) == -1) return NULL; - + fp[0] = ((VectorObject *)point)->vec[0]; fp[1] = ((VectorObject *)point)->vec[1]; if (((VectorObject *)point)->size > 2) fp[2] = ((VectorObject *)point)->vec[2]; else fp[2] = 0.0f; /* if its a 2d vector then set the z to be zero */ - + len = mathutils_array_parse_alloc_v(((float **)&vecs), 3, veclist, __func__); if (len == -1) { return NULL; } - + if (len) { float *weights = MEM_mallocN(sizeof(float) * len, __func__); - + interp_weights_poly_v3(weights, vecs, len, fp); - + ret = PyList_New(len); for (i = 0; i < len; i++) { PyList_SET_ITEM(ret, i, PyFloat_FromDouble(weights[i])); |