Cleanup: spelling in comments & strings (make check_spelling_*)

This commit is contained in:
Campbell Barton 2026-06-10 10:43:12 +10:00
parent 1fefb99eb0
commit ebfe79af0e
37 changed files with 55 additions and 51 deletions

View file

@ -1178,7 +1178,7 @@ ccl_device int bsdf_microfacet_beckmann_sample(KernelGlobals kg,
* An infinitesimally thin sheet of dielectric, following OpenPBR spec
* https://academysoftwarefoundation.github.io/OpenPBR/#model/thin-walledcase
*
* It is approximated by a reflected lobe and a trasmitted lobe, the respective weights of both
* It is approximated by a reflected lobe and a transmitted lobe, the respective weights of both
* lobes are analytically computed by summing up infinite geometric series that account for
* internal reflections.
*

View file

@ -480,7 +480,7 @@ class VIEW3D_OT_vr_location_scouting_viewfinder_apply_action(Operator):
return {'FINISHED'}
if xr_viewfinder.active_mode == 'PLAYBACK':
# Playblack control.
# Playback control.
if len(captures) == 0:
return {'FINISHED'}

View file

@ -108,7 +108,7 @@ def protect_format_seq(msg):
elif idx < (ln - 1) and msg[idx] == '{':
# The whole 'format' syntax...
# Coverage of this one is still fairly limited and basic currently.
# TODO: suport more of the 'format' mini-language (and check how much fmt::format matches with Python's).
# TODO: support more of the 'format' mini-language (and check how much fmt::format matches with Python's).
orig_dlt = dlt
valid_format = False

View file

@ -76,7 +76,7 @@ def save_project(project, report=None):
- There is no project to save.
- The project's root path is relative or doesn't exist.
- The project can't be written due to any of a number of filesystem
- The project can't be written due to any of a number of file-system
issues (directory isn't writable, etc.).
Optionally takes an `Operator.report` for reporting errors to the user.
@ -107,7 +107,7 @@ def save_project(project, report=None):
raise ProjectSaveException
except PermissionError:
if report:
report({'ERROR'}, rpt_("Cannot access '{:s}' due to filesystem permissions.").format(PROJECT_DIR))
report({'ERROR'}, rpt_("Cannot access '{:s}' due to file-system permissions.").format(PROJECT_DIR))
raise ProjectSaveException
except Exception as e:
if report:
@ -125,7 +125,7 @@ def save_project(project, report=None):
raise ProjectSaveException
except PermissionError:
if report:
report({'ERROR'}, rpt_("Cannot create '{:s}' directory due to filesystem permissions.").format(PROJECT_DIR))
report({'ERROR'}, rpt_("Cannot create '{:s}' directory due to file-system permissions.").format(PROJECT_DIR))
raise ProjectSaveException
except Exception as e:
if report:
@ -144,7 +144,7 @@ def save_project(project, report=None):
tomli_w.dump(config_dict, f)
except PermissionError:
if report:
report({'ERROR'}, rpt_("Cannot write to '{:s}' due to filesystem permissions.").format(PROJECT_CONFIG))
report({'ERROR'}, rpt_("Cannot write to '{:s}' due to file-system permissions.").format(PROJECT_CONFIG))
raise ProjectSaveException
except Exception as e:
if report:
@ -215,7 +215,7 @@ def read_project_toml_config(root_path, report=None):
Read the project config for the given project root path.
Throws a ProjectLoadException if no config is found, if the config is
not readable due to filesystem permissions, or if it's not a valid
not readable due to file-system permissions, or if it's not a valid
project config (e.g. contains invalid TOML or doesn't match the schema).
Optionally takes an `Operator.report` for reporting errors to the user.
@ -235,7 +235,7 @@ def read_project_toml_config(root_path, report=None):
raise ProjectLoadException
except PermissionError:
if report:
report({'ERROR'}, rpt_("Cannot access {:s} file due to filesystem permissions.").format(PROJECT_CONFIG))
report({'ERROR'}, rpt_("Cannot access {:s} file due to file-system permissions.").format(PROJECT_CONFIG))
raise ProjectLoadException
except tomllib.TOMLDecodeError as e:
if report:

View file

@ -139,7 +139,7 @@ class AssetLibrary {
* are any remote libraries included).
*
* The "Allow Online Access" option will be enforced internally, but probably some check to give
* a user message should be done at a higher levl.
* a user message should be done at a higher level.
*/
virtual void force_remote_listing_download() const;

View file

@ -154,7 +154,7 @@ AssetLibrary *AssetLibraryService::get_preferences_remote_asset_library(
const StringRefNull remote_url = custom_library.remote_url;
/* Lock for the entire "lookup and if not found -> create and insert" scope, so no two threads do
* this in parallel and interfer with each other. */
* this in parallel and interfere with each other. */
std::scoped_lock lock{remote_libraries_mutex_};
std::unique_ptr<PreferencesRemoteAssetLibrary> *lib_uptr_ptr = remote_libraries_.lookup_ptr(
@ -186,7 +186,7 @@ AssetLibrary *AssetLibraryService::get_asset_library_on_disk(
const std::string normalized_root_path = utils::normalize_directory_path(root_path);
/* Lock for the entire "lookup and if not found -> create and insert" scope, so no two threads do
* this in parallel and interfer with each other. */
* this in parallel and interfere with each other. */
std::scoped_lock lock{on_disk_libraries_mutex_};
if (OnDiskAssetLibrary *lib = this->lookup_on_disk_library(library_type, normalized_root_path)) {

View file

@ -285,7 +285,7 @@ bool AssetRepresentation::is_online_only() const
}
/* An asset is considered 'online' if there is no file on disk for it.
*
* About also allowinmg UNSET: This function is (indirectly) called from all kinds of
* About also allowing UNSET: This function is (indirectly) called from all kinds of
* places, like `get_node_tools_type_data()` in `node_group_operators.cc` to figure out which
* node tools are available. Since that happens on startup, the actual on-disk file status may
* not have been checked yet. Until that time, just assume that having `online_info_` means "it

View file

@ -35,7 +35,7 @@ class BlenderProject {
* This should generally be an absolute path to a directory that exists, is
* accessible, and contains a ".blender_project" directory with the project's
* config in it. This is not, however, guaranteed because via Python a project
* can be initialized with an arbitrary path, or the filesystem could have
* can be initialized with an arbitrary path, or the file-system could have
* been modified since the project was loaded, etc.
*/
std::string root_path_;

View file

@ -1596,7 +1596,7 @@ static bool image_memorypack_imbuf_for_autosave(
imapf->tile_number = tile_number;
BLI_addtail(&ima->autosave_packedfiles, imapf);
/* We should not clear the dirty flag when autosaving */
/* We should not clear the dirty flag when auto-saving. */
return true;
}

View file

@ -3990,7 +3990,7 @@ void BKE_lib_override_library_main_resync(
}
if (view_layer) {
CLOG_WARN(&LOG_RESYNC,
"Provided scene '%s' is not local, using instead local scene '%s', viewlayer "
"Provided scene '%s' is not local, using instead local scene '%s', view-layer "
"'%s' as container for the library override leftover collections and objects",
BKE_id_name(scene->id),
BKE_id_name(new_scene->id),

View file

@ -223,7 +223,7 @@ static void url_ensure_trailing_slash(char *str, const size_t max_len)
void BKE_preferences_remote_asset_library_url_set(bUserAssetLibrary *library,
const StringRef remote_url)
{
/* Always trim whitespace off of URLs. */
/* Always trim white-space off of URLs. */
remote_url.trim().copy_bytes_truncated(library->remote_url);
const bool ends_in_top_meta_file = asset_system::remote_library_url_ends_with_top_meta_file_name(

View file

@ -299,7 +299,7 @@ static void version_compositor_effect_initialized(Main &bmain)
{
/* A file with compositor effects that was saved, opened in
* previous version and saved there, would have lost the
* compositor effect data since ealier versions would not
* compositor effect data since earlier versions would not
* write it. Ensure the effect data is not null. */
for (Scene &scene : bmain.scenes) {
if (scene.ed) {

View file

@ -48,7 +48,7 @@ void blo_do_versions_530(FileData * /*fd*/, Library * /*lib*/, Main *bmain)
wpaint->paint.brush_asset_reference->relative_asset_identifier;
if (wpaint->paint.brush == nullptr && old_asset_id.endswith("Paint")) {
/* The "Paint" brush asset was renamed to "Add Weight", find it via the default instead
* of hardcoding the new name. */
* of hard-coding the new name. */
if (std::optional<AssetWeakReference> paint_brush_asset_reference =
BKE_paint_brush_type_default_reference(PaintMode::Weight,
WPAINT_BRUSH_TYPE_DRAW))

View file

@ -53,7 +53,7 @@ void comp_main([[resource_table]] Resources &srt, [[global_invocation_id]] const
{
/* Slight focus distance */
slight_focus_texel *= srt.dof_buf.bokeh_anisotropic_scale_inv;
/* Note that `atan(y,x)` is unsed for x = 0 or y = 0. */
/* Note that `atan(y,x)` is unused for `x = 0` or `y = 0`. */
float theta = atan(slight_focus_texel.y + 1e-8f, -slight_focus_texel.x + 1e-8f) + M_TAU;
slight_focus_texel /= circle_to_polygon_radius(srt.dof_buf.bokeh_blades,
theta + srt.dof_buf.bokeh_rotation);

View file

@ -965,7 +965,7 @@ struct FilmDisplay {
[[push_constant]] bool display_only;
};
/* Accumulate and output to the render framebuffer.
/* Accumulate and output to the render frame-buffer.
* Used for viewport. */
[[fragment]]
void accumulate_or_display_frag([[resource_table]] const FilmDisplay &srt,

View file

@ -17,7 +17,7 @@ VERTEX_SHADER_CREATE_INFO(eevee_clip_plane)
#include "eevee_nodetree_vert_lib.glsl"
#include "eevee_pipeline.bsl.hh"
#include "eevee_reverse_z_lib.bsl.hh"
#include "eevee_sampling_shared.hh" /* TODO(fclem): Remove. Needed becaused of fragment shader. */
#include "eevee_sampling_shared.hh" /* TODO(fclem): Remove. Needed because of fragment shader. */
#include "eevee_shadow_shared.hh"
#include "eevee_surf_common.bsl.hh"
#include "eevee_velocity.bsl.hh"

View file

@ -354,7 +354,7 @@ void raycast_eval([[maybe_unused]] float3 position,
#if defined(MAT_RAYCAST)
if (!uni.pipeline_buf.can_raycast) {
/* We can't raycast on prepass for raycast visibile objects.
/* We can't ray-cast on pre-pass for ray-cast visible objects.
* We use a UBO property to avoid compiling more shader variants. */
return;
}

View file

@ -155,7 +155,7 @@ void surf_deferred([[resource_table]] PipelineConstants &pipe,
/* ----- GBuffer output ----- */
gbuffer::InputClosures gbuf_data;
/* Make sure we we do not read uninitialized data (see #159161). */
/* Make sure we do not read uninitialized data (see #159161). */
if (pipe.closure_bin_count == 0) [[static_branch]] {
gbuf_data.closure[0] = ClosureUndetermined{};
}

View file

@ -199,7 +199,7 @@ void surf_hybrid([[resource_table]] PipelineConstants &pipe,
/* ----- GBuffer output ----- */
gbuffer::InputClosures gbuf_data;
/* Make sure we we do not read uninitialized data (see #159161). */
/* Make sure we do not read uninitialized data (see #159161). */
if (pipe.closure_bin_count == 0) [[static_branch]] {
gbuf_data.closure[0] = ClosureUndetermined{};
}

View file

@ -5503,8 +5503,9 @@ static void achannel_setting_widget_cb(bContext *C, void *ale_npoin, void *setti
}
}
/* Determine if element pointed by @iter belongs to the same 'isolate visibility path' wrt to
* @target
/**
* Determine if element pointed by `iter` belongs to the same "isolate visibility path" WRT to
* `target`.
*/
static bool anim_list_el_is_visibility_related_or_self(const bAnimListElem *target,
const bAnimListElem *iter)

View file

@ -22,7 +22,7 @@ namespace blender::ed::asset::index {
* Filename prefix for the Disk File Hash Service used by FileStatusChecker.
*
* The Disk File Hash Service itself will complete the filename depending on the back-end used. At
* the moment of writing that's SQLite, which'll append `_v{schema version}.sqlite`.
* the moment of writing that's SQLite, which will append `_v{schema version}.sqlite`.
*/
constexpr const char *hash_service_filename_prefix = "_file_hashes";

View file

@ -1709,7 +1709,7 @@ void file_draw_list(const bContext *C, ARegion *region)
void file_draw_banner(const bContext *C, const SpaceFile *sfile, ARegion *region)
{
/* Passed into lambda as block idname. */
/* Passed into lambda as block ID-name. */
static const char *funcname = __func__;
file_banners_for_first_visible(*sfile, [&](const BannerType &banner) {

View file

@ -2326,7 +2326,7 @@ static wmOperatorStatus outliner_liboverride_property_remove_exec(bContext *C, w
void OUTLINER_OT_liboverride_property_remove(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Outliner Library Override Propery Remove";
ot->name = "Outliner Library Override Properly Remove";
ot->idname = "OUTLINER_OT_liboverride_property_remove";
ot->description =
"Remove the selected library override properties, and reset the relevant data to the linked "

View file

@ -22,7 +22,7 @@ void userpref_panels_register(ARegionType &region_type)
{
PanelType *panel_type = MEM_new_zeroed<PanelType>(__func__);
/* TODO panel should be renamed to just "USERPREF_PT_asset_libraries, it's not contained in the
* file paths section anymore. This is a compability breaking change though. */
* file paths section anymore. This is a compatibility breaking change though. */
STRNCPY_UTF8(panel_type->idname, "USERPREF_PT_file_paths_asset_libraries");
STRNCPY_UTF8(panel_type->label, N_("Asset Libraries"));
STRNCPY_UTF8(panel_type->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);

View file

@ -162,7 +162,7 @@ static wmOperatorStatus vr_location_scouting_capture_review_invoke(bContext *C,
{
/* Operator invoked while already running, toggle off. */
if (vr_location_scouting_capture_review_get_running_state(C)) {
/* Set the running state (stored on the WM) to false, catched by the running operator modal. */
/* Set the running state (stored on the WM) to false, cached by the running operator modal. */
vr_location_scouting_capture_review_set_running_state(C, false);
return OPERATOR_CANCELLED;
}
@ -193,7 +193,8 @@ static wmOperatorStatus vr_location_scouting_capture_review_invoke(bContext *C,
op_data->cam_ob = BKE_id_new_nomain<Object>("ReviewCaptureCamera");
op_data->cam_ob->type = OB_CAMERA;
/* Lock rotation to prevent user from exiting the review camera view. Re-using quadview flags. */
/* Lock rotation to prevent user from exiting the review camera view.
* Re-using quad-view flags. */
rv3d->viewlock |= RV3D_LOCK_ROTATION;
op_data->cam_data = BKE_id_new_nomain<Camera>("ReviewCaptureCameraData");

View file

@ -16,9 +16,11 @@ struct Mesh;
namespace blender::geometry {
/** \warning Each of following enum values are saved in files.
* Currently, they also need to be in synch with values in bmesh_opdefines.h
* and DNA_modifier_types.h. */
/**
* \warning Each of following enum values are saved in files.
* Currently, they also need to be in sync with values in `bmesh_opdefines.h`
* and `DNA_modifier_types.h`.
*/
enum class BevelAffect {
Vertices = 0,
Edges = 1,
@ -52,7 +54,7 @@ struct BevelParameters {
* Endpoint values (index 0 and last) are always (1,0) and (0,1) so that
* they align with the bevel strip corners, matching the #CurveProfile convention. */
Array<float2> custom_profile_samples;
/** Blender units to offset eacjh end of each edge.
/** Blender units to offset each end of each edge.
* A 4d Array of Arrays indexed by mesh edge id.
* If affect_type is Edges or Faces, these are in order: source end (left, right), destination
* end (left, right), viewed from the source end looking towards the destination end,

View file

@ -5774,7 +5774,7 @@ static VMesh pipe_adj_vmesh(BevelState &state, BevVert *bv, BoundVert *vpipe);
static VMesh square_out_adj_vmesh(BevelState &state, BevVert *bv);
/**
* Main vmesh builder for a single bevelled vertex.
* Main vmesh builder for a single beveled vertex.
* Allocates the #NewVert grid, creates boundary vertices in #ExtendableMesh,
* computes profile coordinates, then dispatches to the appropriate per-kind builder.
*/

View file

@ -801,7 +801,7 @@ Shader *ShaderCompiler::compile(const shader::ShaderCreateInfo &orig_info, bool
ShaderCreateInfo specialized_info = orig_info;
/* WORKAROUND: For BSL shaders, allow to disable costly builtins programatically. */
/* WORKAROUND: For BSL shaders, allow to disable costly builtins programmatically. */
if (bool(specialized_info.builtins_ & BuiltinBits::NO_VIEWPORT_INDEX)) {
specialized_info.builtins_ &= ~BuiltinBits::VIEWPORT_INDEX;
}

View file

@ -483,7 +483,7 @@ enum class BuiltinBits {
/* On metal, tag the shader to use argument buffer to overcome the 16 sampler limit. */
USE_SAMPLER_ARG_BUFFER = (1 << 20),
/* WORKAROUND: Used to disable viewport index programatically. */
/* WORKAROUND: Used to disable viewport index programmatically. */
NO_VIEWPORT_INDEX = (1 << 16),
/* Disable our own GPU shader preprocessor optimizer in case we can't ensure the
* input is within spec. */

View file

@ -102,7 +102,7 @@ Texture *GLTexturePool::acquire_texture_impl(int3 extent,
if (match_index != -1) {
texture_handle.texture = pool_[match_index].texture;
pool_.remove_and_reorder(match_index);
/* Overide the usage. It doesn't really apply to OpenGL in practice, but `GPU_texture_usage`
/* Override the usage. It doesn't really apply to OpenGL in practice, but `GPU_texture_usage`
* callers may still rely on it. */
texture_handle.texture->usage_set(usage | GPU_TEXTURE_USAGE_FORMAT_VIEW);
}

View file

@ -86,7 +86,7 @@
/* Fragment shader color input index for subpass input.
* `sampler_type` is the type of image to bind to this (e.g. usampler2DArray).
* It must be compatible with the framebuffer attachment type. */
* It must be compatible with the frame-buffer attachment type. */
# define subpass_input(index, sampler_type) maybe_unused
/* Fragment shader output. */

View file

@ -45,7 +45,7 @@ ExrWriteHandle *IMB_exr_write_begin(bool write_multipart = false);
void IMB_exr_write_view(ExrWriteHandle *handle, const char *viewname);
/**
* Add pass containing multiple multiple channels to EXR file.
* Add pass containing multiple channels to EXR file.
* The number of channels is determined by channelnames.size() with
* each character a channel name.
* Layer and pass name, view name and colorspace are all optional.

View file

@ -190,7 +190,7 @@ static proxy_output_ctx *alloc_proxy_output_ffmpeg(MovieReader *anim,
/* Use same output timebase as input: we seek within the proxy file
* using exact same frame numbers as if it was original file. So we want to
* match original framerate, plus any variable frames in the source file. */
* match original frame-rate, plus any variable frames in the source file. */
rv->output_timebase = st->time_base;
rv->c->time_base = st->time_base;
rv->st->time_base = st->time_base;

View file

@ -48,7 +48,7 @@ uint64_t EmittedGeometryKey::hash() const
static bool object_disables_geometry_sharing(Scene *scene, eEvaluationMode mode, Object *ob)
{
/* Metaballs are merged together. */
/* Meta-balls are merged together. */
if (ob->type == OB_MBALL) {
return true;
}

View file

@ -2168,8 +2168,8 @@ void rna_NodesModifierBake_override_diff(Main *bmain, RNAPropertyOverrideDiffCon
if (nmd_bake_a->id != nmd_bake_b->id) {
/* Bakes for different nodes, cannot do anything else here, ignore. */
/* NOTE: Not sure if this can actually happen? Maybe in case the user assigns a different
* nodetree in the overridden version of the modifier, which happens to have exactly the same
* amount of bake nodes? */
* node-tree in the overridden version of the modifier, which happens to have exactly the
* same amount of bake nodes? */
BLI_assert_unreachable();
continue;
}
@ -2288,7 +2288,7 @@ bool rna_NodesModifierBake_override_apply(Main *bmain,
/* Ignore index-based default 'destination item' defined by the generic liboverride apply code
* and stored in RNAPropertyOverrideApplyContext::ptr_item_dst, as changes in source linked
* nodetree may have re-ordered its bakes. Instead, lookup by bake id. */
* node-tree may have re-ordered its bakes. Instead, lookup by bake id. */
NodesModifierData *nmd_dst = ptr_dst->data_as<NodesModifierData>();
NodesModifierBake *nmd_bake_dst = nmd_dst->find_bake(nmd_bake_src->id);
if (!nmd_bake_dst) {

View file

@ -86,7 +86,7 @@ bool BPY_run_text(bContext *C, Text *text, ReportList *reports, bool do_jump) AT
* \{ */
/**
* Compile the python expression and \return true if no errors occured during compilation,
* Compile the python expression and \return true if no errors occurred during compilation,
* otherwise \return false.
*
* \param C: Optional context (may be null).

View file

@ -251,7 +251,7 @@ static bool wm_xr_viewfinder_get_capture_mat(const XrSessionSettings *settings,
const float height_offset = (viewfinder_height / 2) * wmXrViewfinderState::xr_ui_unit_fac * -1;
const float viewfinder_vertical_offset = base_controller_offset + height_offset;
/* Obtain viewfinder capture mat from the choosen controller grip mat. */
/* Obtain viewfinder capture mat from the chosen controller grip mat. */
float viewfinder_mat[4][4];
copy_m4_m4(viewfinder_mat, viewfinder_controller->grip_mat);
translate_m4(viewfinder_mat, 0.0f, 0.0f, viewfinder_vertical_offset);
@ -395,7 +395,7 @@ void wm_xr_viewfinder_render_view(wmXrData *xr_data)
float viewfinder_winmat[4][4];
copy_m4_m4(viewfinder_winmat, cam_render_params.winmat);
/* Set viewfinder View3D draw flags, using base XR draw flags with some overriden exceptions. */
/* Set viewfinder View3D draw flags, using base XR draw flags with some overridden exceptions. */
int viewfinder_draw_flags = V3D_OFSDRAW_OVERRIDE_SCENE_SETTINGS | settings->draw_flags;
viewfinder_draw_flags &= ~V3D_OFSDRAW_SHOW_SELECTION; /* Always hide selection outlines. */
viewfinder_draw_flags &= ~V3D_OFSDRAW_XR_SHOW_CONTROLLERS; /* Always hide other XR controller. */