Cleanup: spelling & repeated terms (make check_spelling_*)

Also use comment blocks for English text.
This commit is contained in:
Campbell Barton
2025-03-27 01:13:34 +00:00
parent 6f95b7e9a4
commit 42ad772a1f
20 changed files with 45 additions and 42 deletions

View File

@@ -104,11 +104,11 @@ ccl_device_inline bool curve_custom_intersect(const hiprtRay &ray,
const int object_id = kernel_data_fetch(user_instance_id, hit.instanceID);
/* data_offset.x: where the data (prim id, type )for the geometry of the current object begins
/* `data_offset.x`: where the data (prim id, type )for the geometry of the current object begins
* the prim_id that is in hiprtHit hit is local to the particular geometry so we add the above
* ofstream to map prim id in hiprtHit to the one compatible to what next stage expects
* data_offset.y: the offset that has to be added to a local primitive to get the global
* primitive id = kernel_data_fetch(object_prim_offset, object_id); */
* `ofstream` to map prim id in hiprtHit to the one compatible to what next stage expects
* `data_offset.y`: the offset that has to be added to a local primitive to get the global
* `primitive id = kernel_data_fetch(object_prim_offset, object_id);` */
const int2 data_offset = kernel_data_fetch(custom_prim_info_offset, object_id);
const int prim_offset = data_offset.y;

View File

@@ -507,14 +507,14 @@ void DiagSplit::split_ngon(const Mesh::SubdFace &face,
for (int corner = 0; corner < face.num_corners; corner++) {
const Patch *patch = (const Patch *)(((char *)patches) + (corner * patches_byte_stride));
/* vprev .
/* v_prev .
* . .
* . edge_u1 .
* v01 ←------ v11 . . .
* | ↑
* edge_v0 | | edge_v1
* ↓ |
* v00 ------→ v10 . . vnext
* v00 ------→ v10 . . v_next
* edge_u0
*/
SubPatch::Edge &edge_v0 = edges[mod(corner + face.num_corners - 1, face.num_corners)];
@@ -543,11 +543,11 @@ void DiagSplit::split_ngon(const Mesh::SubdFace &face,
void DiagSplit::split_patches(const Patch *patches, const size_t patches_byte_stride)
{
// TODO: reuse edge factor vertex position computations
// TODO: support not splitting n-gons if not needed
// TODO: multithreading
/* TODO: reuse edge factor vertex position computations. */
/* TODO: support not splitting n-gons if not needed. */
/* TODO: multi-threading. */
/* Keep base mesh vertices, create new triangels. */
/* Keep base mesh vertices, create new triangles. */
num_verts = params.mesh->get_num_subd_base_verts();
num_triangles = 0;

View File

@@ -541,7 +541,7 @@ def version_extraction(report_body: str) -> tuple[list[str], list[str]]:
if lower_line.startswith('work'):
# Use `work` to be able to detect both "worked" and "working".
if (not example_in_line) and not ("brok" in lower_line):
# Don't add the line to the working_lines if it contains the letters "brok"
# Don't add the line to the working_lines if it contains the letters `brok`.
# because it means the user probably wrote something like "Worked: It was also broken in X.X"
# which lead to incorrect information.
working_lines += f'{line}\n'

View File

@@ -3143,7 +3143,7 @@ void move_slot(Main &bmain, Slot &source_slot, Action &from_action, Action &to_a
* the animated ID.
*
* This line was added here for now, to fix #136388 with minimal impact on
* other code, so that the fix can be easily backported to Blender 4.4. */
* other code, so that the fix can be easily back-ported to Blender 4.4. */
DEG_id_tag_update(user, ID_RECALC_ANIMATION);
return true;
};

View File

@@ -258,7 +258,7 @@ void convert_legacy_action_assignments(Main &bmain, ReportList *reports)
/* Note that the code below does not remove the `action_assignment_needs_slot` tag. One ID can
* use multiple Actions (via NLA, Action constraints, etc.); if one of those Action is an ancient
* one one from before 2.50 (just to name one example case) this ID may needs to be re-visited
* one from before 2.50 (just to name one example case) this ID may needs to be re-visited
* after those were versioned. Rather than trying to figure out if re-visiting is necessary, this
* function is safe to call multiple times, and all that's lost is a little bit of CPU time. */

View File

@@ -483,7 +483,7 @@ bool BKE_fcurve_bezt_subdivide_handles(BezTriple *bezt,
* \param new_totvert: new number of elements in the FCurve's `bezt` array.
*
* \note When increasing the size of the array, newly added elements (that is, in the
* [old_totvert..new_totvert) interval) are zero-initialized.
* [old_totvert..new_totvert] interval) are zero-initialized.
*/
void BKE_fcurve_bezt_resize(FCurve *fcu, int new_totvert);
@@ -591,7 +591,7 @@ bool test_time_fcurve(FCurve *fcu);
* than the horizontal distance between (v1-v4).
* This is to prevent curve loops.
*
* This function is very similar to BKE_curve_correct_bezpart(), but allows a steeper tangent for
* This function is very similar to #BKE_curve_correct_bezpart(), but allows a steeper tangent for
* more snappy animations. This is not desired for other areas in which curves are used, though.
*/
void BKE_fcurve_correct_bezpart(const float v1[2], float v2[2], float v3[2], const float v4[2]);

View File

@@ -421,15 +421,17 @@ class LayerRuntime {
*/
Vector<LayerMask> masks_;
/* Runtime data used for frame transformations. */
/** Runtime data used for frame transformations. */
LayerTransformData trans_data_;
/* Whether this layer's visibility is animated (via the ".hide" RNA property). This is only set
* when creating a copy of of the owning GreasePencil ID for the depsgraph evaluation. */
/**
* Whether this layer's visibility is animated (via the ".hide" RNA property). This is only set
* when creating a copy of the owning GreasePencil ID for the depsgraph evaluation.
*/
bool is_visibility_animated_;
public:
/* Reset all runtime data. */
/** Reset all runtime data. */
void clear();
};
@@ -642,8 +644,10 @@ class LayerGroupRuntime {
*/
mutable Vector<LayerGroup *> layer_group_cache_;
/* Whether this layer's visibility is animated (via the ".hide" RNA property). This is only set
* when creating a copy of of the owning GreasePencil ID for the depsgraph evaluation. */
/**
* Whether this layer's visibility is animated (via the ".hide" RNA property). This is only set
* when creating a copy of the owning GreasePencil ID for the depsgraph evaluation.
*/
bool is_visibility_animated_;
};

View File

@@ -253,7 +253,7 @@ bool BKE_mesh_calc_islands_loop_face_uvmap(float (*vert_positions)[3],
* \param sharp_faces: Optional (possibly empty) span.
* \param r_totgroup: The total number of groups, 1 or more.
* \return Face aligned array of group index values, starting at 1 (0 being used as 'invalid'
* flag). Note that it's the callers's responsibility to MEM_freeN the returned array.
* flag). Note that it's the callers responsibility to MEM_freeN the returned array.
*/
int *BKE_mesh_calc_smoothgroups(int edges_num,
blender::OffsetIndices<int> faces,
@@ -262,7 +262,7 @@ int *BKE_mesh_calc_smoothgroups(int edges_num,
blender::Span<bool> sharp_faces,
int *r_totgroup);
/**
* Same as #BKE_mesh_calc_smoothgroups, but use bitflags instead of increasing numbers for each
* Same as #BKE_mesh_calc_smoothgroups, but use bit-flags instead of increasing numbers for each
* group.
*
* This means that the same value (bit) can be re-used for different groups, as long as they are
@@ -281,7 +281,7 @@ int *BKE_mesh_calc_smoothgroups(int edges_num,
* \param sharp_faces: Optional (possibly empty) span.
* \param r_totgroup: The total number of groups, 1 or more.
* \return Face aligned array of group bit-flags values (i.e. always powers of 2), starting at 1 (0
* being used as 'invalid' flag). Note that it's the callers's responsibility to MEM_freeN the
* being used as 'invalid' flag). Note that it's the callers responsibility to MEM_freeN the
* returned array.
*/
int *BKE_mesh_calc_smoothgroups_bitflags(int edges_num,

View File

@@ -1454,7 +1454,7 @@ static int cloth_bvh_objcollisions_resolve(ClothModifierData *clmd,
/* Apply impulses in parallel. */
if (result) {
for (i = 0; i < mvert_num; i++) {
// calculate "velocities" (just xnew = xold + v; no dt in v)
/* Calculate "velocities" (just `xnew = xold + v`; no `dt` in `v`). */
if (verts[i].impulse_count) {
add_v3_v3(verts[i].tv, verts[i].impulse);
add_v3_v3(verts[i].dcvel, verts[i].impulse);

View File

@@ -47,7 +47,7 @@ typedef uint64_t u_int64_t;
# include <stdint.h> // IWYU pragma: export
# include <sys/types.h> // IWYU pragma: export
#endif /* ifdef platform for types */
#endif /* `ifdef` platform for types. */
#include <stdbool.h> // IWYU pragma: export
#include <stddef.h> // IWYU pragma: export

View File

@@ -1024,9 +1024,8 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain)
LISTBASE_FOREACH (bGPdata *, gpd, &bmain->gpencils) {
bool enabled = false;
/* Ensure that the datablock's onion-skinning toggle flag
* stays in sync with the status of the actual layers
*/
/* Ensure that the data-block's onion-skinning toggle flag
* stays in sync with the status of the actual layers. */
LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
if (gpl->flag & GP_LAYER_ONIONSKIN) {
enabled = true;

View File

@@ -140,7 +140,7 @@ struct Instance final : public DrawEngine {
Texture snapshot_depth_tx = {"snapshot_depth_tx"};
Texture snapshot_color_tx = {"snapshot_color_tx"};
Texture snapshot_reveal_tx = {"snapshot_reveal_tx"};
/* Textures used by Antialiasing. */
/* Textures used by Anti-aliasing. */
Texture smaa_area_tx = {"smaa_area_tx"};
Texture smaa_search_tx = {"smaa_search_tx"};

View File

@@ -134,7 +134,7 @@ enum class IBOType : int8_t {
struct MeshBufferList {
/* Though using maps here may add some overhead compared to just indexed arrays, it's a bit more
* conventient currently, because the "buffer exists" test is very clear, it's just whether the
* convenient currently, because the "buffer exists" test is very clear, it's just whether the
* map contains it (e.g. compared to "buffer is allocated but not filled with data"). The
* sparseness *may* be useful for reducing memory usage when only few buffers are used. */

View File

@@ -379,7 +379,7 @@ static void vicon_handletype_auto_clamp_draw(
static void icon_node_socket_draw(int socket_type, int x, int y, int w, int h, float /*alpha*/)
{
/* Factor to account for the draw function of the node socket being based on the widget unit,
* which is 10 px by default, which differs from icons. */
* which is 10 pixels by default, which differs from icons. */
constexpr float size_factor = 10.0f / float(ICON_DEFAULT_WIDTH);
const float socket_radius = w * 0.5f * size_factor;

View File

@@ -1221,13 +1221,13 @@ bool strip_effect_get_new_inputs(Scene *scene,
}
blender::VectorSet<Strip *> new_inputs = seq::query_selected_strips(ed->seqbasep);
// Ignore sound strips for now (avoids unnecessary errors when connected strips are
// selected together, and the intent to operate on strips with video content is clear).
/* Ignore sound strips for now (avoids unnecessary errors when connected strips are
* selected together, and the intent to operate on strips with video content is clear). */
new_inputs.remove_if([&](Strip *strip) { return strip->type == STRIP_TYPE_SOUND_RAM; });
if (ignore_active) {
// If `ignore_active` is true, this function is being called from the reassign inputs
// operator, meaning the active strip must be the effect strip to reassign.
/* If `ignore_active` is true, this function is being called from the reassign inputs
* operator, meaning the active strip must be the effect strip to reassign. */
Strip *active_strip = seq::select_active_get(scene);
new_inputs.remove_if([&](Strip *strip) { return strip == active_strip; });
}

View File

@@ -397,7 +397,7 @@ static void detect_workarounds()
}
}
/* See #132968: Legacy AMD drivers do not accept a hash after the line number and results into
* undefined behaviour. Users have reported that the issue can go away after doing a clean
* undefined behavior. Users have reported that the issue can go away after doing a clean
* install of the driver.
*/
if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_ANY, GPU_DRIVER_OFFICIAL)) {

View File

@@ -296,7 +296,7 @@ void VKCommandBuilder::groups_build_commands(VKRenderGraph &render_graph,
<< group_node_handles.last() << ", node_pre_barrier=(" << to_string_barrier(barrier)
<< ")\n";
#endif
// TODO: Barrier should already contain the changes for local read.
/* TODO: Barrier should already contain the changes for local read. */
send_pipeline_barriers(command_buffer, barrier, true);
}

View File

@@ -183,7 +183,7 @@ bool VKBackend::is_supported()
return false;
}
// go over all the devices
/* Go over all the devices. */
uint32_t physical_devices_count = 0;
vkEnumeratePhysicalDevices(vk_instance, &physical_devices_count, nullptr);
Array<VkPhysicalDevice> vk_physical_devices(physical_devices_count);

View File

@@ -533,8 +533,8 @@ class MaterialImportPollInvoker : public USDHookInvoker {
void call_hook(PyObject *hook_obj) override
{
// If we already know that one of the registered hook classes can import the material
// because it returned true in a previous invocation of the callback, we skip the call.
/* If we already know that one of the registered hook classes can import the material
* because it returned true in a previous invocation of the callback, we skip the call. */
if (!result_) {
result_ = python::call_method<bool>(
hook_obj, function_name(), REF(hook_context_), usd_material_);

View File

@@ -284,7 +284,7 @@ enum {
* to be a Hyper modifier, see !136340.
*
* Note that this is currently only supported on Wayland & X11
* but could could be supported on other platforms if desired.
* but could be supported on other platforms if desired.
*/
KM_HYPER = (1 << 4),
};