diff options
Diffstat (limited to 'source/blender/python/mathutils')
6 files changed, 23 insertions, 23 deletions
diff --git a/source/blender/python/mathutils/mathutils_Color.h b/source/blender/python/mathutils/mathutils_Color.h index c966bf1e3b2..40de26f01ea 100644 --- a/source/blender/python/mathutils/mathutils_Color.h +++ b/source/blender/python/mathutils/mathutils_Color.h @@ -31,7 +31,7 @@ typedef struct { /* struct data contains a pointer to the actual data that the * object uses. It can use either PyMem allocated data (which will * be stored in py_data) or be a wrapper for data allocated through - * blender (stored in blend_data). This is an either/or struct not both*/ + * Blender (stored in blend_data). This is an either/or struct not both. */ /* prototypes */ PyObject *Color_CreatePyObject(const float col[3], diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index 21f53257154..3dde0177648 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -1339,7 +1339,7 @@ static PyObject *Matrix_to_euler(MatrixObject *self, PyObject *args) copy_v3_v3(eul_compatf, eul_compat->eul); } - /*must be 3-4 cols, 3-4 rows, square matrix */ + /* Must be 3-4 cols, 3-4 rows, square matrix. */ if (self->num_row == 3 && self->num_col == 3) { copy_m3_m3(mat, (const float(*)[3])self->matrix); } @@ -1539,7 +1539,7 @@ static PyObject *Matrix_to_scale(MatrixObject *self) return NULL; } - /*must be 3-4 cols, 3-4 rows, square matrix */ + /* Must be 3-4 cols, 3-4 rows, square matrix. */ if ((self->num_row < 3) || (self->num_col < 3)) { PyErr_SetString(PyExc_ValueError, "Matrix.to_scale(): " @@ -2430,7 +2430,7 @@ static int Matrix_ass_item_col(MatrixObject *self, int col, PyObject *value) } /*----------------------------object[z:y]------------------------ - * sequence slice (get)*/ + * Sequence slice (get). */ static PyObject *Matrix_slice(MatrixObject *self, int begin, int end) { @@ -2456,7 +2456,7 @@ static PyObject *Matrix_slice(MatrixObject *self, int begin, int end) return tuple; } /*----------------------------object[z:y]------------------------ - * sequence slice (set)*/ + * Sequence slice (set). */ static int Matrix_ass_slice(MatrixObject *self, int begin, int end, PyObject *value) { PyObject *value_fast; @@ -2510,7 +2510,7 @@ static int Matrix_ass_slice(MatrixObject *self, int begin, int end, PyObject *va Py_DECREF(value_fast); - /*parsed well - now set in matrix*/ + /* Parsed well - now set in matrix. */ memcpy(self->matrix, mat, self->num_col * self->num_row * sizeof(float)); (void)BaseMath_WriteCallback(self); @@ -2628,7 +2628,7 @@ static PyObject *Matrix_mul(PyObject *m1, PyObject *m2) return Matrix_CreatePyObject(mat, mat2->num_col, mat1->num_row, Py_TYPE(mat1)); } if (mat2) { - /*FLOAT/INT * MATRIX */ + /* FLOAT/INT * MATRIX */ if (((scalar = PyFloat_AsDouble(m1)) == -1.0f && PyErr_Occurred()) == 0) { return matrix_mul_float(mat2, scalar); } @@ -2968,7 +2968,7 @@ static PyObject *Matrix_translation_get(MatrixObject *self, void *UNUSED(closure return NULL; } - /*must be 4x4 square matrix*/ + /* Must be 4x4 square matrix. */ if (self->num_row != 4 || self->num_col != 4) { PyErr_SetString(PyExc_AttributeError, "Matrix.translation: " @@ -2990,7 +2990,7 @@ static int Matrix_translation_set(MatrixObject *self, PyObject *value, void *UNU return -1; } - /*must be 4x4 square matrix*/ + /* Must be 4x4 square matrix. */ if (self->num_row != 4 || self->num_col != 4) { PyErr_SetString(PyExc_AttributeError, "Matrix.translation: " @@ -3034,7 +3034,7 @@ static PyObject *Matrix_median_scale_get(MatrixObject *self, void *UNUSED(closur return NULL; } - /*must be 3-4 cols, 3-4 rows, square matrix*/ + /* Must be 3-4 cols, 3-4 rows, square matrix. */ if ((self->num_row < 3) || (self->num_col < 3)) { PyErr_SetString(PyExc_AttributeError, "Matrix.median_scale: " @@ -3056,7 +3056,7 @@ static PyObject *Matrix_is_negative_get(MatrixObject *self, void *UNUSED(closure return NULL; } - /*must be 3-4 cols, 3-4 rows, square matrix*/ + /* Must be 3-4 cols, 3-4 rows, square matrix. */ if (self->num_row == 4 && self->num_col == 4) { return PyBool_FromLong(is_negative_m4((const float(*)[4])self->matrix)); } @@ -3078,7 +3078,7 @@ static PyObject *Matrix_is_orthogonal_get(MatrixObject *self, void *UNUSED(closu return NULL; } - /*must be 3-4 cols, 3-4 rows, square matrix*/ + /* Must be 3-4 cols, 3-4 rows, square matrix. */ if (self->num_row == 4 && self->num_col == 4) { return PyBool_FromLong(is_orthonormal_m4((const float(*)[4])self->matrix)); } @@ -3101,7 +3101,7 @@ static PyObject *Matrix_is_orthogonal_axis_vectors_get(MatrixObject *self, void return NULL; } - /*must be 3-4 cols, 3-4 rows, square matrix*/ + /* Must be 3-4 cols, 3-4 rows, square matrix. */ if (self->num_row == 4 && self->num_col == 4) { return PyBool_FromLong(is_orthogonal_m4((const float(*)[4])self->matrix)); } @@ -3313,7 +3313,7 @@ PyObject *Matrix_CreatePyObject(const float *mat, self->cb_user = NULL; self->cb_type = self->cb_subtype = 0; - if (mat) { /*if a float array passed*/ + if (mat) { /* If a float array passed. */ memcpy(self->matrix, mat, num_col * num_row * sizeof(float)); } else if (num_col == num_row) { @@ -3655,7 +3655,7 @@ PyTypeObject matrix_access_Type = { NULL, /*tp_compare*/ NULL, /*tp_repr*/ NULL, /*tp_as_number*/ - NULL /*&MatrixAccess_SeqMethods*/ /* TODO */, /*tp_as_sequence*/ + NULL /* &MatrixAccess_SeqMethods */ /* TODO */, /*tp_as_sequence*/ &MatrixAccess_AsMapping, /*tp_as_mapping*/ NULL, /*tp_hash*/ NULL, /*tp_call*/ diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c index 8ecce33d29c..88aa1f146e2 100644 --- a/source/blender/python/mathutils/mathutils_Quaternion.c +++ b/source/blender/python/mathutils/mathutils_Quaternion.c @@ -1113,7 +1113,7 @@ static PyObject *Quaternion_imatmul(PyObject *q1, PyObject *q2) } /* -obj - * returns the negative of this object*/ + * Returns the negative of this object. */ static PyObject *Quaternion_neg(QuaternionObject *self) { float tquat[QUAT_SIZE]; diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index b9c2400767c..a9cb125f715 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -1509,7 +1509,7 @@ static int Vector_ass_slice(VectorObject *self, int begin, int end, PyObject *se return -1; } - /*parsed well - now set in vector*/ + /* Parsed well - now set in vector. */ memcpy(self->vec + begin, vec, size * sizeof(float)); PyMem_Free(vec); @@ -1543,7 +1543,7 @@ static PyObject *Vector_add(PyObject *v1, PyObject *v2) return NULL; } - /*VECTOR + VECTOR*/ + /* VECTOR + VECTOR. */ if (vec1->size != vec2->size) { PyErr_SetString(PyExc_AttributeError, "Vector addition: " @@ -1882,7 +1882,7 @@ static PyObject *Vector_matmul(PyObject *v1, PyObject *v2) return NULL; } - /*dot product*/ + /* Dot product. */ return PyFloat_FromDouble(dot_vn_vn(vec1->vec, vec2->vec, vec1->size)); } if (vec1) { @@ -2007,7 +2007,7 @@ static PyObject *Vector_idiv(PyObject *v1, PyObject *v2) } /* -obj - * returns the negative of this object*/ + * Returns the negative of this object. */ static PyObject *Vector_neg(VectorObject *self) { float *tvec; diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c index 1304447be65..3b1a6524ed9 100644 --- a/source/blender/python/mathutils/mathutils_geometry.c +++ b/source/blender/python/mathutils/mathutils_geometry.c @@ -1213,7 +1213,7 @@ PyDoc_STRVAR(M_Geometry_tessellate_polygon_doc, /* PolyFill function, uses Blenders scanfill to fill multiple poly lines */ static PyObject *M_Geometry_tessellate_polygon(PyObject *UNUSED(self), PyObject *polyLineSeq) { - PyObject *tri_list; /*return this list of tri's */ + PyObject *tri_list; /* Return this list of tri's */ PyObject *polyLine, *polyVec; int i, len_polylines, len_polypoints; bool list_parse_error = false; @@ -1222,7 +1222,7 @@ static PyObject *M_Geometry_tessellate_polygon(PyObject *UNUSED(self), PyObject /* Display #ListBase. */ ListBase dispbase = {NULL, NULL}; DispList *dl; - float *fp; /*pointer to the array of malloced dl->verts to set the points from the vectors */ + float *fp; /* Pointer to the array of malloced dl->verts to set the points from the vectors. */ int totpoints = 0; if (!PySequence_Check(polyLineSeq)) { diff --git a/source/blender/python/mathutils/mathutils_noise.c b/source/blender/python/mathutils/mathutils_noise.c index e37e083d5e1..707fd40e9d0 100644 --- a/source/blender/python/mathutils/mathutils_noise.c +++ b/source/blender/python/mathutils/mathutils_noise.c @@ -230,7 +230,7 @@ static PyC_FlagSet bpy_noise_metrics[] = { {0, NULL}, }; -/* Fills an array of length size with random numbers in the range (-1, 1)*/ +/* Fills an array of length size with random numbers in the range (-1, 1). */ static void rand_vn(float *array_tar, const int size) { float *array_pt = array_tar + (size - 1); |