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-28 08:44:12 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-28 08:46:08 +0300
commit1d8648b13a0667d338a4e60df004be7e41525968 (patch)
tree763c9e0b843850f6894101c8ad02a6bff34b5497
parent23c4854f45d7cafa1cfadf13556b9277d4666bd1 (diff)
Cleanup: repeated terms in code comments & error messages
-rw-r--r--intern/cycles/bvh/bvh_node.h2
-rw-r--r--intern/cycles/util/util_math_fast.h2
-rw-r--r--intern/cycles/util/util_task.h2
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp4
-rw-r--r--intern/itasc/kdl/frames.inl2
-rw-r--r--intern/mantaflow/intern/manta_fluid_API.cpp2
-rw-r--r--source/blender/blenkernel/BKE_customdata.h2
-rw-r--r--source/blender/blenkernel/BKE_idtype.h4
-rw-r--r--source/blender/blenkernel/intern/action.c3
-rw-r--r--source/blender/blenkernel/intern/action_mirror.c2
-rw-r--r--source/blender/blenkernel/intern/curve.c2
-rw-r--r--source/blender/blenkernel/intern/geometry_set_instances.cc2
-rw-r--r--source/blender/blenkernel/intern/gpencil_curve.c4
-rw-r--r--source/blender/blenkernel/intern/image.c6
-rw-r--r--source/blender/blenkernel/intern/mesh_boolean_convert.cc2
-rw-r--r--source/blender/blenkernel/intern/mesh_mapping.c2
-rw-r--r--source/blender/blenkernel/intern/mesh_mirror.c6
-rw-r--r--source/blender/blenkernel/intern/object.c4
-rw-r--r--source/blender/blenkernel/intern/unit.c2
-rw-r--r--source/blender/blenkernel/intern/volume.cc2
-rw-r--r--source/blender/blenkernel/nla_private.h10
-rw-r--r--source/blender/blenlib/BLI_vector.hh8
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c2
-rw-r--r--source/blender/blenlib/intern/kdtree_impl.h2
-rw-r--r--source/blender/blenlib/intern/math_color.c16
-rw-r--r--source/blender/blenlib/intern/mesh_intersect.cc8
-rw-r--r--source/blender/blenlib/intern/stack.c4
-rw-r--r--source/blender/blenlib/intern/string.c2
-rw-r--r--source/blender/blenlib/tests/BLI_listbase_test.cc2
-rw-r--r--source/blender/blenloader/intern/readfile.c2
-rw-r--r--source/blender/bmesh/bmesh_class.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_normals.c4
-rw-r--r--source/blender/bmesh/intern/bmesh_mods.c8
-rw-r--r--source/blender/bmesh/intern/bmesh_query.c4
-rw-r--r--source/blender/bmesh/operators/bmo_dupe.c10
-rw-r--r--source/blender/bmesh/operators/bmo_hull.c2
-rw-r--r--source/blender/bmesh/tools/bmesh_bevel.c4
-rw-r--r--source/blender/compositor/intern/COM_CompositorContext.h8
-rw-r--r--source/blender/draw/intern/draw_manager.c2
-rw-r--r--source/blender/editors/animation/keyframes_edit.c4
-rw-r--r--source/blender/editors/armature/armature_edit.c2
-rw-r--r--source/blender/editors/armature/armature_relations.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_data.c5
-rw-r--r--source/blender/editors/include/ED_view3d.h2
-rw-r--r--source/blender/editors/interface/interface_handlers.c5
-rw-r--r--source/blender/editors/interface/interface_templates.c4
-rw-r--r--source/blender/editors/interface/interface_widgets.c2
-rw-r--r--source/blender/editors/object/object_add.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c4
-rw-r--r--source/blender/editors/space_graph/graph_select.c6
-rw-r--r--source/blender/editors/space_info/info_stats.c2
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_iterators.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_placement.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_walk.c2
-rw-r--r--source/blender/editors/transform/transform_snap_object.c4
-rw-r--r--source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp2
-rw-r--r--source/blender/freestyle/intern/winged_edge/WEdge.h4
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c2
-rw-r--r--source/blender/imbuf/intern/anim_movie.c2
-rw-r--r--source/blender/makesdna/DNA_genfile.h2
-rw-r--r--source/blender/makesrna/intern/rna_access_compare_override.c2
-rw-r--r--source/blender/makesrna/intern/rna_action.c2
-rw-r--r--source/blender/makesrna/intern/rna_fluid.c2
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c2
-rw-r--r--source/blender/nodes/NOD_derived_node_tree.hh2
-rw-r--r--source/blender/nodes/NOD_geometry_exec.hh2
-rw-r--r--source/blender/python/bmesh/bmesh_py_ops_call.c2
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.c2
-rw-r--r--source/blender/python/generic/bgl.c4
-rw-r--r--source/blender/python/generic/idprop_py_api.c2
-rw-r--r--source/blender/python/generic/imbuf_py_api.c2
-rw-r--r--source/blender/render/intern/engine.c4
-rw-r--r--source/blender/sequencer/intern/render.c2
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c8
-rw-r--r--source/blender/windowmanager/intern/wm_stereo.c2
78 files changed, 136 insertions, 133 deletions
diff --git a/intern/cycles/bvh/bvh_node.h b/intern/cycles/bvh/bvh_node.h
index 797dd5b694e..b3b5c43a394 100644
--- a/intern/cycles/bvh/bvh_node.h
+++ b/intern/cycles/bvh/bvh_node.h
@@ -179,7 +179,7 @@ class InnerNode : public BVHNode {
}
/* NOTE: This function is only used during binary BVH builder, and it
- * supposed to be configured to have 2 children which will be filled in in a
+ * supposed to be configured to have 2 children which will be filled-in in a
* bit. But this is important to have children reset to NULL. */
explicit InnerNode(const BoundBox &bounds) : BVHNode(bounds), num_children_(0)
{
diff --git a/intern/cycles/util/util_math_fast.h b/intern/cycles/util/util_math_fast.h
index 5ae56290f05..1113ede0f2d 100644
--- a/intern/cycles/util/util_math_fast.h
+++ b/intern/cycles/util/util_math_fast.h
@@ -243,7 +243,7 @@ ccl_device float fast_sinpif(float x)
const float P = 3.584135056f; /* P = 16-4*Q */
return y * (Q + P * fabsf(y));
- /* The original article used used inferior constants for Q and P and
+ /* The original article used inferior constants for Q and P and
* so had max error 1.091e-3.
*
* The optimal value for Q was determined by exhaustive search, minimizing
diff --git a/intern/cycles/util/util_task.h b/intern/cycles/util/util_task.h
index 55344ff86ba..ec45dfa8040 100644
--- a/intern/cycles/util/util_task.h
+++ b/intern/cycles/util/util_task.h
@@ -68,7 +68,7 @@ class TaskPool {
/* ** Statistics ** */
- /* Time time stamp of first task pushed. */
+ /* Time stamp of first task pushed. */
double start_time;
/* Number of all tasks pushed to the pool. Cleared after wait_work() and cancel(). */
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index cdfb950a72c..fd01d21da5a 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1012,8 +1012,8 @@ void GHOST_SystemWin32::processWintabEvent(GHOST_WindowWin32 *window)
void GHOST_SystemWin32::processPointerEvent(
UINT type, GHOST_WindowWin32 *window, WPARAM wParam, LPARAM lParam, bool &eventHandled)
{
- /* Pointer events might fire when changing windows for a device which is set to use Wintab, even
- * when when Wintab is left enabled but set to the bottom of Wintab overlap order. */
+ /* Pointer events might fire when changing windows for a device which is set to use Wintab,
+ * even when Wintab is left enabled but set to the bottom of Wintab overlap order. */
if (!window->usingTabletAPI(GHOST_kTabletWinPointer)) {
return;
}
diff --git a/intern/itasc/kdl/frames.inl b/intern/itasc/kdl/frames.inl
index a09b532762b..f7a805d10c4 100644
--- a/intern/itasc/kdl/frames.inl
+++ b/intern/itasc/kdl/frames.inl
@@ -867,7 +867,7 @@ IMETHOD void Vector2::Set3DYZ(const Vector& v)
data[1]=v(2);
}
IMETHOD void Vector2::Set3DZX(const Vector& v)
-// projects v in its XY plane, and and sets *this to these values
+// projects v in its XY plane, and sets *this to these values
{
data[0]=v(2);
data[1]=v(0);
diff --git a/intern/mantaflow/intern/manta_fluid_API.cpp b/intern/mantaflow/intern/manta_fluid_API.cpp
index c04180c8c46..5b27bd91d91 100644
--- a/intern/mantaflow/intern/manta_fluid_API.cpp
+++ b/intern/mantaflow/intern/manta_fluid_API.cpp
@@ -323,7 +323,7 @@ static void get_rgba(
float *r, float *g, float *b, float *a, int total_cells, float *data, int sequential)
{
int i;
- /* Use offsets to map RGB grids to to correct location in data grid. */
+ /* Use offsets to map RGB grids to correct location in data grid. */
int m = 4, i_g = 1, i_b = 2, i_a = 3;
if (sequential) {
m = 1;
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h
index d41b3f9f956..c4db8ee925e 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -539,7 +539,7 @@ enum {
CDT_MIX_ADD = 17,
CDT_MIX_SUB = 18,
CDT_MIX_MUL = 19,
- /* etc. etc. */
+ /* Etc. */
};
typedef struct CustomDataTransferLayerMap {
diff --git a/source/blender/blenkernel/BKE_idtype.h b/source/blender/blenkernel/BKE_idtype.h
index 4578f1c3ca5..28171b2b363 100644
--- a/source/blender/blenkernel/BKE_idtype.h
+++ b/source/blender/blenkernel/BKE_idtype.h
@@ -82,8 +82,8 @@ typedef void (*IDTypeMakeLocalFunction)(struct Main *bmain, struct ID *id, const
typedef void (*IDTypeForeachIDFunction)(struct ID *id, struct LibraryForeachIDData *data);
typedef enum eIDTypeInfoCacheCallbackFlags {
- /** Indicates to the callback that that cache may be stored in the .blend file, so its pointer
- * should not be cleared at read-time. */
+ /** Indicates to the callback that cache may be stored in the .blend file,
+ * so its pointer should not be cleared at read-time. */
IDTYPE_CACHE_CB_FLAGS_PERSISTENT = 1 << 0,
} eIDTypeInfoCacheCallbackFlags;
typedef void (*IDTypeForeachCacheFunctionCallback)(struct ID *id,
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index cf7023bc672..fdf3558abed 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -486,8 +486,7 @@ void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve)
/* If grp is NULL, that means we fell through, and this F-Curve should be added as the new
* first since group is (effectively) the first group. Thus, the existing first F-Curve becomes
- * the second in the chain, etc. etc.
- */
+ * the second in the chain, etc. */
if (grp == NULL) {
BLI_insertlinkbefore(&act->curves, act->curves.first, fcurve);
}
diff --git a/source/blender/blenkernel/intern/action_mirror.c b/source/blender/blenkernel/intern/action_mirror.c
index c975d2bfb9c..69e0091444b 100644
--- a/source/blender/blenkernel/intern/action_mirror.c
+++ b/source/blender/blenkernel/intern/action_mirror.c
@@ -343,7 +343,7 @@ static void action_flip_pchan(Object *ob_arm,
} \
((void)0)
- /* Write the values back the the F-curves. */
+ /* Write the values back the F-curves. */
WRITE_ARRAY_FLT(loc);
WRITE_ARRAY_FLT(eul);
WRITE_ARRAY_FLT(quat);
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 462451fe72b..1849ca03b50 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -5135,7 +5135,7 @@ void BKE_curve_nurb_vert_active_set(Curve *cu, const Nurb *nu, const void *vert)
}
}
-/* Get points to active active nurb and active vert for curve */
+/* Get points to the active nurb and active vert for curve. */
bool BKE_curve_nurb_vert_active_get(Curve *cu, Nurb **r_nu, void **r_vert)
{
Nurb *nu = NULL;
diff --git a/source/blender/blenkernel/intern/geometry_set_instances.cc b/source/blender/blenkernel/intern/geometry_set_instances.cc
index 8cf08d05d9d..6921b102b20 100644
--- a/source/blender/blenkernel/intern/geometry_set_instances.cc
+++ b/source/blender/blenkernel/intern/geometry_set_instances.cc
@@ -264,7 +264,7 @@ static bool instances_attribute_foreach_recursive(const GeometrySet &geometry_se
}
}
- /* Now that this this geometry set is visited, increase the count and check with the limit. */
+ /* Now that this geometry set is visited, increase the count and check with the limit. */
if (limit > 0 && count++ > limit) {
return false;
}
diff --git a/source/blender/blenkernel/intern/gpencil_curve.c b/source/blender/blenkernel/intern/gpencil_curve.c
index 74bb787eac3..344be7bc0f5 100644
--- a/source/blender/blenkernel/intern/gpencil_curve.c
+++ b/source/blender/blenkernel/intern/gpencil_curve.c
@@ -242,8 +242,8 @@ static int gpencil_get_stroke_material_fromcurve(
float color_fill[4] = {0.0f, 0.0f, 0.0f, 0.0f};
/* If the curve has 2 materials, the first is considered as Fill and the second as Stroke.
- * If the has only one material, if the name contains _stroke, the is used
- * as stroke, else as fill. */
+ * If the has only one material, if the name contains "_stroke",
+ * it's used as a stroke, otherwise as fill. */
if (ob_cu->totcol >= 2) {
*do_stroke = true;
*do_fill = true;
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index a2131d735a6..740c9b3864c 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1056,9 +1056,11 @@ Image *BKE_image_add_generated(Main *bmain,
return ima;
}
-/* Create an image image from ibuf. The refcount of ibuf is increased,
+/**
+ * Create an image from ibuf. The refcount of ibuf is increased,
* caller should take care to drop its reference by calling
- * IMB_freeImBuf if needed. */
+ * #IMB_freeImBuf if needed.
+ */
Image *BKE_image_add_from_imbuf(Main *bmain, ImBuf *ibuf, const char *name)
{
/* on save, type is changed to FILE in editsima.c */
diff --git a/source/blender/blenkernel/intern/mesh_boolean_convert.cc b/source/blender/blenkernel/intern/mesh_boolean_convert.cc
index 5a8921132af..c162458ffb9 100644
--- a/source/blender/blenkernel/intern/mesh_boolean_convert.cc
+++ b/source/blender/blenkernel/intern/mesh_boolean_convert.cc
@@ -776,7 +776,7 @@ static Mesh *imesh_to_mesh(IMesh *im, MeshesToIMeshInfo &mim)
/**
* Do a mesh boolean operation directly on meshes (without going back and forth to BMesh).
- * \param meshes: An array of of Mesh pointers.
+ * \param meshes: An array of Mesh pointers.
* \param obmats: An array of pointers to the obmat matrices that transform local
* coordinates to global ones. It is allowed for the pointers to be null, meaning the
* transformation is the identity.
diff --git a/source/blender/blenkernel/intern/mesh_mapping.c b/source/blender/blenkernel/intern/mesh_mapping.c
index d4119f48193..c469a65449d 100644
--- a/source/blender/blenkernel/intern/mesh_mapping.c
+++ b/source/blender/blenkernel/intern/mesh_mapping.c
@@ -535,7 +535,7 @@ void BKE_mesh_edge_poly_map_create(MeshElemMap **r_map,
*
* This has the advantage that it can operate on any data-types.
*
- * \param totsource: The total number of elements the that \a final_origindex points to.
+ * \param totsource: The total number of elements that \a final_origindex points to.
* \param totfinal: The size of \a final_origindex
* \param final_origindex: The size of the final array.
*
diff --git a/source/blender/blenkernel/intern/mesh_mirror.c b/source/blender/blenkernel/intern/mesh_mirror.c
index 3d30c218fba..9aeaa1ada52 100644
--- a/source/blender/blenkernel/intern/mesh_mirror.c
+++ b/source/blender/blenkernel/intern/mesh_mirror.c
@@ -70,9 +70,9 @@ Mesh *BKE_mesh_mirror_bisect_on_mirror_plane_for_modifier(MirrorModifierData *mm
/* Define bisecting plane (aka mirror plane). */
float plane[4];
if (!do_bisect_flip_axis) {
- /* That reversed condition is a tad weird, but for some reason that's how you keep
- * the part of the mesh which is on the non-mirrored side when flip option is disabled,
- * think that that is the expected behavior. */
+ /* That reversed condition is a little weird, but for some reason that's how you keep
+ * the part of the mesh which is on the non-mirrored side when flip option is disabled.
+ * I think this is the expected behavior. */
negate_v3(plane_no);
}
plane_from_point_normal_v3(plane, plane_co, plane_no);
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index c5614a69744..a5e16172e75 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -4475,7 +4475,7 @@ Mesh *BKE_object_get_pre_modified_mesh(const Object *object)
}
/**
- * Get a mesh which corresponds to very very original mesh from #Main.
+ * Get a mesh which corresponds to the very original mesh from #Main.
* - For original objects it will be object->data.
* - For evaluated objects it will be same mesh as corresponding original
* object uses as data.
@@ -5303,7 +5303,7 @@ KDTree_3d *BKE_object_as_kdtree(Object *ob, int *r_tot)
tot = 0;
tree = BLI_kdtree_3d_new(totvert);
- /* we don't how how many verts from the DM we can use */
+ /* We don't how many verts from the DM we can use. */
for (i = 0; i < totvert; i++) {
if (index[i] != ORIGINDEX_NONE) {
float co[3];
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index 3a9ce5ad932..290b880934e 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -744,7 +744,7 @@ static const char *unit_find_str(const char *str, const char *substr, bool case_
*
* "1m1cm+2mm" - Original value.
* "1*1#1*0.01#+2*0.001#" - Replace numbers.
- * "1*1+1*0.01 +2*0.001 " - Add add signs if ( + - * / | & ~ < > ^ ! = % ) not found in between.
+ * "1*1+1*0.01 +2*0.001 " - Add plus signs if ( + - * / | & ~ < > ^ ! = % ) not found in between.
*/
/* Not too strict, (+ - * /) are most common. */
diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc
index 5fc55aad6a2..272ecc71833 100644
--- a/source/blender/blenkernel/intern/volume.cc
+++ b/source/blender/blenkernel/intern/volume.cc
@@ -1224,7 +1224,7 @@ const VolumeGrid *BKE_volume_grid_active_get_for_read(const Volume *volume)
return BKE_volume_grid_get_for_read(volume, index);
}
-/* Tries to find a grid with the given name. Make sure that that the volume has been loaded. */
+/* Tries to find a grid with the given name. Make sure that the volume has been loaded. */
const VolumeGrid *BKE_volume_grid_find_for_read(const Volume *volume, const char *name)
{
int num_grids = BKE_volume_num_grids(volume);
diff --git a/source/blender/blenkernel/nla_private.h b/source/blender/blenkernel/nla_private.h
index 71b5a74ddf7..3e13ba602a4 100644
--- a/source/blender/blenkernel/nla_private.h
+++ b/source/blender/blenkernel/nla_private.h
@@ -39,13 +39,13 @@ struct AnimationEvalContext;
typedef struct NlaEvalStrip {
struct NlaEvalStrip *next, *prev;
- NlaTrack *track; /* track that this strip belongs to */
- NlaStrip *strip; /* strip that's being used */
+ NlaTrack *track; /* Track that this strip belongs to. */
+ NlaStrip *strip; /* Strip that's being used. */
- short track_index; /* the index of the track within the list */
- short strip_mode; /* which end of the strip are we looking at */
+ short track_index; /* The index of the track within the list. */
+ short strip_mode; /* Which end of the strip are we looking at. */
- float strip_time; /* time at which which strip is being evaluated */
+ float strip_time; /* Time at which this strip is being evaluated. */
} NlaEvalStrip;
/* NlaEvalStrip->strip_mode */
diff --git a/source/blender/blenlib/BLI_vector.hh b/source/blender/blenlib/BLI_vector.hh
index 0e878d549c1..5b88ad6fa7d 100644
--- a/source/blender/blenlib/BLI_vector.hh
+++ b/source/blender/blenlib/BLI_vector.hh
@@ -507,10 +507,10 @@ class Vector {
}
/**
- * Enlarges the size of the internal buffer that is considered to be initialized. This invokes
- * undefined behavior when when the new size is larger than the capacity. The method can be
- * useful when you want to call constructors in the vector yourself. This should only be done in
- * very rare cases and has to be justified every time.
+ * Enlarges the size of the internal buffer that is considered to be initialized.
+ * This invokes undefined behavior when the new size is larger than the capacity.
+ * The method can be useful when you want to call constructors in the vector yourself.
+ * This should only be done in very rare cases and has to be justified every time.
*/
void increase_size_by_unchecked(const int64_t n) noexcept
{
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index a0e94e00634..8f556e0ddb6 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -1212,7 +1212,7 @@ static void tree_overlap_traverse_cb(BVHOverlapData_Thread *data_thread,
}
/**
- * a version of #tree_overlap_traverse_cb that that break on first true return.
+ * a version of #tree_overlap_traverse_cb that break on first true return.
*/
static bool tree_overlap_traverse_num(BVHOverlapData_Thread *data_thread,
const BVHNode *node1,
diff --git a/source/blender/blenlib/intern/kdtree_impl.h b/source/blender/blenlib/intern/kdtree_impl.h
index 2a0e8b3ec68..2aec3ce082a 100644
--- a/source/blender/blenlib/intern/kdtree_impl.h
+++ b/source/blender/blenlib/intern/kdtree_impl.h
@@ -967,7 +967,7 @@ static int kdtree_node_cmp_deduplicate(const void *n0_p, const void *n1_p)
}
/**
- * Remove exact duplicates (run before before balancing).
+ * Remove exact duplicates (run before balancing).
*
* Keep the first element added when duplicates are found.
*/
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c
index 67c4ad95d79..263c508c07c 100644
--- a/source/blender/blenlib/intern/math_color.c
+++ b/source/blender/blenlib/intern/math_color.c
@@ -717,13 +717,17 @@ void blackbody_temperature_to_rgb_table(float *r_table, int width, float min, fl
/* ****************************** wavelength ******************************** */
/* Wavelength to RGB. */
-/* CIE colour matching functions xBar, yBar, and zBar for
- * wavelengths from 380 through 780 nanometers, every 5
- * nanometers.
+/**
+ * CIE color matching functions `xBar`, `yBar`, and `zBar` for
+ * wavelengths from 380 through 780 nanometers, every 5 nanometers.
+ *
* For a wavelength lambda in this range:
- * cie_colour_match[(lambda - 380) / 5][0] = xBar
- * cie_colour_match[(lambda - 380) / 5][1] = yBar
- * cie_colour_match[(lambda - 380) / 5][2] = zBar */
+ * \code{.txt}
+ * cie_color_match[(lambda - 380) / 5][0] = xBar
+ * cie_color_match[(lambda - 380) / 5][1] = yBar
+ * cie_color_match[(lambda - 380) / 5][2] = zBar
+ * \endcode
+ */
static float cie_colour_match[81][3] = {
{0.0014f, 0.0000f, 0.0065f}, {0.0022f, 0.0001f, 0.0105f}, {0.0042f, 0.0001f, 0.0201f},
diff --git a/source/blender/blenlib/intern/mesh_intersect.cc b/source/blender/blenlib/intern/mesh_intersect.cc
index a9c725d4adf..988988179fd 100644
--- a/source/blender/blenlib/intern/mesh_intersect.cc
+++ b/source/blender/blenlib/intern/mesh_intersect.cc
@@ -1386,7 +1386,7 @@ static ITT_value intersect_tri_tri(const IMesh &tm, int t1, int t2)
int sr1 = filter_plane_side(d_r1, d_r2, d_n2, abs_d_r1, abs_d_r2, abs_d_n2);
if ((sp1 > 0 && sq1 > 0 && sr1 > 0) || (sp1 < 0 && sq1 < 0 && sr1 < 0)) {
# ifdef PERFDEBUG
- incperfcount(2); /* Tri tri intersects decided by filter plane tests. */
+ incperfcount(2); /* Triangle-triangle intersects decided by filter plane tests. */
# endif
if (dbg_level > 0) {
std::cout << "no intersection, all t1's verts above or below t2\n";
@@ -1404,7 +1404,7 @@ static ITT_value intersect_tri_tri(const IMesh &tm, int t1, int t2)
int sr2 = filter_plane_side(d_r2, d_r1, d_n1, abs_d_r2, abs_d_r1, abs_d_n1);
if ((sp2 > 0 && sq2 > 0 && sr2 > 0) || (sp2 < 0 && sq2 < 0 && sr2 < 0)) {
# ifdef PERFDEBUG
- incperfcount(2); /* Tri tri intersects decided by filter plane tests. */
+ incperfcount(2); /* Triangle-triangle intersects decided by filter plane tests. */
# endif
if (dbg_level > 0) {
std::cout << "no intersection, all t2's verts above or below t1\n";
@@ -1446,7 +1446,7 @@ static ITT_value intersect_tri_tri(const IMesh &tm, int t1, int t2)
std::cout << "no intersection, all t1's verts above or below t2 (exact)\n";
}
# ifdef PERFDEBUG
- incperfcount(3); /* Tri tri intersects decided by exact plane tests. */
+ incperfcount(3); /* Triangle-triangle intersects decided by exact plane tests. */
# endif
return ITT_value(INONE);
}
@@ -1478,7 +1478,7 @@ static ITT_value intersect_tri_tri(const IMesh &tm, int t1, int t2)
std::cout << "no intersection, all t2's verts above or below t1 (exact)\n";
}
# ifdef PERFDEBUG
- incperfcount(3); /* Tri tri intersects decided by exact plane tests. */
+ incperfcount(3); /* Triangle-triangle intersects decided by exact plane tests. */
# endif
return ITT_value(INONE);
}
diff --git a/source/blender/blenlib/intern/stack.c b/source/blender/blenlib/intern/stack.c
index f2e8b352aab..4a9bdd48a0a 100644
--- a/source/blender/blenlib/intern/stack.c
+++ b/source/blender/blenlib/intern/stack.c
@@ -182,7 +182,7 @@ void BLI_stack_pop(BLI_Stack *stack, void *dst)
}
/**
- * A version of #BLI_stack_pop which which fills in an array.
+ * A version of #BLI_stack_pop which fills in an array.
*
* \param dst: The destination array,
* must be at least (#BLI_Stack.elem_size * \a n) bytes long.
@@ -201,7 +201,7 @@ void BLI_stack_pop_n(BLI_Stack *stack, void *dst, unsigned int n)
}
/**
- * A version of #BLI_stack_pop_n which which fills in an array (in the reverse order).
+ * A version of #BLI_stack_pop_n which fills in an array (in the reverse order).
*
* \note The first item in the array will be first item added to the stack.
*/
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index b2b8d6a0f24..61d095658a3 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -370,7 +370,7 @@ size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, const si
* \param src: The escaped source string.
* \param dst_maxncpy: The maximum number of bytes allowable to copy.
*
- * \note This is used for for parsing animation paths in blend files.
+ * \note This is used for parsing animation paths in blend files.
*/
size_t BLI_str_unescape(char *__restrict dst, const char *__restrict src, const size_t src_maxncpy)
{
diff --git a/source/blender/blenlib/tests/BLI_listbase_test.cc b/source/blender/blenlib/tests/BLI_listbase_test.cc
index ff85cf79e87..0ba08a0cd48 100644
--- a/source/blender/blenlib/tests/BLI_listbase_test.cc
+++ b/source/blender/blenlib/tests/BLI_listbase_test.cc
@@ -192,7 +192,7 @@ TEST(listbase, Sort)
EXPECT_TRUE(listbase_is_valid(&words_lb));
}
- /* sort single single */
+ /* Sort single list. */
{
LinkData link;
link.data = words;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index f9982d96d76..5b668bf12eb 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -729,7 +729,7 @@ static void bh4_from_bh8(BHead *bhead, BHead8 *bhead8, bool do_endian_swap)
BLI_endian_switch_uint64(&bhead8->old);
}
- /* this patch is to avoid a long long being read from not-eight aligned positions
+ /* this patch is to avoid `intptr_t` being read from not-eight aligned positions
* is necessary on any modern 64bit architecture) */
memcpy(&old, &bhead8->old, 8);
bhead4->old = (int)(old >> 3);
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h
index 61ec1bc679e..e3efeec951e 100644
--- a/source/blender/bmesh/bmesh_class.h
+++ b/source/blender/bmesh/bmesh_class.h
@@ -142,7 +142,7 @@ typedef struct BMEdge {
/**
* Disk Cycle Pointers
*
- * relative data: d1 indicates indicates the next/prev
+ * relative data: d1 indicates the next/prev
* edge around vertex v1 and d2 does the same for v2.
*/
BMDiskLink v1_disk_link, v2_disk_link;
diff --git a/source/blender/bmesh/intern/bmesh_mesh_normals.c b/source/blender/bmesh/intern/bmesh_mesh_normals.c
index db09bbff97c..a8a75656c94 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_normals.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_normals.c
@@ -65,8 +65,8 @@ BLI_INLINE void bm_vert_calc_normals_accum_loop(const BMLoop *l_iter,
float v_no[3])
{
/* Calculate the dot product of the two edges that meet at the loop's vertex. */
- /* Edge vectors are calculated from e->v1 to e->v2, so adjust the dot product if one but not
- * both loops actually runs from from e->v2 to e->v1. */
+ /* Edge vectors are calculated from `e->v1` to `e->v2`, so adjust the dot product if one but not
+ * both loops actually runs from `e->v2` to `e->v1`. */
float dotprod = dot_v3v3(e1diff, e2diff);
if ((l_iter->prev->e->v1 == l_iter->prev->v) ^ (l_iter->e->v1 == l_iter->v)) {
dotprod = -dotprod;
diff --git a/source/blender/bmesh/intern/bmesh_mods.c b/source/blender/bmesh/intern/bmesh_mods.c
index b61ef47351a..f75497f2f19 100644
--- a/source/blender/bmesh/intern/bmesh_mods.c
+++ b/source/blender/bmesh/intern/bmesh_mods.c
@@ -246,8 +246,8 @@ BMFace *BM_faces_join_pair(BMesh *bm, BMLoop *l_a, BMLoop *l_b, const bool do_de
* \param no_double: Use an existing edge if found
*
* \return Pointer to the newly created face representing one side of the split
- * if the split is successful (and the original original face will be the
- * other side). NULL if the split fails.
+ * if the split is successful (and the original face will be the other side).
+ * NULL if the split fails.
*/
BMFace *BM_face_split(BMesh *bm,
BMFace *f,
@@ -328,8 +328,8 @@ BMFace *BM_face_split(BMesh *bm,
* \param example: Edge used for attributes of splitting edge, if non-NULL.
*
* \return Pointer to the newly created face representing one side of the split
- * if the split is successful (and the original original face will be the
- * other side). NULL if the split fails.
+ * if the split is successful (and the original face will be the other side).
+ * NULL if the split fails.
*/
BMFace *BM_face_split_n(BMesh *bm,
BMFace *f,
diff --git a/source/blender/bmesh/intern/bmesh_query.c b/source/blender/bmesh/intern/bmesh_query.c
index 1449df9925f..8047b52b625 100644
--- a/source/blender/bmesh/intern/bmesh_query.c
+++ b/source/blender/bmesh/intern/bmesh_query.c
@@ -1824,8 +1824,8 @@ float BM_vert_calc_edge_angle_ex(const BMVert *v, const float fallback)
{
BMEdge *e1, *e2;
- /* saves BM_vert_edge_count(v) and and edge iterator,
- * get the edges and count them both at once */
+ /* Saves `BM_vert_edge_count(v)` and edge iterator,
+ * get the edges and count them both at once. */
if ((e1 = v->e) && (e2 = bmesh_disk_edge_next(e1, v)) && (e1 != e2) &&
/* make sure we come full circle and only have 2 connected edges */
diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c
index c128872be07..d8b30fc1a45 100644
--- a/source/blender/bmesh/operators/bmo_dupe.c
+++ b/source/blender/bmesh/operators/bmo_dupe.c
@@ -363,10 +363,12 @@ void bmo_duplicate_exec(BMesh *bm, BMOperator *op)
}
#if 0 /* UNUSED */
-/* executes the duplicate operation, feeding elements of
- * type flag etypeflag and header flag flag to it. note,
- * to get more useful information (such as the mapping from
- * original to new elements) you should run the dupe op manually */
+/**
+ * executes the duplicate operation, feeding elements of
+ * type flag etypeflag and header flag to it.
+ * \note to get more useful information (such as the mapping from
+ * original to new elements) you should run the dupe op manually.
+ */
void BMO_dupe_from_flag(BMesh *bm, int htype, const char hflag)
{
BMOperator dupeop;
diff --git a/source/blender/bmesh/operators/bmo_hull.c b/source/blender/bmesh/operators/bmo_hull.c
index 4876a12a923..38bd4499bdd 100644
--- a/source/blender/bmesh/operators/bmo_hull.c
+++ b/source/blender/bmesh/operators/bmo_hull.c
@@ -603,7 +603,7 @@ void bmo_convex_hull_exec(BMesh *bm, BMOperator *op)
bm, op, op->slots_out, "geom_interior.out", BM_ALL_NOLOOP, HULL_FLAG_INTERIOR_ELE);
/* Output slot of input elements that ended up inside the hull and
- * are are unused by other geometry. */
+ * are unused by other geometry. */
BMO_slot_buffer_from_enabled_flag(
bm, op, op->slots_out, "geom_unused.out", BM_ALL_NOLOOP, HULL_FLAG_DEL);
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index 13cd2b392d0..65cceb8dcfd 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -2163,7 +2163,7 @@ static void calculate_profile(BevelParams *bp, BoundVert *bndv, bool reversed, b
/* Calculate the 3D locations for the profile points */
calculate_profile_segments(
pro, map, use_map, reversed, bp->seg, pro_spacing->xvals, pro_spacing->yvals, pro->prof_co);
- /* Also calculate for the is the seg_2 case if it's needed. */
+ /* Also calculate for the seg_2 case if it's needed. */
if (need_2) {
calculate_profile_segments(pro,
map,
@@ -2258,7 +2258,7 @@ static void check_edge_data_seam_sharp_edges(BevVert *bv, int flag, bool neg)
{
EdgeHalf *e = &bv->edges[0], *efirst = &bv->edges[0];
- /* First first edge with seam or sharp edge data. */
+ /* First edge with seam or sharp edge data. */
while ((!neg && !BEV_EXTEND_EDGE_DATA_CHECK(e, flag)) ||
(neg && BEV_EXTEND_EDGE_DATA_CHECK(e, flag))) {
e = e->next;
diff --git a/source/blender/compositor/intern/COM_CompositorContext.h b/source/blender/compositor/intern/COM_CompositorContext.h
index 56251511576..403ec62e359 100644
--- a/source/blender/compositor/intern/COM_CompositorContext.h
+++ b/source/blender/compositor/intern/COM_CompositorContext.h
@@ -171,7 +171,7 @@ class CompositorContext {
}
/**
- * \brief set view settings of color color management
+ * \brief set view settings of color management
*/
void setViewSettings(const ColorManagedViewSettings *viewSettings)
{
@@ -179,7 +179,7 @@ class CompositorContext {
}
/**
- * \brief get view settings of color color management
+ * \brief get view settings of color management
*/
const ColorManagedViewSettings *getViewSettings() const
{
@@ -187,7 +187,7 @@ class CompositorContext {
}
/**
- * \brief set display settings of color color management
+ * \brief set display settings of color management
*/
void setDisplaySettings(const ColorManagedDisplaySettings *displaySettings)
{
@@ -195,7 +195,7 @@ class CompositorContext {
}
/**
- * \brief get display settings of color color management
+ * \brief get display settings of color management
*/
const ColorManagedDisplaySettings *getDisplaySettings() const
{
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 3ba89a1a91e..db64c7deb63 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -1776,7 +1776,7 @@ static void DRW_render_gpencil_to_image(RenderEngine *engine,
void DRW_render_gpencil(struct RenderEngine *engine, struct Depsgraph *depsgraph)
{
- /* This function should only be called if there are are grease pencil objects,
+ /* This function should only be called if there are grease pencil objects,
* especially important to avoid failing in background renders without OpenGL context. */
BLI_assert(DRW_render_check_grease_pencil(depsgraph));
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index badd7a4e3b6..aeead9350e9 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -251,7 +251,7 @@ static short ob_keyframes_loop(KeyframeEditData *ked,
ANIM_animdata_freelist(&anim_data);
- /* return return code - defaults to zero if nothing happened */
+ /* Return the return code (defaults to zero if nothing happened). */
return ret;
}
@@ -300,7 +300,7 @@ static short scene_keyframes_loop(KeyframeEditData *ked,
ANIM_animdata_freelist(&anim_data);
- /* return return code - defaults to zero if nothing happened */
+ /* Return the return code (defaults to zero if nothing happened). */
return ret;
}
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index 67d6dd94190..48b487c29fd 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -1107,7 +1107,7 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op)
}
}
- /* if there is only 1 selected bone, we assume that that is the active bone,
+ /* if there is only 1 selected bone, we assume that it is the active bone,
* since a user will need to have clicked on a bone (thus selecting it) to make it active
*/
num_selected_bones = CTX_DATA_COUNT(C, selected_editable_bones);
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index 59780bf011e..c447138f00c 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -838,7 +838,7 @@ static int armature_parent_set_exec(bContext *C, wmOperator *op)
}
}
- /* If there is only 1 selected bone, we assume that that is the active bone,
+ /* If there is only 1 selected bone, we assume that it is the active bone,
* since a user will need to have clicked on a bone (thus selecting it) to make it active. */
bool is_active_only_selected = false;
if (actbone->flag & BONE_SELECTED) {
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 47bb153cf46..e11ed927cbf 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -2718,9 +2718,8 @@ static void gpencil_joined_fix_animdata_cb(ID *id, FCurve *fcu, void *user_data)
fcu->rna_path = BKE_animsys_fix_rna_path_rename(
id, fcu->rna_path, "layers", old_name, new_name, 0, 0, false);
- /* we don't want to apply a second remapping on this F-Curve now,
- * so stop trying to fix names names
- */
+ /* We don't want to apply a second remapping on this F-Curve now,
+ * so stop trying to fix names. */
break;
}
}
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 64883ed5f1d..98994feaf38 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -210,7 +210,7 @@ typedef enum {
* \note Perspective views should enable #V3D_PROJ_TEST_CLIP_WIN along with
* #V3D_PROJ_TEST_CLIP_NEAR as the near-plane-clipped location of a point
* may become very large (even infinite) when projected into screen-space.
- * Unless the that point happens to coincide with the camera's point of view.
+ * Unless that point happens to coincide with the camera's point of view.
*
* Use #V3D_PROJ_TEST_CLIP_CONTENT_DEFAULT instead of #V3D_PROJ_TEST_CLIP_CONTENT,
* to avoid accidentally enabling near clipping without clipping by window bounds.
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index f255507ddaf..f4536d95dc5 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -5883,7 +5883,7 @@ static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, co
* wouldn't lead to cancel changes made to this button, but changing state to EXIT also
* makes no button active for a while which leads to triggering operator when doing fast
* scrolling mouse wheel. using post activate stuff from button allows to make button be
- * active again after checking for all all that mouse leave and cancel stuff, so quick
+ * active again after checking for all that mouse leave and cancel stuff, so quick
* scroll wouldn't be an issue anymore. Same goes for scrolling wheel in another
* direction below (sergey).
*/
@@ -7992,8 +7992,7 @@ static void ui_blocks_set_tooltips(ARegion *region, const bool enable)
return;
}
- /* we disabled buttons when when they were already shown, and
- * re-enable them on mouse move */
+ /* We disabled buttons when they were already shown, and re-enable them on mouse move. */
LISTBASE_FOREACH (uiBlock *, block, &region->uiblocks) {
block->tooltipdisabled = !enable;
}
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 122a43513b1..ab338a85e49 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -674,7 +674,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
if (BKE_lib_id_make_local(bmain, id, false, 0)) {
BKE_main_id_newptr_and_tag_clear(bmain);
- /* reassign to get get proper updates/notifiers */
+ /* Reassign to get proper updates/notifiers. */
idptr = RNA_property_pointer_get(&template_ui->ptr, template_ui->prop);
undo_push_label = "Make Local";
}
@@ -688,7 +688,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
case UI_ID_OVERRIDE:
if (id && ID_IS_OVERRIDE_LIBRARY(id)) {
BKE_lib_override_library_free(&id->override_library, true);
- /* reassign to get get proper updates/notifiers */
+ /* Reassign to get proper updates/notifiers. */
idptr = RNA_property_pointer_get(&template_ui->ptr, template_ui->prop);
RNA_property_pointer_set(&template_ui->ptr, template_ui->prop, idptr, NULL);
RNA_property_update(C, &template_ui->ptr, template_ui->prop);
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 8badc05065d..91a4c430023 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -4956,7 +4956,7 @@ void ui_draw_menu_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect)
}
/**
- * Uses the widget base drawing and colors from from the box widget, but ensures an opaque
+ * Uses the widget base drawing and colors from the box widget, but ensures an opaque
* inner color.
*/
void ui_draw_box_opaque(rcti *rect, int roundboxalign)
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 3f2356fa774..91e25b5fc7f 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -2603,8 +2603,8 @@ static void object_data_convert_curve_to_mesh(Main *bmain, Depsgraph *depsgraph,
/* Change objects which are using same curve.
* A bit annoying, but:
* - It's possible to have multiple curve objects selected which are sharing the same curve
- * datablock. We don't want mesh to be created for every of those objects.
- * - This is how conversion worked for a long long time. */
+ * data-block. We don't want mesh to be created for every of those objects.
+ * - This is how conversion worked for a long time. */
LISTBASE_FOREACH (Object *, other_object, &bmain->objects) {
if (other_object->data == curve) {
other_object->type = OB_MESH;
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 88140460f5b..2437e0d1939 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -2602,8 +2602,8 @@ static void project_bucket_clip_face(const bool is_ortho,
return;
}
- /* get the UV space bounding box */
- /* use IsectPT2Df_limit here so we catch points are are touching the tri edge
+ /* Get the UV space bounding box. */
+ /* Use #IsectPT2Df_limit here so we catch points are touching the triangles edge
* (or a small fraction over) */
bucket_bounds_ss[0][0] = bucket_bounds->xmax;
bucket_bounds_ss[0][1] = bucket_bounds->ymin;
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index f5df60454eb..2f4e1c1abbe 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -1681,10 +1681,8 @@ static int mouse_graph_keys(bAnimContext *ac,
/* deselect all other keyframes (+ F-Curves too) */
deselect_graph_keys(ac, 0, SELECT_SUBTRACT, true);
- /* deselect other channels too, but only only do this if
- * selection of channel when the visibility of keyframes
- * doesn't depend on this
- */
+ /* Deselect other channels too, but only do this if selection of channel
+ * when the visibility of keyframes doesn't depend on this. */
if ((sipo->flag & SIPO_SELCUVERTSONLY) == 0) {
ANIM_anim_channels_select_set(ac, ACHANNEL_SETFLAG_CLEAR);
}
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index 50eb96824d7..9e0973f5fde 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -494,7 +494,7 @@ static bool format_stats(
/* Create stats if they don't already exist. */
SceneStats **stats_p = (v3d_local) ? &v3d_local->runtime.local_stats : &view_layer->stats;
if (*stats_p == NULL) {
- /* Do not not access dependency graph if interface is marked as locked. */
+ /* Don't access dependency graph if interface is marked as locked. */
wmWindowManager *wm = bmain->wm.first;
if (wm->is_interface_locked) {
return false;
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index c9f345b3123..6ce13f83cf3 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -1617,7 +1617,7 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes
* This is ignored in the case the object is in any mode (besides object-mode),
* since the object's mode impacts the current tool, cursor, gizmos etc.
* If we didn't have this exception, changing visibility would need to perform
- * many of the the same updates as changing the objects mode.
+ * many of the same updates as changing the objects mode.
*
* Further, there are multiple ways to hide objects - by collection, by object type, etc.
* it's simplest if all these methods behave consistently - respecting the object-mode
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index 91f3388cac9..c0a95f24f08 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -189,7 +189,7 @@ typedef struct FlyInfo {
wmNDOFMotionData *ndof;
#endif
- /* fly state state */
+ /* Fly state. */
/** The speed the view is moving per redraw. */
float speed;
/** Axis index to move along by default Z to move along the view. */
@@ -758,7 +758,7 @@ static int flyApply(bContext *C, FlyInfo *fly, bool is_confirm)
#define FLY_SMOOTH_FAC 20.0f /* higher value less lag */
/* fly mode - Shift+F
- * a fly loop where the user can move move the view as if they are flying
+ * a fly loop where the user can move the view as if they are flying
*/
RegionView3D *rv3d = fly->rv3d;
diff --git a/source/blender/editors/space_view3d/view3d_iterators.c b/source/blender/editors/space_view3d/view3d_iterators.c
index 2a381bb96cb..c7a4030c402 100644
--- a/source/blender/editors/space_view3d/view3d_iterators.c
+++ b/source/blender/editors/space_view3d/view3d_iterators.c
@@ -242,7 +242,7 @@ typedef struct foreachScreenEdge_userData {
rctf win_rect; /* copy of: vc.region->winx/winy, use for faster tests, minx/y will always be 0 */
/**
- * Clip plans defined by the the view bounds,
+ * Clip plans defined by the view bounds,
* use when #V3D_PROJ_TEST_CLIP_CONTENT is enabled.
*/
float content_planes[6][4];
diff --git a/source/blender/editors/space_view3d/view3d_placement.c b/source/blender/editors/space_view3d/view3d_placement.c
index 2186cdb3162..1ea7993572d 100644
--- a/source/blender/editors/space_view3d/view3d_placement.c
+++ b/source/blender/editors/space_view3d/view3d_placement.c
@@ -1957,7 +1957,7 @@ struct PlacementCursor {
/**
* Enable this while the modal operator is running,
- * so the preview-plane doesn't show at the same time time as add-object preview shape
+ * so the preview-plane doesn't show at the same time as add-object preview shape
* since it's distracting & not helpful.
*/
bool do_draw;
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index fd99619f9e2..84515d4a39b 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -234,7 +234,7 @@ typedef struct WalkInfo {
wmNDOFMotionData *ndof;
#endif
- /* walk state state */
+ /* Walk state. */
/** The base speed without run/slow down modifications. */
float base_speed;
/** The speed the view is moving per redraw. */
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c
index 512f912a532..4212045a33d 100644
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@ -1142,7 +1142,7 @@ static void raycast_obj_fn(SnapObjectContext *sctx,
* \param r_loc: Hit location.
* \param r_no: Hit normal (optional).
* \param r_index: Hit index or -1 when no valid index is found.
- * (currently only set to the polygon index when when using ``snap_to == SCE_SNAP_MODE_FACE``).
+ * (currently only set to the polygon index when using ``snap_to == SCE_SNAP_MODE_FACE``).
* \param r_ob: Hit object.
* \param r_obmat: Object matrix (may not be #Object.obmat with dupli-instances).
* \param r_hit_list: List of #SnapObjectHitDepth (caller must free).
@@ -2777,7 +2777,7 @@ static void snap_obj_fn(SnapObjectContext *sctx,
* \param r_loc: Hit location.
* \param r_no: Hit normal (optional).
* \param r_index: Hit index or -1 when no valid index is found.
- * (currently only set to the polygon index when when using ``snap_to == SCE_SNAP_MODE_FACE``).
+ * (currently only set to the polygon index when using ``snap_to == SCE_SNAP_MODE_FACE``).
* \param r_ob: Hit object.
* \param r_obmat: Object matrix (may not be #Object.obmat with dupli-instances).
*/
diff --git a/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp b/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
index 7a516470e6b..84f517e7535 100644
--- a/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
+++ b/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.cpp
@@ -112,7 +112,7 @@ int GetDirectionalViewMapDensityF1D::operator()(Interface1D &inter)
int GetCompleteViewMapDensityF1D::operator()(Interface1D &inter)
{
// soc unsigned size;
- /* Id id = inter.getId(); */ /* UNUSED */
+ // Id id = inter.getId(); /* UNUSED */
result = integrate(_fun, inter.pointsBegin(_sampling), inter.pointsEnd(_sampling), _integration);
return 0;
}
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h
index 2a2c8754454..adc08f60ddf 100644
--- a/source/blender/freestyle/intern/winged_edge/WEdge.h
+++ b/source/blender/freestyle/intern/winged_edge/WEdge.h
@@ -868,13 +868,13 @@ class WFace {
return _VerticesTexCoords;
}
- /** Returns the normal of the vertex of index index */
+ /** Returns the normal of the vertex of `index`. */
inline Vec3f &GetVertexNormal(int index)
{
return _VerticesNormals[index];
}
- /** Returns the tex coords of the vertex of index index */
+ /** Returns the tex coords of the vertex of `index`. */
inline Vec2f &GetVertexTexCoords(int index)
{
return _VerticesTexCoords[index];
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index e156933ddc2..d1bb18e3fed 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -2321,7 +2321,7 @@ static bool lineart_triangle_edge_image_space_occlusion(SpinLock *UNUSED(spl),
return false;
}
- /* If the the line is one of the edge in the triangle, then it's not occluded. */
+ /* If the line is one of the edge in the triangle, then it's not occluded. */
if (lineart_edge_from_triangle(tri, e, allow_overlapping_edges)) {
return false;
}
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index 450c76630a8..47514308ae4 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -1187,7 +1187,7 @@ static int ffmpeg_generic_seek_workaround(struct anim *anim,
/* If this packet contains an I-frame, this could be the frame that we need. */
bool is_key_frame = read_packet->flags & AV_PKT_FLAG_KEY;
- /* We need to check the packet timestamp as the key frame could be for a GOP forward in the the
+ /* We need to check the packet timestamp as the key frame could be for a GOP forward in the
* video stream. So if it has a larger timestamp than the frame we want, ignore it.
*/
cur_pts = timestamp_from_pts_or_dts(read_packet->pts, read_packet->dts);
diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h
index 57bfe281c8e..fda1cbaeae6 100644
--- a/source/blender/makesdna/DNA_genfile.h
+++ b/source/blender/makesdna/DNA_genfile.h
@@ -44,7 +44,7 @@ extern const int DNAlen;
/**
* Primitive (non-struct, non-pointer/function/array) types,
* \warning Don't change these values!
- * Currently changes here here will work on native endianness,
+ * Currently changes here will work on native endianness,
* however #DNA_struct_switch_endian currently checks these
* hard-coded values against those from old files.
*/
diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c
index 39e7774e5a4..c84ef1a6587 100644
--- a/source/blender/makesrna/intern/rna_access_compare_override.c
+++ b/source/blender/makesrna/intern/rna_access_compare_override.c
@@ -748,7 +748,7 @@ bool RNA_struct_override_matches(Main *bmain,
const char *prop_name = prop_local.identifier;
const size_t prop_name_len = strlen(prop_name);
- /* Inlined building, much much more efficient. */
+ /* Inlined building (significantly more efficient). */
if (!prop_local.is_idprop) {
rna_path_len = root_path_len + 1 + prop_name_len;
if (rna_path_len >= RNA_PATH_BUFFSIZE) {
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index fb9f5e0292e..2aa09a30c75 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -89,7 +89,7 @@ static void rna_Action_groups_remove(bAction *act, ReportList *reports, PointerR
return;
}
- /* move every one one of the group's F-Curves out into the Action again */
+ /* Move every one of the group's F-Curves out into the Action again. */
for (fcu = agrp->channels.first; (fcu) && (fcu->grp == agrp); fcu = fcn) {
fcn = fcu->next;
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index dab76c84e6a..decdc728bbe 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -1986,7 +1986,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
"e.g. 5*10^-6)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset");
- /* mesh options options */
+ /* Mesh options. */
prop = RNA_def_property(srna, "mesh_concave_upper", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index 245730919b0..0bb452dfb07 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -320,7 +320,7 @@ struct PropertyRNA {
PropArrayLengthGetFunc getlength;
/* dimension of array */
unsigned int arraydimension;
- /* array lengths lengths for all dimensions (when arraydimension > 0) */
+ /* Array lengths for all dimensions (when `arraydimension > 0`). */
unsigned int arraylength[RNA_MAX_ARRAY_DIMENSION];
unsigned int totarraylength;
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 674e5845ccb..9a895a0c75a 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -544,7 +544,7 @@ const EnumPropertyItem rna_enum_dt_mix_mode_items[] = {
0,
"Multiply",
"Multiply source value to destination one, using given threshold as factor"},
- /* etc. etc. */
+ /* Etc. */
{0, NULL, 0, NULL, NULL},
};
diff --git a/source/blender/nodes/NOD_derived_node_tree.hh b/source/blender/nodes/NOD_derived_node_tree.hh
index de9e4c8c812..60d84463a82 100644
--- a/source/blender/nodes/NOD_derived_node_tree.hh
+++ b/source/blender/nodes/NOD_derived_node_tree.hh
@@ -104,7 +104,7 @@ class DNode {
* nested node group hierarchy. This type is small and can be passed around by value.
*
* A #DSocket can represent an input or an output socket. If the type of a socket is known at
- * compile time is is preferable to use #DInputSocket or #DOutputSocket instead. */
+ * compile time is preferable to use #DInputSocket or #DOutputSocket instead. */
class DSocket {
protected:
const DTreeContext *context_ = nullptr;
diff --git a/source/blender/nodes/NOD_geometry_exec.hh b/source/blender/nodes/NOD_geometry_exec.hh
index 7b176b2f395..23474201daa 100644
--- a/source/blender/nodes/NOD_geometry_exec.hh
+++ b/source/blender/nodes/NOD_geometry_exec.hh
@@ -294,7 +294,7 @@ class GeoNodeExecParams {
void check_input_access(StringRef identifier, const CPPType *requested_type = nullptr) const;
void check_output_access(StringRef identifier, const CPPType &value_type) const;
- /* Find the active socket socket with the input name (not the identifier). */
+ /* Find the active socket with the input name (not the identifier). */
const bNodeSocket *find_available_socket(const StringRef name) const;
};
diff --git a/source/blender/python/bmesh/bmesh_py_ops_call.c b/source/blender/python/bmesh/bmesh_py_ops_call.c
index 28daf08507d..d198c6ca559 100644
--- a/source/blender/python/bmesh/bmesh_py_ops_call.c
+++ b/source/blender/python/bmesh/bmesh_py_ops_call.c
@@ -252,7 +252,7 @@ static int bpy_slot_from_py(BMesh *bm,
const ushort size = pymat->num_col;
if ((size != pymat->num_row) || (!ELEM(size, 3, 4))) {
PyErr_Format(PyExc_TypeError,
- "%.200s: keyword \"%.200s\" expected a 3x3 or 4x4 matrix Matrix",
+ "%.200s: keyword \"%.200s\" expected a 3x3 or 4x4 matrix",
opname,
slot_name);
return -1;
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index 2001392f474..9334e9893b0 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -3354,7 +3354,7 @@ static void bpy_bmesh_dealloc(BPy_BMesh *self)
{
BMesh *bm = self->bm;
- /* have have been freed by bmesh */
+ /* The mesh has not been freed by #BMesh. */
if (bm) {
bm_dealloc_editmode_warn(self);
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c
index 22bea8f0273..e416727fa70 100644
--- a/source/blender/python/generic/bgl.c
+++ b/source/blender/python/generic/bgl.c
@@ -683,7 +683,7 @@ Buffer *BGL_MakeBuffer(int type, int ndimensions, int *dimensions, void *initbuf
size *= dimensions[i];
}
- buf = MEM_mallocN(size, "Buffer buffer");
+ buf = MEM_mallocN(size, __func__);
buffer = BGL_MakeBuffer_FromData(NULL, type, ndimensions, dimensions, buf);
@@ -790,7 +790,7 @@ static PyObject *Buffer_new(PyTypeObject *UNUSED(type), PyObject *args, PyObject
}
else {
PyErr_Format(PyExc_TypeError,
- "invalid second argument argument expected a sequence "
+ "invalid second argument expected a sequence "
"or an int, not a %.200s",
Py_TYPE(length_ob)->tp_name);
return NULL;
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index df6a55fdb9f..c6afb694413 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -1051,7 +1051,7 @@ static PyObject *BPy_IDGroup_IterItems_CreatePyObject(BPy_IDProperty *group, con
/** \name ID-Property Group View Types (Keys/Values/Items)
*
* This view types is a thin wrapper on keys/values/items, this matches Python's `dict_view` type.
- * The is returned by `property.keys()` and is separate from the iterator that loops over keys.
+ * This is returned by `property.keys()` and is separate from the iterator that loops over keys.
*
* There are some less common features this type could support (matching Python's `dict_view`)
*
diff --git a/source/blender/python/generic/imbuf_py_api.c b/source/blender/python/generic/imbuf_py_api.c
index 793b980295c..57e148b56c8 100644
--- a/source/blender/python/generic/imbuf_py_api.c
+++ b/source/blender/python/generic/imbuf_py_api.c
@@ -178,7 +178,7 @@ static PyObject *py_imbuf_copy(Py_ImBuf *self)
if (UNLIKELY(ibuf_copy == NULL)) {
PyErr_SetString(PyExc_MemoryError,
"ImBuf.copy(): "
- "failed to allocate memory memory");
+ "failed to allocate memory");
return NULL;
}
return Py_ImBuf_CreatePyObject(ibuf_copy);
diff --git a/source/blender/render/intern/engine.c b/source/blender/render/intern/engine.c
index 306d144f79d..7316afc448e 100644
--- a/source/blender/render/intern/engine.c
+++ b/source/blender/render/intern/engine.c
@@ -812,7 +812,7 @@ bool RE_bake_engine(Render *re,
engine->flag &= ~RE_ENGINE_RENDERING;
/* Free depsgraph outside of parts mutex lock, since this locks OpenGL context
- * while the the UI drawing might also lock the OpenGL context and parts mutex. */
+ * while the UI drawing might also lock the OpenGL context and parts mutex. */
engine_depsgraph_free(engine);
BLI_rw_mutex_lock(&re->partsmutex, THREAD_LOCK_WRITE);
@@ -1037,7 +1037,7 @@ bool RE_engine_render(Render *re, bool do_all)
/* re->engine becomes zero if user changed active render engine during render */
if (!engine_keep_depsgraph(engine) || !re->engine) {
/* Free depsgraph outside of parts mutex lock, since this locks OpenGL context
- * while the the UI drawing might also lock the OpenGL context and parts mutex. */
+ * while the UI drawing might also lock the OpenGL context and parts mutex. */
BLI_rw_mutex_unlock(&re->partsmutex);
engine_depsgraph_free(engine);
BLI_rw_mutex_lock(&re->partsmutex, THREAD_LOCK_WRITE);
diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c
index 16adc392b3b..7360d525ce3 100644
--- a/source/blender/sequencer/intern/render.c
+++ b/source/blender/sequencer/intern/render.c
@@ -298,7 +298,7 @@ static bool must_render_strip(const Sequence *seq, SeqCollection *strips_at_time
return true;
}
- /* If strip has effects in stack, and all effects are above this strip, it it not rendered. */
+ /* If strip has effects in stack, and all effects are above this strip, it is not rendered. */
if (seq_have_effect_in_stack) {
return false;
}
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index a0fd53685bc..b82b3c1ff5d 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -96,7 +96,7 @@
*
* Without tools using press events which would prevent click/drag events getting to the gizmos.
*
- * This is not a fool proof solution since since it's possible the gizmo operators would pass
+ * This is not a fool proof solution since it's possible the gizmo operators would pass
* through these events when called, see: T65479.
*/
#define USE_GIZMO_MOUSE_PRIORITY_HACK
@@ -2084,7 +2084,7 @@ static int wm_handler_operator_call(bContext *C,
wm->op_undo_depth--;
}
- /* When the window changes the the modal modifier may have loaded a new blend file
+ /* When the window changes the modal modifier may have loaded a new blend file
* (the `system_demo_mode` add-on does this), so we have to assume the event,
* operator, area, region etc have all been freed. */
if ((CTX_wm_window(C) == win)) {
@@ -4753,8 +4753,8 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, void
event.val = KM_DBL_CLICK;
}
- /* This case happens on holding a key pressed, it should not generate
- * press events events with the same key as modifier. */
+ /* This case happens on holding a key pressed,
+ * it should not generate press events with the same key as modifier. */
if (event.keymodifier == event.type) {
event.keymodifier = 0;
}
diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c
index a620accab72..a7cdc0602bc 100644
--- a/source/blender/windowmanager/intern/wm_stereo.c
+++ b/source/blender/windowmanager/intern/wm_stereo.c
@@ -353,7 +353,7 @@ int wm_stereo3d_set_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
- /* without this, the popup won't be freed freed properly T44688 */
+ /* Without this, the popup won't be freed properly, see T44688. */
CTX_wm_window_set(C, win_src);
win_src->stereo3d_format->display_mode = prev_display_mode;
return OPERATOR_CANCELLED;