From d2d754be3f24d4b6b2e2ac6812e3aae8299e0280 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 4 Jan 2025 16:26:39 +1100 Subject: [PATCH] Cleanup: spelling in comments (make check_spelling*) - Back-tick quote math expressions so differentiate them from English. - Use doxygen code blocks for TEX expressions. --- intern/cycles/blender/object.cpp | 2 +- intern/cycles/kernel/svm/gabor.h | 22 ++++++++---- intern/cycles/util/math_base.h | 36 +++++++++---------- intern/ghost/test/CMakeLists.txt | 2 +- .../blenkernel/BKE_anim_visualization.h | 3 +- source/blender/blenkernel/BKE_bvhutils.hh | 6 ++-- source/blender/blenkernel/BKE_cloth.hh | 4 +-- source/blender/blenkernel/BKE_global.hh | 2 +- source/blender/blenkernel/BKE_undo_system.hh | 2 +- .../blenkernel/intern/anim_visualization.cc | 2 +- .../blenkernel/intern/armature_deform.cc | 4 +-- .../blender/blenkernel/intern/constraint.cc | 4 +-- .../blenkernel/intern/grease_pencil.cc | 4 +-- source/blender/blenkernel/intern/ipo.cc | 2 +- source/blender/blenkernel/intern/lib_id.cc | 2 +- .../intern/mesh_legacy_derived_mesh.cc | 2 +- .../blenkernel/intern/vfontdata_freetype.cc | 2 +- source/blender/blenloader/intern/readfile.cc | 2 +- source/blender/bmesh/bmesh_class.hh | 2 +- .../blender/bmesh/intern/bmesh_opdefines.cc | 2 +- .../intern/builder/deg_builder_nodes.cc | 4 +-- .../builder/deg_builder_relations_drivers.cc | 2 +- source/blender/draw/intern/draw_cache_impl.hh | 2 +- .../blender/editors/animation/anim_markers.cc | 2 +- .../editors/animation/anim_motion_paths.cc | 2 +- .../blender/editors/armature/armature_add.cc | 4 +-- .../editors/armature/armature_relations.cc | 2 +- source/blender/editors/armature/pose_slide.cc | 2 +- source/blender/editors/include/BIF_glutil.hh | 3 +- source/blender/editors/include/ED_mball.hh | 2 +- source/blender/editors/include/ED_object.hh | 4 +-- .../blender/editors/include/UI_interface_c.hh | 4 +-- .../editors/object/object_data_transform.cc | 4 +-- .../editors/space_buttons/buttons_ops.cc | 4 +-- source/blender/editors/space_info/textview.hh | 2 +- source/blender/editors/space_text/text_ops.cc | 2 +- .../editors/space_view3d/view3d_snap.cc | 2 +- .../editors/space_view3d/view3d_view.cc | 3 +- .../transform/transform_convert_mesh_skin.cc | 2 +- .../editors/transform/transform_snap.cc | 2 +- .../blender_interface/BlenderFileLoader.cpp | 2 +- .../geometry/intern/realize_instances.cc | 2 +- source/blender/gpu/metal/mtl_framebuffer.hh | 10 +++--- source/blender/gpu/metal/mtl_framebuffer.mm | 2 +- source/blender/gpu/opengl/gl_context.hh | 2 +- .../io/alembic/exporter/abc_writer_mball.cc | 4 +-- .../io/usd/intern/usd_blend_shape_utils.hh | 2 +- .../blender/io/usd/intern/usd_capi_export.cc | 2 +- .../io/usd/intern/usd_skel_root_utils.hh | 2 +- .../io/usd/intern/usd_writer_metaball.cc | 2 +- .../makesdna/DNA_object_fluidsim_types.h | 6 ++-- source/blender/python/intern/bpy_rna_array.cc | 2 +- source/blender/windowmanager/intern/wm.cc | 2 +- .../windowmanager/intern/wm_dragdrop.cc | 2 +- .../blender/windowmanager/intern/wm_window.cc | 4 +-- tools/check_source/clang_array_check.py | 2 +- tools/check_source/project_source_info.py | 9 ++--- tools/utils_ide/project_info.py | 18 ++++------ 58 files changed, 124 insertions(+), 112 deletions(-) diff --git a/intern/cycles/blender/object.cpp b/intern/cycles/blender/object.cpp index bdf3d0fe324..863b5df09fc 100644 --- a/intern/cycles/blender/object.cpp +++ b/intern/cycles/blender/object.cpp @@ -33,7 +33,7 @@ bool BlenderSync::BKE_object_is_modified(BL::Object &b_ob) { /* test if we can instance or if the object is modified */ if (b_ob.type() == BL::Object::type_META) { - /* multi-user and dupli metaballs are fused, can't instance */ + /* Multi-user and dupli meta-balls are fused, can't instance. */ return true; } if (ccl::BKE_object_is_modified(b_ob, b_scene, preview)) { diff --git a/intern/cycles/kernel/svm/gabor.h b/intern/cycles/kernel/svm/gabor.h index e61614d27a1..c0f30568e9e 100644 --- a/intern/cycles/kernel/svm/gabor.h +++ b/intern/cycles/kernel/svm/gabor.h @@ -72,20 +72,27 @@ ccl_device float2 compute_2d_gabor_kernel(const float2 position, return polar_to_cartesian(windowed_gaussian_envelope, angle); } -/* Computes the approximate standard deviation of the zero mean normal distribution representing +/** + * Computes the approximate standard deviation of the zero mean normal distribution representing * the amplitude distribution of the noise based on Equation (9) in the original Gabor noise paper. * For simplicity, the Hann window is ignored and the orientation is fixed since the variance is * orientation invariant. We start integrating the squared Gabor kernel with respect to x: * - * \int_{-\infty}^{-\infty} (e^{- \pi (x^2 + y^2)} cos(2 \pi f_0 x))^2 dx + * \code{.tex} + * \int_{-\infty}^{-\infty} (e^{- \pi (x^2 + y^2)} cos(2 \pi f_0 x))^2 dx + * \endcode * * Which gives: * - * \frac{(e^{2 \pi f_0^2}-1) e^{-2 \pi y^2 - 2 pi f_0^2}}{2^\frac{3}{2}} + * \code{.tex} + * \frac{(e^{2 \pi f_0^2}-1) e^{-2 \pi y^2 - 2 pi f_0^2}}{2^\frac{3}{2}} + * \endcode * * Then we similarly integrate with respect to y to get: * - * \frac{1 - e^{-2 \pi f_0^2}}{4} + * \code{.tex} + * \frac{1 - e^{-2 \pi f_0^2}}{4} + * \endcode * * Secondly, we note that the second moment of the weights distribution is 0.5 since it is a * fair Bernoulli distribution. So the final standard deviation expression is square root the @@ -95,9 +102,12 @@ ccl_device float2 compute_2d_gabor_kernel(const float2 position, * converges to an upper limit as the frequency approaches infinity, so we replace the expression * with the following limit: * - * \lim_{x \to \infty} \frac{1 - e^{-2 \pi f_0^2}}{4} + * \code{.tex} + * \lim_{x \to \infty} \frac{1 - e^{-2 \pi f_0^2}}{4} + * \endcode * - * To get an approximation of 0.25. */ + * To get an approximation of 0.25. + */ ccl_device float compute_2d_gabor_standard_deviation() { const float integral_of_gabor_squared = 0.25f; diff --git a/intern/cycles/util/math_base.h b/intern/cycles/util/math_base.h index 02d4e56d1e9..45b3d95ffcf 100644 --- a/intern/cycles/util/math_base.h +++ b/intern/cycles/util/math_base.h @@ -27,62 +27,62 @@ CCL_NAMESPACE_BEGIN /* Division */ #ifndef M_PI_F -# define M_PI_F (3.1415926535897932f) /* pi */ +# define M_PI_F (3.1415926535897932f) /* `pi` */ #endif #ifndef M_PI_2_F -# define M_PI_2_F (1.5707963267948966f) /* pi/2 */ +# define M_PI_2_F (1.5707963267948966f) /* `pi/2` */ #endif #ifndef M_PI_4_F -# define M_PI_4_F (0.7853981633974830f) /* pi/4 */ +# define M_PI_4_F (0.7853981633974830f) /* `pi/4` */ #endif #ifndef M_1_PI_F -# define M_1_PI_F (0.3183098861837067f) /* 1/pi */ +# define M_1_PI_F (0.3183098861837067f) /* `1/pi` */ #endif #ifndef M_2_PI_F -# define M_2_PI_F (0.6366197723675813f) /* 2/pi */ +# define M_2_PI_F (0.6366197723675813f) /* `2/pi` */ #endif #ifndef M_1_2PI_F -# define M_1_2PI_F (0.1591549430918953f) /* 1/(2*pi) */ +# define M_1_2PI_F (0.1591549430918953f) /* `1/(2*pi)` */ #endif #ifndef M_1_4PI_F -# define M_1_4PI_F (0.0795774715459476f) /* 1/(4*pi) */ +# define M_1_4PI_F (0.0795774715459476f) /* `1/(4*pi)` */ #endif #ifndef M_SQRT_PI_8_F -# define M_SQRT_PI_8_F (0.6266570686577501f) /* sqrt(pi/8) */ +# define M_SQRT_PI_8_F (0.6266570686577501f) /* `sqrt(pi/8)` */ #endif #ifndef M_LN_2PI_F -# define M_LN_2PI_F (1.8378770664093454f) /* ln(2*pi) */ +# define M_LN_2PI_F (1.8378770664093454f) /* `ln(2*pi)` */ #endif /* Multiplication */ #ifndef M_2PI_F -# define M_2PI_F (6.2831853071795864f) /* 2*pi */ +# define M_2PI_F (6.2831853071795864f) /* `2*pi` */ #endif #ifndef M_4PI_F -# define M_4PI_F (12.566370614359172f) /* 4*pi */ +# define M_4PI_F (12.566370614359172f) /* `4*pi` */ #endif #ifndef M_PI_4F -# define M_PI_4F 0.78539816339744830962f /* pi/4 */ +# define M_PI_4F 0.78539816339744830962f /* `pi/4` */ #endif /* Float sqrt variations */ #ifndef M_SQRT2_F -# define M_SQRT2_F (1.4142135623730950f) /* sqrt(2) */ +# define M_SQRT2_F (1.4142135623730950f) /* `sqrt(2)` */ #endif #ifndef M_CBRT2_F -# define M_CBRT2_F 1.2599210498948732f /* cbrt(2) */ +# define M_CBRT2_F 1.2599210498948732f /* `cbrt(2)` */ #endif #ifndef M_SQRT1_2F -# define M_SQRT1_2F 0.70710678118654752440f /* sqrt(1/2) */ +# define M_SQRT1_2F 0.70710678118654752440f /* `sqrt(1/2)` */ #endif #ifndef M_SQRT3_F -# define M_SQRT3_F (1.7320508075688772f) /* sqrt(3) */ +# define M_SQRT3_F (1.7320508075688772f) /* `sqrt(3)` */ #endif #ifndef M_LN2_F -# define M_LN2_F (0.6931471805599453f) /* ln(2) */ +# define M_LN2_F (0.6931471805599453f) /* `ln(2)` */ #endif #ifndef M_LN10_F -# define M_LN10_F (2.3025850929940457f) /* ln(10) */ +# define M_LN10_F (2.3025850929940457f) /* `ln(10)` */ #endif /* Scalar */ diff --git a/intern/ghost/test/CMakeLists.txt b/intern/ghost/test/CMakeLists.txt index 5ffc02d45ca..60fab059b00 100644 --- a/intern/ghost/test/CMakeLists.txt +++ b/intern/ghost/test/CMakeLists.txt @@ -12,7 +12,7 @@ cmake_policy(SET CMP0005 NEW) # So syntax problems are errors cmake_policy(SET CMP0010 NEW) -# Input directories must have CMakeLists.txt +# Input directories must have `CMakeLists.txt`. cmake_policy(SET CMP0014 NEW) cmake_minimum_required(VERSION 3.5) diff --git a/source/blender/blenkernel/BKE_anim_visualization.h b/source/blender/blenkernel/BKE_anim_visualization.h index 89d5adfc78b..4625d365320 100644 --- a/source/blender/blenkernel/BKE_anim_visualization.h +++ b/source/blender/blenkernel/BKE_anim_visualization.h @@ -49,7 +49,8 @@ void animviz_free_motionpath(struct bMotionPath *mpath); * * \param scene: Current scene (for frame ranges, etc.) * \param ob: Object to add paths for (must be provided) - * \param pchan: Posechannel to add paths for (optional; if not provided, object-paths are assumed) + * \param pchan: Pose-channel to add paths for + * (optional; if not provided, object-paths are assumed). */ struct bMotionPath *animviz_verify_motionpaths(struct ReportList *reports, struct Scene *scene, diff --git a/source/blender/blenkernel/BKE_bvhutils.hh b/source/blender/blenkernel/BKE_bvhutils.hh index 95cf8eed6e3..75fd07fe33d 100644 --- a/source/blender/blenkernel/BKE_bvhutils.hh +++ b/source/blender/blenkernel/BKE_bvhutils.hh @@ -66,17 +66,17 @@ BVHTreeFromMesh bvhtree_from_mesh_corner_tris_ex(Span vert_positions, const IndexMask &faces_mask); /** - * Build a bvh tree from the triangles in the mesh that correspond to the faces in the given mask. + * Build a BVH-tree from the triangles in the mesh that correspond to the faces in the given mask. */ BVHTreeFromMesh bvhtree_from_mesh_tris_init(const Mesh &mesh, const IndexMask &faces_mask); /** - * Build a bvh tree containing the given edges. + * Build a BVH-tree containing the given edges. */ BVHTreeFromMesh bvhtree_from_mesh_edges_init(const Mesh &mesh, const IndexMask &edges_mask); /** - * Build a bvh tree containing the given vertices. + * Build a BVH-tree containing the given vertices. */ BVHTreeFromMesh bvhtree_from_mesh_verts_init(const Mesh &mesh, const IndexMask &verts_mask); diff --git a/source/blender/blenkernel/BKE_cloth.hh b/source/blender/blenkernel/BKE_cloth.hh index b725ea8952d..83d13051cf2 100644 --- a/source/blender/blenkernel/BKE_cloth.hh +++ b/source/blender/blenkernel/BKE_cloth.hh @@ -75,10 +75,10 @@ struct Cloth { unsigned char pad2; short pad3; BVHTree *bvhtree; /* collision tree for this cloth object */ - BVHTree *bvhselftree; /* collision tree for this cloth object (may be same as bvhtree) */ + BVHTree *bvhselftree; /* Collision tree for this cloth object (may be same as BVH-tree). */ blender::int3 *vert_tris; Implicit_Data *implicit; /* our implicit solver connects to this pointer */ - blender::Set edgeset; /* used for selfcollisions */ + blender::Set edgeset; /* Used for self-collisions. */ int last_frame; float initial_mesh_volume; /* Initial volume of the mesh. Used for pressure */ float average_acceleration[3]; /* Moving average of overall acceleration. */ diff --git a/source/blender/blenkernel/BKE_global.hh b/source/blender/blenkernel/BKE_global.hh index 85ae76baf12..f33ad9dd117 100644 --- a/source/blender/blenkernel/BKE_global.hh +++ b/source/blender/blenkernel/BKE_global.hh @@ -263,7 +263,7 @@ enum { G_DEBUG_SIMDATA = (1 << 15), /* sim debug data display */ G_DEBUG_GPU = (1 << 16), /* gpu debug */ G_DEBUG_IO = (1 << 17), /* IO Debugging (for Collada, ...). */ - G_DEBUG_GPU_FORCE_WORKAROUNDS = (1 << 18), /* force gpu workarounds bypassing detections. */ + G_DEBUG_GPU_FORCE_WORKAROUNDS = (1 << 18), /* Force GPU workarounds bypassing detection. */ G_DEBUG_GPU_COMPILE_SHADERS = (1 << 19), /* Compile all statically defined shaders. . */ G_DEBUG_GPU_RENDERDOC = (1 << 20), /* Enable RenderDoc integration. */ G_DEBUG_XR = (1 << 21), /* XR/OpenXR messages */ diff --git a/source/blender/blenkernel/BKE_undo_system.hh b/source/blender/blenkernel/BKE_undo_system.hh index bf4cf23f06f..bb6b4afc030 100644 --- a/source/blender/blenkernel/BKE_undo_system.hh +++ b/source/blender/blenkernel/BKE_undo_system.hh @@ -146,7 +146,7 @@ struct UndoType { size_t step_size; }; -/** #UndoType.flag bitflags. */ +/** #UndoType.flag bit-flags. */ enum eUndoTypeFlags { /** * This undo type `encode` callback needs a valid context, it will fail otherwise. diff --git a/source/blender/blenkernel/intern/anim_visualization.cc b/source/blender/blenkernel/intern/anim_visualization.cc index fb3716e8c33..79e66dc4199 100644 --- a/source/blender/blenkernel/intern/anim_visualization.cc +++ b/source/blender/blenkernel/intern/anim_visualization.cc @@ -117,7 +117,7 @@ bMotionPath *animviz_verify_motionpaths(ReportList *reports, /* get destination data */ if (pchan) { - /* paths for posechannel - assume that posechannel belongs to the object */ + /* Paths for pose-channel - assume that pose-channel belongs to the object. */ avs = &ob->pose->avs; dst = &pchan->mpath; } diff --git a/source/blender/blenkernel/intern/armature_deform.cc b/source/blender/blenkernel/intern/armature_deform.cc index 0465a01fa84..eb548d5f3de 100644 --- a/source/blender/blenkernel/intern/armature_deform.cc +++ b/source/blender/blenkernel/intern/armature_deform.cc @@ -497,7 +497,7 @@ static void armature_deform_coords_impl(const Object *ob_arm, const bool use_envelope = (deformflag & ARM_DEF_ENVELOPE) != 0; const bool use_quaternion = (deformflag & ARM_DEF_QUATERNION) != 0; const bool invert_vgroup = (deformflag & ARM_DEF_INVERT_VGROUP) != 0; - int defbase_len = 0; /* safety for vertexgroup index overflow */ + int defbase_len = 0; /* Safety for vertex-group index overflow. */ bool use_dverts = false; int armature_def_nr = -1; int cd_dvert_offset = -1; @@ -519,7 +519,7 @@ static void armature_deform_coords_impl(const Object *ob_arm, armature_def_nr = BKE_defgroup_name_index(defbase, defgrp_name); defbase_len = BLI_listbase_count(defbase); - /* get a vertex-deform-index to posechannel array */ + /* Get a vertex-deform-index to pose-channel array. */ if (deformflag & ARM_DEF_VGROUP) { /* if we have a Mesh, only use dverts if it has them */ if (em_target) { diff --git a/source/blender/blenkernel/intern/constraint.cc b/source/blender/blenkernel/intern/constraint.cc index 7077bba3efe..956a5a1afdd 100644 --- a/source/blender/blenkernel/intern/constraint.cc +++ b/source/blender/blenkernel/intern/constraint.cc @@ -5985,8 +5985,8 @@ static bConstraint *add_new_constraint(Object *ob, /* TODO: does action constraint need anything here - i.e. spaceonce? */ switch (type) { case CONSTRAINT_TYPE_CHILDOF: { - /* if this constraint is being added to a posechannel, make sure - * the constraint gets evaluated in pose-space */ + /* If this constraint is being added to a pose-channel, make sure + * the constraint gets evaluated in pose-space. */ if (pchan) { con->ownspace = CONSTRAINT_SPACE_POSE; } diff --git a/source/blender/blenkernel/intern/grease_pencil.cc b/source/blender/blenkernel/intern/grease_pencil.cc index e91746d5157..0210e4dba95 100644 --- a/source/blender/blenkernel/intern/grease_pencil.cc +++ b/source/blender/blenkernel/intern/grease_pencil.cc @@ -1418,8 +1418,8 @@ void Layer::prepare_for_dna_write() void Layer::update_from_dna_read() { /* Re-create frames data in runtime map. */ - /* NOTE: Avoid re-allocating runtime data to reduce 'false positive' change detections from - * memfile undo. */ + /* NOTE: Avoid re-allocating runtime data to reduce 'false positive' change detection from + * MEMFILE undo. */ if (runtime) { runtime->clear(); } diff --git a/source/blender/blenkernel/intern/ipo.cc b/source/blender/blenkernel/intern/ipo.cc index 2f47c7ee26a..e267cf660c0 100644 --- a/source/blender/blenkernel/intern/ipo.cc +++ b/source/blender/blenkernel/intern/ipo.cc @@ -1268,7 +1268,7 @@ static ChannelDriver *idriver_to_cdriver(IpoDriver *idriver) /* this should be ok for all types here... */ cdriver->type = DRIVER_TYPE_AVERAGE; - /* what to store depends on the 'blocktype' - object or posechannel */ + /* What to store depends on the `blocktype` - object or pose-channel. */ if (idriver->blocktype == ID_AR) { /* PoseChannel */ if (idriver->adrcode == OB_ROT_DIFF) { /* Rotational Difference requires a special type of variable */ diff --git a/source/blender/blenkernel/intern/lib_id.cc b/source/blender/blenkernel/intern/lib_id.cc index 57467b43e34..9dbbd90beb9 100644 --- a/source/blender/blenkernel/intern/lib_id.cc +++ b/source/blender/blenkernel/intern/lib_id.cc @@ -1410,7 +1410,7 @@ void *BKE_libblock_alloc_in_lib(Main *bmain, /* We also need to ensure a valid `session_uid` for some non-main data (like embedded IDs). * IDs not allocated however should not need those (this would e.g. avoid generating session - * uids for depsgraph evaluated IDs, if it was using this function). */ + * UIDs for depsgraph evaluated IDs, if it was using this function). */ if ((flag & LIB_ID_CREATE_NO_ALLOCATE) == 0) { BKE_lib_libblock_session_uid_ensure(id); } diff --git a/source/blender/blenkernel/intern/mesh_legacy_derived_mesh.cc b/source/blender/blenkernel/intern/mesh_legacy_derived_mesh.cc index 8af6dbe0d42..3725e98f5fe 100644 --- a/source/blender/blenkernel/intern/mesh_legacy_derived_mesh.cc +++ b/source/blender/blenkernel/intern/mesh_legacy_derived_mesh.cc @@ -315,7 +315,7 @@ static DerivedMesh *cdDM_from_mesh_ex(Mesh *mesh, const CustomData_MeshMasks *ma cddata_masks.lmask &= ~CD_MASK_MDISPS; - /* this does a referenced copy, with an exception for fluidsim */ + /* This does a referenced copy, with an exception for fluid-simulation. */ DM_init(dm, DM_TYPE_CDDM, diff --git a/source/blender/blenkernel/intern/vfontdata_freetype.cc b/source/blender/blenkernel/intern/vfontdata_freetype.cc index f34a5d5c3e8..802ee53ce56 100644 --- a/source/blender/blenkernel/intern/vfontdata_freetype.cc +++ b/source/blender/blenkernel/intern/vfontdata_freetype.cc @@ -6,7 +6,7 @@ /** \file * \ingroup bke * - * This code parses the Freetype font outline data to chains of Blender's bezier-triples. + * This code parses the FreeType font outline data to chains of Blender's bezier-triples. * Additional information can be found at the bottom of this file. * * Code that uses exotic character maps is present but commented out. diff --git a/source/blender/blenloader/intern/readfile.cc b/source/blender/blenloader/intern/readfile.cc index b71a42072ca..d0bb0936541 100644 --- a/source/blender/blenloader/intern/readfile.cc +++ b/source/blender/blenloader/intern/readfile.cc @@ -3637,7 +3637,7 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath) } if (is_undo) { - /* This idmap will store uids of all IDs ending up in the new main, whether they are newly + /* This idmap will store UIDs of all IDs ending up in the new main, whether they are newly * read, or re-used from the old main. */ fd->new_idmap_uid = BKE_main_idmap_create( static_cast
(fd->mainlist->first), false, nullptr, MAIN_IDMAP_TYPE_UID); diff --git a/source/blender/bmesh/bmesh_class.hh b/source/blender/bmesh/bmesh_class.hh index 30b60006360..2aeff28f615 100644 --- a/source/blender/bmesh/bmesh_class.hh +++ b/source/blender/bmesh/bmesh_class.hh @@ -49,7 +49,7 @@ struct BLI_mempool; * 4: some elements for internal record keeping. */ typedef struct BMHeader { - /** Customdata layers. */ + /** CustomData layers. */ void *data; /** diff --git a/source/blender/bmesh/intern/bmesh_opdefines.cc b/source/blender/bmesh/intern/bmesh_opdefines.cc index 633de0449bc..d1d7ae9fc1a 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.cc +++ b/source/blender/bmesh/intern/bmesh_opdefines.cc @@ -666,7 +666,7 @@ static BMOpDefine bmo_grid_fill_def = { /* * Fill Holes. * - * Fill boundary edges with faces, copying surrounding customdata. + * Fill boundary edges with faces, copying surrounding custom-data. */ static BMOpDefine bmo_holes_fill_def = { "holes_fill", diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 2b61cf8f929..48fda4c550a 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -418,8 +418,8 @@ void DepsgraphNodeBuilder::begin_build() graph_->entry_tags.clear(); } -/* Util callbacks for `BKE_library_foreach_ID_link`, used to detect when an evaluated ID is using - * ID pointers that are either: +/* Utility callbacks for `BKE_library_foreach_ID_link`, used to detect when an evaluated ID is + * using ID pointers that are either: * - evaluated ID pointers that do not exist anymore in current depsgraph. * - Orig ID pointers that do have now an evaluated version in current depsgraph. * In both cases, it means the evaluated ID user needs to be flushed, to ensure its pointers are diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_drivers.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_drivers.cc index a7b74b4ddbd..e0eff798592 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_drivers.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_drivers.cc @@ -55,7 +55,7 @@ bool DriverDescriptor::determine_relations_needed() return true; } - /* Drivers on Booleans and Enums (when used as bitflags) can write to the same memory location, + /* Drivers on Booleans and Enums (when used as bit-flags) can write to the same memory location, * so they need relations between each other. */ return ELEM(RNA_property_type(property_rna_), PROP_BOOLEAN, PROP_ENUM); } diff --git a/source/blender/draw/intern/draw_cache_impl.hh b/source/blender/draw/intern/draw_cache_impl.hh index 2be31065847..8b26b894d6c 100644 --- a/source/blender/draw/intern/draw_cache_impl.hh +++ b/source/blender/draw/intern/draw_cache_impl.hh @@ -269,7 +269,7 @@ blender::gpu::Batch *DRW_mesh_batch_cache_get_edit_mesh_analysis(Mesh &mesh); gpu::VertBuf *DRW_mesh_batch_cache_pos_vertbuf_get(Mesh &mesh); -/* Edit mesh bitflags (is this the right place?) */ +/* Edit mesh bit-flags (is this the right place?). */ enum { VFLAG_VERT_ACTIVE = 1 << 0, VFLAG_VERT_SELECTED = 1 << 1, diff --git a/source/blender/editors/animation/anim_markers.cc b/source/blender/editors/animation/anim_markers.cc index a726c5e7852..ff430ef6855 100644 --- a/source/blender/editors/animation/anim_markers.cc +++ b/source/blender/editors/animation/anim_markers.cc @@ -260,7 +260,7 @@ static TimeMarker *region_position_is_over_marker(const View2D *v2d, /* --------------------------------- */ -/* Adds a marker to list of cfra elems */ +/** Adds a marker to list of `cfra` elements. */ static void add_marker_to_cfra_elem(ListBase *lb, TimeMarker *marker, const bool only_selected) { CfraElem *ce, *cen; diff --git a/source/blender/editors/animation/anim_motion_paths.cc b/source/blender/editors/animation/anim_motion_paths.cc index 46a9ffba2dd..0940af0e6e0 100644 --- a/source/blender/editors/animation/anim_motion_paths.cc +++ b/source/blender/editors/animation/anim_motion_paths.cc @@ -50,7 +50,7 @@ struct MPathTarget { /* Original (Source Objects) */ Object *ob; /* source object */ - bPoseChannel *pchan; /* source posechannel (if applicable) */ + bPoseChannel *pchan; /* source pose-channel (if applicable) */ /* "Evaluated" Copies (these come from the background evaluated copy * that provide all the coordinates we want to save off). */ diff --git a/source/blender/editors/armature/armature_add.cc b/source/blender/editors/armature/armature_add.cc index 830abeddc27..a5b043d75d2 100644 --- a/source/blender/editors/armature/armature_add.cc +++ b/source/blender/editors/armature/armature_add.cc @@ -651,7 +651,7 @@ static void update_duplicate_loc_rot_constraint_settings(Object *ob, min_vec[0] = max_vec[0] * -1; max_vec[0] = min_x_copy * -1; - /* Also flip the enabled axis checkboxes accordingly. */ + /* Also flip the enabled axis check-boxes accordingly. */ const bool use_max_x = (limit->flag & LIMIT_XMAX); const bool use_min_x = (limit->flag & LIMIT_XMIN); limit->flag |= use_max_x ? LIMIT_XMIN : 0; @@ -1051,7 +1051,7 @@ static void copy_pchan(EditBone *src_bone, EditBone *dst_bone, Object *src_ob, O chanold = BKE_pose_channel_ensure(src_ob->pose, src_bone->name); if (chanold) { - /* WARNING: this creates a new posechannel, but there will not be an attached bone + /* WARNING: this creates a new pose-channel, but there will not be an attached bone * yet as the new bones created here are still 'EditBones' not 'Bones'. */ channew = BKE_pose_channel_ensure(dst_ob->pose, dst_bone->name); diff --git a/source/blender/editors/armature/armature_relations.cc b/source/blender/editors/armature/armature_relations.cc index 8c402439b62..6b4f1411356 100644 --- a/source/blender/editors/armature/armature_relations.cc +++ b/source/blender/editors/armature/armature_relations.cc @@ -379,7 +379,7 @@ int ED_armature_join_objects_exec(bContext *C, wmOperator *op) /* Find the difference matrix */ mul_m4_m4m4(mat, oimat, ob_iter->object_to_world().ptr()); - /* Copy bones and posechannels from the object to the edit armature */ + /* Copy bones and pose-channels from the object to the edit armature. */ for (pchan = static_cast(opose->chanbase.first); pchan; pchan = pchann) { pchann = pchan->next; curbone = ED_armature_ebone_find_name(curarm->edbo, pchan->name); diff --git a/source/blender/editors/armature/pose_slide.cc b/source/blender/editors/armature/pose_slide.cc index becd5c92480..e245578736b 100644 --- a/source/blender/editors/armature/pose_slide.cc +++ b/source/blender/editors/armature/pose_slide.cc @@ -133,7 +133,7 @@ struct tPoseSlideOp { ARegion *region; /** len of the PoseSlideObject array. */ - /** links between posechannels and f-curves for all the pose objects. */ + /** Links between pose-channels and f-curves for all the pose objects. */ ListBase pfLinks; /** binary tree for quicker searching for keyframes (when applicable) */ AnimKeylist *keylist; diff --git a/source/blender/editors/include/BIF_glutil.hh b/source/blender/editors/include/BIF_glutil.hh index 6c0a0623df9..2d9f3b19fa7 100644 --- a/source/blender/editors/include/BIF_glutil.hh +++ b/source/blender/editors/include/BIF_glutil.hh @@ -200,6 +200,7 @@ void ED_draw_imbuf_ctx_clipping(const bContext *C, int ED_draw_imbuf_method(const ImBuf *ibuf); /** - * Don't move to `GPU_immediate_util.hh` because this uses user-prefs and isn't very low level. + * Don't move to `GPU_immediate_util.hh` + * because this uses user-preferences and isn't very low level. */ void immDrawBorderCorners(unsigned int pos, const rcti *border, float zoomx, float zoomy); diff --git a/source/blender/editors/include/ED_mball.hh b/source/blender/editors/include/ED_mball.hh index ab3c54d4503..94ca1a49d40 100644 --- a/source/blender/editors/include/ED_mball.hh +++ b/source/blender/editors/include/ED_mball.hh @@ -50,7 +50,7 @@ void ED_mball_editmball_free(Object *obedit); void ED_mball_editmball_make(Object *obedit); /** * This function is called, when MetaBall Object switched from edit mode to object mode. - * List of MetaElements is copied from object->data->edit_elems to object->data->elems. + * List of MetaElements is copied from `object->data->edit_elems` to `object->data->elems`. */ void ED_mball_editmball_load(Object *obedit); diff --git a/source/blender/editors/include/ED_object.hh b/source/blender/editors/include/ED_object.hh index 3ea5998f442..5d2a44fb3a1 100644 --- a/source/blender/editors/include/ED_object.hh +++ b/source/blender/editors/include/ED_object.hh @@ -248,7 +248,7 @@ void parent_set(Object *ob, Object *parent, int type, const char *substr); std::string drop_named_material_tooltip(bContext *C, const char *name, const int mval[2]); std::string drop_geometry_nodes_tooltip(bContext *C, PointerRNA *properties, const int mval[2]); -/* bitflags for enter/exit editmode */ +/** Bit-flags for enter/exit edit-mode. */ enum { EM_FREEDATA = (1 << 0), EM_NO_CONTEXT = (1 << 1), @@ -380,7 +380,7 @@ ListBase *constraint_active_list(Object *ob); ListBase *pose_constraint_list(const bContext *C); /** * Find the list that a given constraint belongs to, - * and/or also get the posechannel this is from (if applicable). + * and/or also get the pose-channel this is from (if applicable). */ ListBase *constraint_list_from_constraint(Object *ob, bConstraint *con, bPoseChannel **r_pchan); /** diff --git a/source/blender/editors/include/UI_interface_c.hh b/source/blender/editors/include/UI_interface_c.hh index 39ecb269b0c..cc47c7b73a5 100644 --- a/source/blender/editors/include/UI_interface_c.hh +++ b/source/blender/editors/include/UI_interface_c.hh @@ -2660,8 +2660,8 @@ void uiTemplateCryptoPicker(uiLayout *layout, blender::StringRefNull propname, int icon); /** - * \todo for now, grouping of layers is determined by dividing up the length of - * the array of layer bitflags + * TODO: for now, grouping of layers is determined by dividing up the length of + * the array of layer bit-flags. */ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, diff --git a/source/blender/editors/object/object_data_transform.cc b/source/blender/editors/object/object_data_transform.cc index 18f1f9ae5c6..6a2fd364f57 100644 --- a/source/blender/editors/object/object_data_transform.cc +++ b/source/blender/editors/object/object_data_transform.cc @@ -627,7 +627,7 @@ void data_xform_by_mat4(XFormObjectData *xod_base, const float mat[4][4]) break; } case ID_MB: { - /* Metaballs are a special case, edit-mode and object mode data is shared. */ + /* Meta-balls are a special case, edit-mode and object mode data is shared. */ MetaBall *mb = (MetaBall *)xod_base->id; XFormObjectData_MetaBall *xod = (XFormObjectData_MetaBall *)xod_base; metaball_coords_and_quats_apply_with_mat4(mb, xod->elem_array, mat); @@ -729,7 +729,7 @@ void data_xform_restore(XFormObjectData *xod_base) break; } case ID_MB: { - /* Metaballs are a special case, edit-mode and object mode data is shared. */ + /* Meta-balls are a special case, edit-mode and object mode data is shared. */ MetaBall *mb = (MetaBall *)xod_base->id; XFormObjectData_MetaBall *xod = (XFormObjectData_MetaBall *)xod_base; metaball_coords_and_quats_apply(mb, xod->elem_array); diff --git a/source/blender/editors/space_buttons/buttons_ops.cc b/source/blender/editors/space_buttons/buttons_ops.cc index cec89efd012..20160968d54 100644 --- a/source/blender/editors/space_buttons/buttons_ops.cc +++ b/source/blender/editors/space_buttons/buttons_ops.cc @@ -325,8 +325,8 @@ static int file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event) fbo->is_userdef = is_userdef; op->customdata = fbo; - /* Normally ED_fileselect_get_params would handle this but we need to because of stupid - * user-prefs exception. - campbell */ + /* NOTE(@ideasman42): Normally #ED_fileselect_get_params would handle this + * but we need to because of stupid user-preferences exception. */ if ((prop_relpath = RNA_struct_find_property(op->ptr, "relative_path"))) { if (!RNA_property_is_set(op->ptr, prop_relpath)) { bool is_relative = (U.flag & USER_RELPATHS) != 0; diff --git a/source/blender/editors/space_info/textview.hh b/source/blender/editors/space_info/textview.hh index 913575af926..2426e4fbbe7 100644 --- a/source/blender/editors/space_info/textview.hh +++ b/source/blender/editors/space_info/textview.hh @@ -27,7 +27,7 @@ struct TextViewContext { int row_vpadding; - /** Area to draw text: (0, 0, winx, winy) with a margin applied and scroll-bar subtracted. */ + /** Area to draw text: `(0, 0, winx, winy)` with a margin applied and scroll-bar subtracted. */ rcti draw_rect; /** Area to draw text background colors (extending beyond text in some cases). */ rcti draw_rect_outer; diff --git a/source/blender/editors/space_text/text_ops.cc b/source/blender/editors/space_text/text_ops.cc index f6f16035415..d4b7a850979 100644 --- a/source/blender/editors/space_text/text_ops.cc +++ b/source/blender/editors/space_text/text_ops.cc @@ -2685,7 +2685,7 @@ static void space_text_screen_skip(SpaceText *st, ARegion *region, int lines) space_text_screen_clamp(st, region); } -/* quick enum for tsc->zone (scroller handles) */ +/** Enum for #TextScroll::zone (scroll-bar handles). */ enum eScrollZone { SCROLLHANDLE_INVALID_OUTSIDE = -1, SCROLLHANDLE_BAR, diff --git a/source/blender/editors/space_view3d/view3d_snap.cc b/source/blender/editors/space_view3d/view3d_snap.cc index dc119fe4f80..2eff832782a 100644 --- a/source/blender/editors/space_view3d/view3d_snap.cc +++ b/source/blender/editors/space_view3d/view3d_snap.cc @@ -1027,7 +1027,7 @@ bool ED_view3d_minmax_verts(const Scene *scene, Object *obedit, float r_min[3], TransVert *tv; float centroid[3], vec[3], bmat[3][3]; - /* Metaballs are an exception. */ + /* Meta-balls are an exception. */ if (obedit->type == OB_MBALL) { float ob_min[3], ob_max[3]; bool changed; diff --git a/source/blender/editors/space_view3d/view3d_view.cc b/source/blender/editors/space_view3d/view3d_view.cc index 0e60c73514f..7b7a4b5de94 100644 --- a/source/blender/editors/space_view3d/view3d_view.cc +++ b/source/blender/editors/space_view3d/view3d_view.cc @@ -1103,7 +1103,8 @@ void VIEW3D_OT_localview(wmOperatorType *ot) /* api callbacks */ ot->exec = localview_exec; - ot->flag = OPTYPE_UNDO; /* localview changes object layer bitflags */ + /* Use undo because local-view changes object layer bit-flags. */ + ot->flag = OPTYPE_UNDO; ot->poll = ED_operator_view3d_active; diff --git a/source/blender/editors/transform/transform_convert_mesh_skin.cc b/source/blender/editors/transform/transform_convert_mesh_skin.cc index 546b4e25ab8..6ce22a618fe 100644 --- a/source/blender/editors/transform/transform_convert_mesh_skin.cc +++ b/source/blender/editors/transform/transform_convert_mesh_skin.cc @@ -168,7 +168,7 @@ static void createTransMeshSkin(bContext * /*C*/, TransInfo *t) } } - /* Detect CrazySpace [tm]. */ + /* Detect CrazySpace [TM]. */ transform_convert_mesh_crazyspace_detect(t, tc, em, &crazyspace_data); /* Create TransData. */ diff --git a/source/blender/editors/transform/transform_snap.cc b/source/blender/editors/transform/transform_snap.cc index e36fcf10809..c21cbcc27f3 100644 --- a/source/blender/editors/transform/transform_snap.cc +++ b/source/blender/editors/transform/transform_snap.cc @@ -745,7 +745,7 @@ static eSnapTargetOP snap_target_select_from_spacetype(TransInfo *t) } } else if (ELEM(obedit_type, OB_ARMATURE, OB_CURVES_LEGACY, OB_SURF, OB_LATTICE, OB_MBALL)) { - /* Temporary limited to edit mode armature, curves, surfaces, lattices, and metaballs. */ + /* Temporary limited to edit mode armature, curves, surfaces, lattices, and meta-balls. */ ret |= SCE_SNAP_TARGET_NOT_SELECTED; } } diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp index 6079d410619..cbc1c4e3ea5 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp @@ -93,7 +93,7 @@ NodeGroup *BlenderFileLoader::Load() continue; } - /* Evaluated metaballs will appear as mesh objects in the iterator. */ + /* Evaluated meta-balls will appear as mesh objects in the iterator. */ if (ob->type == OB_MBALL) { continue; } diff --git a/source/blender/geometry/intern/realize_instances.cc b/source/blender/geometry/intern/realize_instances.cc index 03e69211532..49a50bd6cb5 100644 --- a/source/blender/geometry/intern/realize_instances.cc +++ b/source/blender/geometry/intern/realize_instances.cc @@ -2365,7 +2365,7 @@ bke::GeometrySet realize_instances(bke::GeometrySet geometry_set, new_geometry_set); const int64_t total_points_num = get_final_points_num(gather_info.r_tasks); - /* This doesn't have to be exact at all, it's just a rough estimate ot make decisions about + /* This doesn't have to be exact at all, it's just a rough estimate to make decisions about * multi-threading (overhead). */ const int64_t approximate_used_bytes_num = total_points_num * 32; threading::memory_bandwidth_bound_task(approximate_used_bytes_num, [&]() { diff --git a/source/blender/gpu/metal/mtl_framebuffer.hh b/source/blender/gpu/metal/mtl_framebuffer.hh index 707eba64600..15dd06bffa0 100644 --- a/source/blender/gpu/metal/mtl_framebuffer.hh +++ b/source/blender/gpu/metal/mtl_framebuffer.hh @@ -75,8 +75,8 @@ class MTLFrameBuffer : public FrameBuffer { /** * Whether a clear is pending -- Used to toggle between clear and load FB configurations - * (without dirtying the state) - Frame-buffer load config is used if no `GPU_clear_*` command - * was issued after binding the #FrameBuffer. + * (without dirtying the state) - Frame-buffer load configuration is used if no `GPU_clear_*` + * command was issued after binding the #FrameBuffer. */ bool has_pending_clear_; @@ -88,7 +88,7 @@ class MTLFrameBuffer : public FrameBuffer { * [1] = LOAD CONFIG -- Used if bound, but no clear is required. * [2] = CUSTOM CONFIG -- When using GPU_framebuffer_bind_ex to manually specify * load-store configuration for optimal bandwidth utilization. - * -- We cache these different configs to avoid re-generation -- + * -- We cache these different configurations to avoid re-generation -- */ enum { MTL_FB_CONFIG_CLEAR = 0, @@ -108,7 +108,7 @@ class MTLFrameBuffer : public FrameBuffer { /** Whether the primary Frame-buffer attachment is an SRGB target or not. */ bool srgb_; - /** Default width/height represent raw size of active framebuffer attachments. + /** Default width/height represent raw size of active frame-buffer attachments. * For consistency with OpenGL backend, as width_/height_ can affect viewport and scissor * size, we need to track this differently to ensure viewport state does not get reset. * This size is only used to reset viewport/scissor regions when viewports and scissor are @@ -120,7 +120,7 @@ class MTLFrameBuffer : public FrameBuffer { public: /** - * Create a conventional framebuffer to attach texture to. + * Create a conventional frame-buffer to attach texture to. */ MTLFrameBuffer(MTLContext *ctx, const char *name); diff --git a/source/blender/gpu/metal/mtl_framebuffer.mm b/source/blender/gpu/metal/mtl_framebuffer.mm index c71b4216530..f9911815620 100644 --- a/source/blender/gpu/metal/mtl_framebuffer.mm +++ b/source/blender/gpu/metal/mtl_framebuffer.mm @@ -1550,7 +1550,7 @@ MTLRenderPassDescriptor *MTLFrameBuffer::bake_render_pass_descriptor(bool load_c /* If Frame-buffer has been modified, regenerate descriptor. */ if (is_dirty_) { - /* Clear all configs. */ + /* Clear all configurations. */ for (int config = 0; config < 3; config++) { descriptor_dirty_[config] = true; } diff --git a/source/blender/gpu/opengl/gl_context.hh b/source/blender/gpu/opengl/gl_context.hh index 81c426d4d75..2f25c34c940 100644 --- a/source/blender/gpu/opengl/gl_context.hh +++ b/source/blender/gpu/opengl/gl_context.hh @@ -70,7 +70,7 @@ class GLContext : public Context { /** VBO for missing vertex attribute binding. Avoid undefined behavior on some implementation. */ GLuint default_attr_vbo_; - /** Used for debugging purpose. Bitflags of all bound slots. */ + /** Used for debugging purpose. Bit-flags of all bound slots. */ uint16_t bound_ubo_slots; uint16_t bound_ssbo_slots; diff --git a/source/blender/io/alembic/exporter/abc_writer_mball.cc b/source/blender/io/alembic/exporter/abc_writer_mball.cc index 611d018f55a..8dfd479cefe 100644 --- a/source/blender/io/alembic/exporter/abc_writer_mball.cc +++ b/source/blender/io/alembic/exporter/abc_writer_mball.cc @@ -35,14 +35,14 @@ bool ABCMetaballWriter::is_supported(const HierarchyContext *context) const bool ABCMetaballWriter::check_is_animated(const HierarchyContext & /*context*/) const { - /* We assume that metaballs are always animated, as the current object may + /* We assume that meta-balls are always animated, as the current object may * not be animated but another ball in the same group may be. */ return true; } bool ABCMetaballWriter::export_as_subdivision_surface(Object * /*ob_eval*/) const { - /* Metaballs should be exported to subdivision surfaces, if the export options allow. */ + /* Meta-balls should be exported to subdivision surfaces, if the export options allow. */ return true; } diff --git a/source/blender/io/usd/intern/usd_blend_shape_utils.hh b/source/blender/io/usd/intern/usd_blend_shape_utils.hh index db13acc44f4..48624d0929e 100644 --- a/source/blender/io/usd/intern/usd_blend_shape_utils.hh +++ b/source/blender/io/usd/intern/usd_blend_shape_utils.hh @@ -84,7 +84,7 @@ void ensure_blend_shape_skeleton(pxr::UsdStageRefPtr stage, pxr::UsdPrim &mesh_p * * \param stage: The stage * \param skel_path: Path to the skeleton - * \param mesh_paths: Paths to one or more mesh prims bound to the skeleton + * \param mesh_paths: Paths to one or more mesh primitives bound to the skeleton */ void remap_blend_shape_anim(pxr::UsdStageRefPtr stage, const pxr::SdfPath &skel_path, diff --git a/source/blender/io/usd/intern/usd_capi_export.cc b/source/blender/io/usd/intern/usd_capi_export.cc index d2b64d88f6a..7a905a639f8 100644 --- a/source/blender/io/usd/intern/usd_capi_export.cc +++ b/source/blender/io/usd/intern/usd_capi_export.cc @@ -188,7 +188,7 @@ static void ensure_root_prim(pxr::UsdStageRefPtr stage, const USDExportParams &p for (const auto &path : pxr::SdfPath(params.root_prim_path).GetPrefixes()) { auto xform = pxr::UsdGeomXform::Define(stage, path); - /* Tag generated prims to allow filtering on import */ + /* Tag generated primitives to allow filtering on import. */ xform.GetPrim().SetCustomDataByKey(pxr::TfToken("Blender:generated"), pxr::VtValue(true)); } } diff --git a/source/blender/io/usd/intern/usd_skel_root_utils.hh b/source/blender/io/usd/intern/usd_skel_root_utils.hh index a9fc75c3709..6defefb43b0 100644 --- a/source/blender/io/usd/intern/usd_skel_root_utils.hh +++ b/source/blender/io/usd/intern/usd_skel_root_utils.hh @@ -19,7 +19,7 @@ namespace blender::io::usd { * * See: https://openusd.org/23.05/api/class_usd_skel_root.html#details * - * This function attempts to ensure that skinned prims and skeletons are encapsulated + * This function attempts to ensure that skinned primitives and skeletons are encapsulated * under SkelRoots, converting existing Xform primitives to SkelRoots to achieve this, * if possible. In the case where no common ancestor which can be converted to a SkelRoot * is found, this function issues a warning. One way to address such a case is by setting a diff --git a/source/blender/io/usd/intern/usd_writer_metaball.cc b/source/blender/io/usd/intern/usd_writer_metaball.cc index a67ea61fee1..e84917ee97a 100644 --- a/source/blender/io/usd/intern/usd_writer_metaball.cc +++ b/source/blender/io/usd/intern/usd_writer_metaball.cc @@ -25,7 +25,7 @@ bool USDMetaballWriter::is_supported(const HierarchyContext *context) const bool USDMetaballWriter::check_is_animated(const HierarchyContext & /*context*/) const { - /* We assume that metaballs are always animated, as the current object may + /* We assume that meta-balls are always animated, as the current object may * not be animated but another ball in the same group may be. */ return true; } diff --git a/source/blender/makesdna/DNA_object_fluidsim_types.h b/source/blender/makesdna/DNA_object_fluidsim_types.h index db1a9434868..2f7e0038800 100644 --- a/source/blender/makesdna/DNA_object_fluidsim_types.h +++ b/source/blender/makesdna/DNA_object_fluidsim_types.h @@ -60,8 +60,10 @@ typedef struct FluidsimSettings { /* gravity strength */ float iniVelx, iniVely, iniVelz; - /* store output path, and file prefix for baked fluid surface */ - /* strlens; 256= FILE_MAXFILE, 768= FILE_MAXDIR */ + /** + * Store output path, and file prefix for baked fluid surface. + * String length; 256= #FILE_MAXFILE, 768= #FILE_MAXDIR. + */ char surfdataPath[1024]; /* store start coords of axis aligned bounding box together with size */ diff --git a/source/blender/python/intern/bpy_rna_array.cc b/source/blender/python/intern/bpy_rna_array.cc index fdf2ce5e7e5..1db325f55e1 100644 --- a/source/blender/python/intern/bpy_rna_array.cc +++ b/source/blender/python/intern/bpy_rna_array.cc @@ -989,7 +989,7 @@ PyObject *pyrna_py_from_array(PointerRNA *ptr, PropertyRNA *prop) ret = pyrna_math_object_from_array(ptr, prop); - /* is this a maths object? */ + /* Is this a math object? */ if (ret) { return ret; } diff --git a/source/blender/windowmanager/intern/wm.cc b/source/blender/windowmanager/intern/wm.cc index 1c1d2ad2dd9..ebe544d45c2 100644 --- a/source/blender/windowmanager/intern/wm.cc +++ b/source/blender/windowmanager/intern/wm.cc @@ -441,7 +441,7 @@ void WM_keyconfig_init(bContext *C) { wmWindowManager *wm = CTX_wm_manager(C); - /* Create standard key configs. */ + /* Create standard key configuration. */ if (wm->defaultconf == nullptr) { /* Keep lowercase to match the preset filename. */ wm->defaultconf = WM_keyconfig_new(wm, WM_KEYCONFIG_STR_DEFAULT, false); diff --git a/source/blender/windowmanager/intern/wm_dragdrop.cc b/source/blender/windowmanager/intern/wm_dragdrop.cc index cb670f7c553..8b49b81b14c 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.cc +++ b/source/blender/windowmanager/intern/wm_dragdrop.cc @@ -325,7 +325,7 @@ void wm_drags_exit(wmWindowManager *wm, wmWindow *win) WM_cursor_modal_restore(win); } - /* Active area should always redraw, even if cancelled. */ + /* Active area should always redraw, even if canceled. */ int event_xy_target[2]; wmWindow *target_win = WM_window_find_under_cursor(win, win->eventstate->xy, event_xy_target); if (target_win) { diff --git a/source/blender/windowmanager/intern/wm_window.cc b/source/blender/windowmanager/intern/wm_window.cc index e8b9bac9bf6..45884bd6834 100644 --- a/source/blender/windowmanager/intern/wm_window.cc +++ b/source/blender/windowmanager/intern/wm_window.cc @@ -1470,14 +1470,14 @@ static bool ghost_event_proc(GHOST_EventHandle ghost_event, GHOST_TUserDataPtr C wm_window_make_drawable(wm, win); - /* Window might be focused by mouse click in configuration of window manager + /* NOTE(@sergey): Window might be focused by mouse click in configuration of window manager * when focus is not following mouse * click could have been done on a button and depending on window manager settings * click would be passed to blender or not, but in any case button under cursor * should be activated, so at max next click on button without moving mouse * would trigger its handle function * currently it seems to be common practice to generate new event for, but probably - * we'll need utility function for this? (sergey) + * we'll need utility function for this? */ wmEvent event; wm_event_init_from_window(win, &event); diff --git a/tools/check_source/clang_array_check.py b/tools/check_source/clang_array_check.py index bf2ec6015b2..44831417def 100644 --- a/tools/check_source/clang_array_check.py +++ b/tools/check_source/clang_array_check.py @@ -104,7 +104,7 @@ defs_precalc = { import sys if 0: - # Examples with LLVM as the root dir: `/dsk/src/llvm`. + # Examples with LLVM as the root directory: `/dsk/src/llvm`. # Path containing `clang/__init__.py`. CLANG_BIND_DIR = "/dsk/src/llvm/tools/clang/bindings/python" diff --git a/tools/check_source/project_source_info.py b/tools/check_source/project_source_info.py index e5227179e6c..84da6e0ded2 100644 --- a/tools/check_source/project_source_info.py +++ b/tools/check_source/project_source_info.py @@ -157,7 +157,7 @@ def build_info( continue del args_orig - # join args incase they are not. + # Join arguments in case they are not. args_str = " ".join(args) args_str = args_str.replace(" -isystem", " -I") args_str = args_str.replace(" -D ", " -D") @@ -202,7 +202,7 @@ def build_defines_as_source() -> str: '#defines A=B\n#define....' """ import subprocess - # works for both gcc and clang + # Works for both GCC and CLANG. cmd = (cmake_cache_var_or_exit("CMAKE_C_COMPILER"), "-dM", "-E", "-") process = subprocess.Popen( cmd, @@ -236,7 +236,7 @@ def process_make_non_blocking(proc: subprocess.Popen[Any]) -> subprocess.Popen[A return proc -# could be moved elsewhere!, this just happens to be used by scripts that also +# Could be moved elsewhere!, this just happens to be used by scripts that also # use this module. def queue_processes( process_funcs: Sequence[tuple[Callable[..., subprocess.Popen[Any]], tuple[Any, ...]]], @@ -245,7 +245,8 @@ def queue_processes( sleep: float = 0.1, process_finalize: Callable[[subprocess.Popen[Any], bytes, bytes], int | None] | None = None, ) -> None: - """ Takes a list of function arg pairs, each function must return a process + """ + Takes a list of function argument pairs, each function must return a process. """ if job_total == -1: diff --git a/tools/utils_ide/project_info.py b/tools/utils_ide/project_info.py index 6cf9e060b3a..9be072acc73 100755 --- a/tools/utils_ide/project_info.py +++ b/tools/utils_ide/project_info.py @@ -168,9 +168,11 @@ def cmake_advanced_info() -> ( from xml.dom.minidom import parse tree = parse(project_path) - # to check on nicer xml - # f = open(".cproject_pretty", 'w') - # f.write(tree.toprettyxml(indent=" ", newl="")) + # Enable to check on nicer XML. + use_pretty_xml = False + if use_pretty_xml: + with open(".cproject_pretty", 'w') as fh: + fh.write(tree.toprettyxml(indent=" ", newl="")) ELEMENT_NODE = tree.ELEMENT_NODE @@ -187,12 +189,6 @@ def cmake_advanced_info() -> ( moduleId = substorage.attributes["moduleId"].value - # org.eclipse.cdt.core.settings - # org.eclipse.cdt.core.language.mapping - # org.eclipse.cdt.core.externalSettings - # org.eclipse.cdt.core.pathentry - # org.eclipse.cdt.make.core.buildtargets - if moduleId == "org.eclipse.cdt.core.pathentry": for path in substorage.childNodes: if path.nodeType != ELEMENT_NODE: @@ -200,10 +196,10 @@ def cmake_advanced_info() -> ( kind = path.attributes["kind"].value if kind == "mac": - # + # `` defines.append((path.attributes["name"].value, path.attributes["value"].value)) elif kind == "inc": - # + # `` includes.append(path.attributes["include"].value) else: pass