Cleanup: strip trailing space in Python module
This commit is contained in:
@@ -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]));
|
||||
|
Reference in New Issue
Block a user