Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-06-24 08:56:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-24 08:59:34 +0300
commit4b9ff3cd42be427e478743648e9951bf8c189a04 (patch)
treeb0cb1462a8fdae38df4a0a1067349f3118d56a43 /source/blender/python
parent2e99a74df9ecfa18c4081cdcc82227e2e24f14b1 (diff)
Cleanup: comment blocks, trailing space in comments
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/bmesh/bmesh_py_ops.c6
-rw-r--r--source/blender/python/bmesh/bmesh_py_ops_call.h2
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_customdata.c2
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.c4
-rw-r--r--source/blender/python/generic/idprop_py_api.c14
-rw-r--r--source/blender/python/gpu/gpu_py_framebuffer.c2
-rw-r--r--source/blender/python/gpu/gpu_py_matrix.c2
-rw-r--r--source/blender/python/gpu/gpu_py_offscreen.c2
-rw-r--r--source/blender/python/intern/bpy_app_translations.c6
-rw-r--r--source/blender/python/intern/bpy_driver.c2
-rw-r--r--source/blender/python/intern/bpy_interface.c2
-rw-r--r--source/blender/python/intern/bpy_library_load.c10
-rw-r--r--source/blender/python/intern/bpy_operator.h2
-rw-r--r--source/blender/python/intern/bpy_rna.c60
-rw-r--r--source/blender/python/intern/bpy_rna.h12
-rw-r--r--source/blender/python/intern/bpy_rna_data.c8
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.c4
-rw-r--r--source/blender/python/mathutils/mathutils_Matrix.c22
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.c10
-rw-r--r--source/blender/python/mathutils/mathutils_Vector.c14
-rw-r--r--source/blender/python/mathutils/mathutils_noise.c10
21 files changed, 99 insertions, 97 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_ops.c b/source/blender/python/bmesh/bmesh_py_ops.c
index b23891ca1fe..01914992f3e 100644
--- a/source/blender/python/bmesh/bmesh_py_ops.c
+++ b/source/blender/python/bmesh/bmesh_py_ops.c
@@ -228,12 +228,12 @@ static PyTypeObject bmesh_op_Type = {
NULL, /* allocfunc tp_alloc; */
NULL, /* newfunc tp_new; */
/* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
+ NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
+ NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
- NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
diff --git a/source/blender/python/bmesh/bmesh_py_ops_call.h b/source/blender/python/bmesh/bmesh_py_ops_call.h
index 6d9ceec73f6..bb994486ed1 100644
--- a/source/blender/python/bmesh/bmesh_py_ops_call.h
+++ b/source/blender/python/bmesh/bmesh_py_ops_call.h
@@ -24,7 +24,7 @@
#pragma once
typedef struct {
- PyObject_HEAD /* required python macro */
+ PyObject_HEAD /* Required Python macro. */
const char *opname;
} BPy_BMeshOpFunc;
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c
index 78c43d18609..ff06cf43026 100644
--- a/source/blender/python/bmesh/bmesh_py_types_customdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c
@@ -78,7 +78,7 @@ static CustomDataLayer *bpy_bmlayeritem_get(BPy_BMLayerItem *self)
/* getseters
* ========= */
-/* used for many different types */
+/* used for many different types. */
PyDoc_STRVAR(bpy_bmlayeraccess_collection__float_doc,
"Generic float custom-data layer.\n\ntype: :class:`BMLayerCollection`");
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index 84267a83a44..d9a82f52be0 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -97,7 +97,7 @@ static int bpy_bmloopuv_flag_set(BPy_BMLoopUV *self, PyObject *value, void *flag
}
static PyGetSetDef bpy_bmloopuv_getseters[] = {
- /* attributes match rna_def_mloopuv */
+ /* attributes match rna_def_mloopuv. */
{"uv", (getter)bpy_bmloopuv_uv_get, (setter)bpy_bmloopuv_uv_set, bpy_bmloopuv_uv_doc, NULL},
{"pin_uv",
(getter)bpy_bmloopuv_flag_get,
@@ -207,7 +207,7 @@ static int bpy_bmvertskin_flag_set(BPy_BMVertSkin *self, PyObject *value, void *
}
static PyGetSetDef bpy_bmvertskin_getseters[] = {
- /* attributes match rna_mesh_gen */
+ /* attributes match rna_mesh_gen. */
{"radius",
(getter)bpy_bmvertskin_radius_get,
(setter)bpy_bmvertskin_radius_set,
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index cebc72d99d1..8560e7eb663 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -611,8 +611,8 @@ static IDProperty *idp_from_PyMapping(const char *name, PyObject *ob)
keys = PyMapping_Keys(ob);
vals = PyMapping_Values(ob);
- /* we allocate the group first; if we hit any invalid data,
- * we can delete it easily enough.*/
+ /* We allocate the group first; if we hit any invalid data,
+ * we can delete it easily enough. */
prop = IDP_New(IDP_GROUP, &val, name);
len = PyMapping_Length(ob);
for (i = 0; i < len; i++) {
@@ -1284,8 +1284,8 @@ static PyObject *BPy_IDGroup_pop(BPy_IDProperty *self, PyObject *args)
pyform = BPy_IDGroup_MapDataToPy(idprop);
if (pyform == NULL) {
/* ok something bad happened with the #PyObject,
- * so don't remove the prop from the group. if pyform is
- * NULL, then it already should have raised an exception.*/
+ * so don't remove the prop from the group. if `pyform is
+ * NULL, then it already should have raised an exception. */
return NULL;
}
@@ -2040,12 +2040,12 @@ PyTypeObject BPy_IDArray_Type = {
NULL, /* allocfunc tp_alloc; */
NULL, /* newfunc tp_new; */
/* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
+ NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
+ NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
- NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
diff --git a/source/blender/python/gpu/gpu_py_framebuffer.c b/source/blender/python/gpu/gpu_py_framebuffer.c
index 0efc0713538..e563c6bee28 100644
--- a/source/blender/python/gpu/gpu_py_framebuffer.c
+++ b/source/blender/python/gpu/gpu_py_framebuffer.c
@@ -130,7 +130,7 @@ static bool pygpu_framebuffer_stack_pop_and_restore_or_error(GPUFrameBuffer *fb)
* \{ */
typedef struct {
- PyObject_HEAD /* required python macro */
+ PyObject_HEAD /* Required Python macro. */
BPyGPUFrameBuffer *py_fb;
int level;
} PyFrameBufferStackContext;
diff --git a/source/blender/python/gpu/gpu_py_matrix.c b/source/blender/python/gpu/gpu_py_matrix.c
index b00a13d5be8..afde666056a 100644
--- a/source/blender/python/gpu/gpu_py_matrix.c
+++ b/source/blender/python/gpu/gpu_py_matrix.c
@@ -152,7 +152,7 @@ static PyObject *pygpu_matrix_pop_projection(PyObject *UNUSED(self))
* \{ */
typedef struct {
- PyObject_HEAD /* required python macro */
+ PyObject_HEAD /* Required Python macro. */
int type;
int level;
} BPyGPU_MatrixStackContext;
diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c
index 0d29bc98a31..76c5ca266ad 100644
--- a/source/blender/python/gpu/gpu_py_offscreen.c
+++ b/source/blender/python/gpu/gpu_py_offscreen.c
@@ -97,7 +97,7 @@ static int pygpu_offscreen_valid_check(BPyGPUOffScreen *py_ofs)
* \{ */
typedef struct {
- PyObject_HEAD /* required python macro */
+ PyObject_HEAD /* Required Python macro. */
BPyGPUOffScreen *py_offscreen;
int level;
bool is_explicitly_bound; /* Bound by "bind" method. */
diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c
index d00f205ddc0..f2a564cbb49 100644
--- a/source/blender/python/intern/bpy_app_translations.c
+++ b/source/blender/python/intern/bpy_app_translations.c
@@ -855,12 +855,12 @@ static PyTypeObject BlenderAppTranslationsType = {
/* newfunc tp_new; */
(newfunc)app_translations_new,
/* Low-level free-memory routine */
- app_translations_free, /* freefunc tp_free; */
+ app_translations_free, /* freefunc tp_free; */
/* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
+ NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
- NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c
index 5102aa17250..76fbd8b9920 100644
--- a/source/blender/python/intern/bpy_driver.c
+++ b/source/blender/python/intern/bpy_driver.c
@@ -654,7 +654,7 @@ float BPY_driver_exec(struct PathResolvedRNA *anim_rna,
}
#endif
- /* decref the driver vars first... */
+ /* decref the driver vars first. */
Py_DECREF(driver_vars);
/* process the result */
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 8796877e9aa..f294f092536 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -338,7 +338,7 @@ void BPY_python_start(bContext *C, int argc, const char **argv)
{
#ifndef WITH_PYTHON_MODULE
- /* #PyPreConfig (early-configuration). */
+ /* #PyPreConfig (early-configuration). */
{
PyPreConfig preconfig;
PyStatus status;
diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c
index 5f97e11b412..70f78c25052 100644
--- a/source/blender/python/intern/bpy_library_load.c
+++ b/source/blender/python/intern/bpy_library_load.c
@@ -61,8 +61,8 @@
#endif
typedef struct {
- PyObject_HEAD /* required python macro */
- /* collection iterator specific parts */
+ PyObject_HEAD /* Required Python macro. */
+ /* Collection iterator specific parts. */
char relpath[FILE_MAX];
char abspath[FILE_MAX]; /* absolute path */
BlendHandle *blo_handle;
@@ -159,12 +159,12 @@ static PyTypeObject bpy_lib_Type = {
NULL, /* allocfunc tp_alloc; */
NULL, /* newfunc tp_new; */
/* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
+ NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
+ NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
- NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
diff --git a/source/blender/python/intern/bpy_operator.h b/source/blender/python/intern/bpy_operator.h
index 3cb335d5d9a..453b3c3d6d4 100644
--- a/source/blender/python/intern/bpy_operator.h
+++ b/source/blender/python/intern/bpy_operator.h
@@ -29,7 +29,7 @@ extern PyTypeObject pyop_base_Type;
#define BPy_OperatorBase_Check(v) (PyObject_TypeCheck(v, &pyop_base_Type))
typedef struct {
- PyObject_HEAD /* required python macro */
+ PyObject_HEAD /* Required Python macro. */
} BPy_OperatorBase;
PyObject *BPY_operator_module(void);
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 89fe907e57b..114f9a50813 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -6508,12 +6508,12 @@ PyTypeObject pyrna_struct_meta_idprop_Type = {
NULL, /* allocfunc tp_alloc; */
NULL, /* newfunc tp_new; */
/* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
+ NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
+ NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
- NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
@@ -6601,12 +6601,12 @@ PyTypeObject pyrna_struct_Type = {
NULL, /* allocfunc tp_alloc; */
pyrna_struct_new, /* newfunc tp_new; */
/* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
+ NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
+ NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
- NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
@@ -6686,12 +6686,12 @@ PyTypeObject pyrna_prop_Type = {
NULL, /* allocfunc tp_alloc; */
pyrna_prop_new, /* newfunc tp_new; */
/* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
+ NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
+ NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
- NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
@@ -6769,12 +6769,12 @@ PyTypeObject pyrna_prop_array_Type = {
NULL, /* allocfunc tp_alloc; */
NULL, /* newfunc tp_new; */
/* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
+ NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
+ NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
- NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
@@ -6854,12 +6854,12 @@ PyTypeObject pyrna_prop_collection_Type = {
NULL, /* allocfunc tp_alloc; */
NULL, /* newfunc tp_new; */
/* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
+ NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
+ NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
- NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
@@ -6940,12 +6940,12 @@ static PyTypeObject pyrna_prop_collection_idprop_Type = {
NULL, /* allocfunc tp_alloc; */
NULL, /* newfunc tp_new; */
/* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
+ NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
+ NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
- NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
@@ -7025,12 +7025,12 @@ PyTypeObject pyrna_func_Type = {
NULL, /* allocfunc tp_alloc; */
NULL, /* newfunc tp_new; */
/* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
+ NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
+ NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
- NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
@@ -7121,12 +7121,12 @@ static PyTypeObject pyrna_prop_collection_iter_Type = {
NULL, /* allocfunc tp_alloc; */
NULL, /* newfunc tp_new; */
/* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
+ NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
+ NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
- NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
@@ -7165,8 +7165,8 @@ static PyObject *pyrna_prop_collection_iter_next(BPy_PropertyCollectionIterRNA *
if (pyrna) { /* Unlikely, but may fail. */
if ((PyObject *)pyrna != Py_None) {
/* hold a reference to the iterator since it may have
- * allocated memory 'pyrna' needs. eg: introspecting dynamic enum's */
- /* TODO, we could have an api call to know if this is
+ * allocated memory 'pyrna' needs. eg: introspecting dynamic enum's. */
+ /* TODO: we could have an api call to know if this is
* needed since most collections don't */
pyrna_struct_reference_set(pyrna, (PyObject *)self);
}
@@ -7884,9 +7884,11 @@ StructRNA *pyrna_struct_as_srna(PyObject *self, const bool parent, const char *e
}
/* Orphan functions, not sure where they should go. */
-/* Get the srna for methods attached to types. */
-/*
- * Caller needs to raise error.*/
+/**
+ * Get the SRNA for methods attached to types.
+ *
+ * Caller needs to raise error.
+ */
StructRNA *srna_from_self(PyObject *self, const char *error_prefix)
{
diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h
index e891f5c1fc1..0f7e06354f4 100644
--- a/source/blender/python/intern/bpy_rna.h
+++ b/source/blender/python/intern/bpy_rna.h
@@ -110,7 +110,7 @@ extern PyTypeObject pyrna_func_Type;
/* 'in_weakreflist' MUST be aligned */
typedef struct {
- PyObject_HEAD /* required python macro */
+ PyObject_HEAD /* Required Python macro. */
#ifdef USE_WEAKREFS
PyObject *in_weakreflist;
#endif
@@ -118,7 +118,7 @@ typedef struct {
} BPy_DummyPointerRNA;
typedef struct {
- PyObject_HEAD /* required python macro */
+ PyObject_HEAD /* Required Python macro. */
#ifdef USE_WEAKREFS
PyObject *in_weakreflist;
#endif
@@ -135,7 +135,7 @@ typedef struct {
} BPy_StructRNA;
typedef struct {
- PyObject_HEAD /* required python macro */
+ PyObject_HEAD /* Required Python macro. */
#ifdef USE_WEAKREFS
PyObject *in_weakreflist;
#endif
@@ -144,7 +144,7 @@ typedef struct {
} BPy_PropertyRNA;
typedef struct {
- PyObject_HEAD /* required python macro */
+ PyObject_HEAD /* Required Python macro. */
#ifdef USE_WEAKREFS
PyObject *in_weakreflist;
#endif
@@ -159,7 +159,7 @@ typedef struct {
} BPy_PropertyArrayRNA;
typedef struct {
- PyObject_HEAD /* required python macro */
+ PyObject_HEAD /* Required Python macro. */
#ifdef USE_WEAKREFS
PyObject *in_weakreflist;
#endif
@@ -169,7 +169,7 @@ typedef struct {
} BPy_PropertyCollectionIterRNA;
typedef struct {
- PyObject_HEAD /* required python macro */
+ PyObject_HEAD /* Required Python macro. */
#ifdef USE_WEAKREFS
PyObject *in_weakreflist;
#endif
diff --git a/source/blender/python/intern/bpy_rna_data.c b/source/blender/python/intern/bpy_rna_data.c
index daab1631e8e..2b2460ba7ba 100644
--- a/source/blender/python/intern/bpy_rna_data.c
+++ b/source/blender/python/intern/bpy_rna_data.c
@@ -40,7 +40,7 @@
#include "bpy_rna_data.h"
typedef struct {
- PyObject_HEAD /* required python macro */
+ PyObject_HEAD /* Required Python macro. */
BPy_StructRNA *data_rna;
char filepath[1024];
} BPy_DataContext;
@@ -141,12 +141,12 @@ static PyTypeObject bpy_rna_data_context_Type = {
NULL, /* allocfunc tp_alloc; */
NULL, /* newfunc tp_new; */
/* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
+ NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
+ NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
- NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c
index b6a0183d04e..4e1b31b6371 100644
--- a/source/blender/python/mathutils/mathutils_Euler.c
+++ b/source/blender/python/mathutils/mathutils_Euler.c
@@ -619,9 +619,9 @@ static PySequenceMethods Euler_SeqMethods = {
(binaryfunc)NULL, /* sq_concat */
(ssizeargfunc)NULL, /* sq_repeat */
(ssizeargfunc)Euler_item, /* sq_item */
- (ssizessizeargfunc)NULL, /* sq_slice, deprecated */
+ (ssizessizeargfunc)NULL, /* sq_slice (deprecated) */
(ssizeobjargproc)Euler_ass_item, /* sq_ass_item */
- (ssizessizeobjargproc)NULL, /* sq_ass_slice, deprecated */
+ (ssizessizeobjargproc)NULL, /* sq_ass_slice (deprecated) */
(objobjproc)NULL, /* sq_contains */
(binaryfunc)NULL, /* sq_inplace_concat */
(ssizeargfunc)NULL, /* sq_inplace_repeat */
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index 5d38a3692c3..ee1fa1c5097 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -340,7 +340,7 @@ Mathutils_Callback mathutils_matrix_translation_cb = {
mathutils_matrix_translation_set_index,
};
-/* matrix column callbacks, this is so you can do matrix.translation = Vector() */
+/* matrix column callbacks, this is so you can do `matrix.translation = Vector()`. */
/* ----------------------------------mathutils.Matrix() ----------------- */
/* mat is a 1D array of floats - row[0][0], row[0][1], row[1][0], etc. */
@@ -373,7 +373,7 @@ static PyObject *Matrix_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_XDECREF(item);
if (num_col >= 2 && num_col <= 4) {
- /* sane row & col size, new matrix and assign as slice */
+ /* Sane row & col size, new matrix and assign as slice. */
PyObject *matrix = Matrix_CreatePyObject(NULL, num_col, num_row, type);
if (Matrix_ass_slice((MatrixObject *)matrix, 0, INT_MAX, arg) == 0) {
return matrix;
@@ -3154,15 +3154,15 @@ static PyGetSetDef Matrix_getseters[] = {
/*-----------------------METHOD DEFINITIONS ----------------------*/
static struct PyMethodDef Matrix_methods[] = {
- /* derived values */
+ /* Derived values. */
{"determinant", (PyCFunction)Matrix_determinant, METH_NOARGS, Matrix_determinant_doc},
{"decompose", (PyCFunction)Matrix_decompose, METH_NOARGS, Matrix_decompose_doc},
- /* in place only */
+ /* In place only. */
{"zero", (PyCFunction)Matrix_zero, METH_NOARGS, Matrix_zero_doc},
{"identity", (PyCFunction)Matrix_identity, METH_NOARGS, Matrix_identity_doc},
- /* operate on original or copy */
+ /* Operate on original or copy. */
{"transpose", (PyCFunction)Matrix_transpose, METH_NOARGS, Matrix_transpose_doc},
{"transposed", (PyCFunction)Matrix_transposed, METH_NOARGS, Matrix_transposed_doc},
{"normalize", (PyCFunction)Matrix_normalize, METH_NOARGS, Matrix_normalize_doc},
@@ -3176,26 +3176,26 @@ static struct PyMethodDef Matrix_methods[] = {
{"to_2x2", (PyCFunction)Matrix_to_2x2, METH_NOARGS, Matrix_to_2x2_doc},
{"to_3x3", (PyCFunction)Matrix_to_3x3, METH_NOARGS, Matrix_to_3x3_doc},
{"to_4x4", (PyCFunction)Matrix_to_4x4, METH_NOARGS, Matrix_to_4x4_doc},
- /* TODO. {"resize_3x3", (PyCFunction) Matrix_resize3x3, METH_NOARGS, Matrix_resize3x3_doc}, */
+ /* TODO: {"resize_3x3", (PyCFunction) Matrix_resize3x3, METH_NOARGS, Matrix_resize3x3_doc}, */
{"resize_4x4", (PyCFunction)Matrix_resize_4x4, METH_NOARGS, Matrix_resize_4x4_doc},
{"rotate", (PyCFunction)Matrix_rotate, METH_O, Matrix_rotate_doc},
- /* return converted representation */
+ /* Return converted representation. */
{"to_euler", (PyCFunction)Matrix_to_euler, METH_VARARGS, Matrix_to_euler_doc},
{"to_quaternion", (PyCFunction)Matrix_to_quaternion, METH_NOARGS, Matrix_to_quaternion_doc},
{"to_scale", (PyCFunction)Matrix_to_scale, METH_NOARGS, Matrix_to_scale_doc},
{"to_translation", (PyCFunction)Matrix_to_translation, METH_NOARGS, Matrix_to_translation_doc},
- /* operation between 2 or more types */
+ /* Operation between 2 or more types. */
{"lerp", (PyCFunction)Matrix_lerp, METH_VARARGS, Matrix_lerp_doc},
{"copy", (PyCFunction)Matrix_copy, METH_NOARGS, Matrix_copy_doc},
{"__copy__", (PyCFunction)Matrix_copy, METH_NOARGS, Matrix_copy_doc},
{"__deepcopy__", (PyCFunction)Matrix_deepcopy, METH_VARARGS, Matrix_copy_doc},
- /* base-math methods */
+ /* Base-math methods. */
{"freeze", (PyCFunction)BaseMathObject_freeze, METH_NOARGS, BaseMathObject_freeze_doc},
- /* class methods */
+ /* Class methods. */
{"Identity", (PyCFunction)C_Matrix_Identity, METH_VARARGS | METH_CLASS, C_Matrix_Identity_doc},
{"Rotation", (PyCFunction)C_Matrix_Rotation, METH_VARARGS | METH_CLASS, C_Matrix_Rotation_doc},
{"Scale", (PyCFunction)C_Matrix_Scale, METH_VARARGS | METH_CLASS, C_Matrix_Scale_doc},
@@ -3478,7 +3478,7 @@ int Matrix_Parse4x4(PyObject *o, void *p)
* special type for alternate access */
typedef struct {
- PyObject_HEAD /* required python macro */
+ PyObject_HEAD /* Required Python macro. */
MatrixObject *matrix_user;
eMatrixAccess_t type;
} MatrixAccessObject;
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index 3bc60190d56..8ecce33d29c 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -1407,11 +1407,11 @@ static void quat__axis_angle_sanitize(float axis[3], float *angle)
/* -----------------------METHOD DEFINITIONS ---------------------- */
static struct PyMethodDef Quaternion_methods[] = {
- /* in place only */
+ /* In place only. */
{"identity", (PyCFunction)Quaternion_identity, METH_NOARGS, Quaternion_identity_doc},
{"negate", (PyCFunction)Quaternion_negate, METH_NOARGS, Quaternion_negate_doc},
- /* operate on original or copy */
+ /* Operate on original or copy. */
{"conjugate", (PyCFunction)Quaternion_conjugate, METH_NOARGS, Quaternion_conjugate_doc},
{"conjugated", (PyCFunction)Quaternion_conjugated, METH_NOARGS, Quaternion_conjugated_doc},
@@ -1421,7 +1421,7 @@ static struct PyMethodDef Quaternion_methods[] = {
{"normalize", (PyCFunction)Quaternion_normalize, METH_NOARGS, Quaternion_normalize_doc},
{"normalized", (PyCFunction)Quaternion_normalized, METH_NOARGS, Quaternion_normalized_doc},
- /* return converted representation */
+ /* Return converted representation. */
{"to_euler", (PyCFunction)Quaternion_to_euler, METH_VARARGS, Quaternion_to_euler_doc},
{"to_matrix", (PyCFunction)Quaternion_to_matrix, METH_NOARGS, Quaternion_to_matrix_doc},
{"to_axis_angle",
@@ -1437,7 +1437,7 @@ static struct PyMethodDef Quaternion_methods[] = {
METH_NOARGS,
Quaternion_to_exponential_map_doc},
- /* operation between 2 or more types */
+ /* Operation between 2 or more types. */
{"cross", (PyCFunction)Quaternion_cross, METH_O, Quaternion_cross_doc},
{"dot", (PyCFunction)Quaternion_dot, METH_O, Quaternion_dot_doc},
{"rotation_difference",
@@ -1451,7 +1451,7 @@ static struct PyMethodDef Quaternion_methods[] = {
METH_O,
Quaternion_make_compatible_doc},
- /* base-math methods */
+ /* Base-math methods. */
{"freeze", (PyCFunction)BaseMathObject_freeze, METH_NOARGS, BaseMathObject_freeze_doc},
{"copy", (PyCFunction)Quaternion_copy, METH_NOARGS, Quaternion_copy_doc},
diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c
index c6d801aa733..b9c2400767c 100644
--- a/source/blender/python/mathutils/mathutils_Vector.c
+++ b/source/blender/python/mathutils/mathutils_Vector.c
@@ -2974,11 +2974,11 @@ static struct PyMethodDef Vector_methods[] = {
{"Linspace", (PyCFunction)C_Vector_Linspace, METH_VARARGS | METH_CLASS, C_Vector_Linspace_doc},
{"Repeat", (PyCFunction)C_Vector_Repeat, METH_VARARGS | METH_CLASS, C_Vector_Repeat_doc},
- /* in place only */
+ /* In place only. */
{"zero", (PyCFunction)Vector_zero, METH_NOARGS, Vector_zero_doc},
{"negate", (PyCFunction)Vector_negate, METH_NOARGS, Vector_negate_doc},
- /* operate on original or copy */
+ /* Operate on original or copy. */
{"normalize", (PyCFunction)Vector_normalize, METH_NOARGS, Vector_normalize_doc},
{"normalized", (PyCFunction)Vector_normalized, METH_NOARGS, Vector_normalized_doc},
@@ -2994,7 +2994,7 @@ static struct PyMethodDef Vector_methods[] = {
{"to_track_quat", (PyCFunction)Vector_to_track_quat, METH_VARARGS, Vector_to_track_quat_doc},
{"orthogonal", (PyCFunction)Vector_orthogonal, METH_NOARGS, Vector_orthogonal_doc},
- /* operation between 2 or more types */
+ /* Operation between 2 or more types. */
{"reflect", (PyCFunction)Vector_reflect, METH_O, Vector_reflect_doc},
{"cross", (PyCFunction)Vector_cross, METH_O, Vector_cross_doc},
{"dot", (PyCFunction)Vector_dot, METH_O, Vector_dot_doc},
@@ -3009,7 +3009,7 @@ static struct PyMethodDef Vector_methods[] = {
{"slerp", (PyCFunction)Vector_slerp, METH_VARARGS, Vector_slerp_doc},
{"rotate", (PyCFunction)Vector_rotate, METH_O, Vector_rotate_doc},
- /* base-math methods */
+ /* Base-math methods. */
{"freeze", (PyCFunction)BaseMathObject_freeze, METH_NOARGS, BaseMathObject_freeze_doc},
{"copy", (PyCFunction)Vector_copy, METH_NOARGS, Vector_copy_doc},
@@ -3105,12 +3105,12 @@ PyTypeObject vector_Type = {
NULL, /* allocfunc tp_alloc; */
Vector_new, /* newfunc tp_new; */
/* Low-level free-memory routine */
- NULL, /* freefunc tp_free; */
+ NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
- NULL, /* inquiry tp_is_gc; */
+ NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
- NULL, /* PyObject *tp_mro; */
+ NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */
diff --git a/source/blender/python/mathutils/mathutils_noise.c b/source/blender/python/mathutils/mathutils_noise.c
index c24960f2d04..e37e083d5e1 100644
--- a/source/blender/python/mathutils/mathutils_noise.c
+++ b/source/blender/python/mathutils/mathutils_noise.c
@@ -93,7 +93,7 @@
#define MIXBITS(u, v) (((u)&UMASK) | ((v)&LMASK))
#define TWIST(u, v) ((MIXBITS(u, v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL))
-static ulong state[N]; /* the array for the state vector */
+static ulong state[N]; /* The array for the state vector. */
static int left = 1;
static int initf = 0;
static ulong *next;
@@ -106,10 +106,10 @@ static void init_genrand(ulong s)
state[0] = s & 0xffffffffUL;
for (j = 1; j < N; j++) {
state[j] = (1812433253UL * (state[j - 1] ^ (state[j - 1] >> 30)) + j);
- /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
- /* In the previous versions, MSBs of the seed affect */
- /* only MSBs of the array state[]. */
- /* 2002/01/09 modified by Makoto Matsumoto */
+ /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier.
+ * In the previous versions, MSBs of the seed affect
+ * only MSBs of the array state[].
+ * 2002/01/09 modified by Makoto Matsumoto. */
state[j] &= 0xffffffffUL; /* for >32 bit machines */
}
left = 1;