Cleanup: spelling in comments (make check_spelling*)

- Back-tick quote math expressions so differentiate them
  from English.
- Use doxygen code blocks for TEX expressions.
This commit is contained in:
Campbell Barton
2025-01-04 16:26:39 +11:00
parent 1bcc01519a
commit d2d754be3f
58 changed files with 124 additions and 112 deletions

View File

@@ -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)) {

View File

@@ -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;

View File

@@ -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 */

View File

@@ -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)

View File

@@ -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,

View File

@@ -66,17 +66,17 @@ BVHTreeFromMesh bvhtree_from_mesh_corner_tris_ex(Span<float3> 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);

View File

@@ -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<blender::OrderedEdge> edgeset; /* used for selfcollisions */
blender::Set<blender::OrderedEdge> 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. */

View File

@@ -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 */

View File

@@ -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.

View File

@@ -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;
}

View File

@@ -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) {

View File

@@ -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;
}

View File

@@ -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();
}

View File

@@ -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 */

View File

@@ -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);
}

View File

@@ -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,

View File

@@ -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.

View File

@@ -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<Main *>(fd->mainlist->first), false, nullptr, MAIN_IDMAP_TYPE_UID);

View File

@@ -49,7 +49,7 @@ struct BLI_mempool;
* 4: some elements for internal record keeping.
*/
typedef struct BMHeader {
/** Customdata layers. */
/** CustomData layers. */
void *data;
/**

View File

@@ -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",

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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,

View File

@@ -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;

View File

@@ -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). */

View File

@@ -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);

View File

@@ -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<bPoseChannel *>(opose->chanbase.first); pchan; pchan = pchann) {
pchann = pchan->next;
curbone = ED_armature_ebone_find_name(curarm->edbo, pchan->name);

View File

@@ -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;

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);
/**

View File

@@ -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,

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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,

View File

@@ -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;

View File

@@ -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;

View File

@@ -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. */

View File

@@ -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;
}
}

View File

@@ -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;
}

View File

@@ -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, [&]() {

View File

@@ -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);

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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,

View File

@@ -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));
}
}

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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 */

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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) {

View File

@@ -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);

View File

@@ -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"

View File

@@ -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:

View File

@@ -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":
# <pathentry kind="mac" name="PREFIX" path="" value="&quot;/opt/blender25&quot;"/>
# `<pathentry kind="mac" name="PREFIX" path="" value="&quot;/opt/blender25&quot;"/>`
defines.append((path.attributes["name"].value, path.attributes["value"].value))
elif kind == "inc":
# <pathentry include="/data/src/blender/blender/source/blender/editors/include" kind="inc" path="" system="true"/>
# `<pathentry include="/path/to/include" kind="inc" path="" system="true"/>`
includes.append(path.attributes["include"].value)
else:
pass