Cleanup: spelling in comments, variables

This commit is contained in:
Campbell Barton 2023-11-27 09:37:29 +11:00
parent e084553e88
commit 27c660707d
31 changed files with 52 additions and 50 deletions

View File

@ -213,35 +213,35 @@ float safe_snoise(vector4 p)
return value; \
}
/* Noise fBM */
/* Noise fBM. */
NOISE_FBM(float)
NOISE_FBM(vector2)
NOISE_FBM(vector3)
NOISE_FBM(vector4)
/* Noise Multifractal */
/* Noise Multi-fractal. */
NOISE_MULTI_FRACTAL(float)
NOISE_MULTI_FRACTAL(vector2)
NOISE_MULTI_FRACTAL(vector3)
NOISE_MULTI_FRACTAL(vector4)
/* Noise Hetero Terrain */
/* Noise Hetero Terrain. */
NOISE_HETERO_TERRAIN(float)
NOISE_HETERO_TERRAIN(vector2)
NOISE_HETERO_TERRAIN(vector3)
NOISE_HETERO_TERRAIN(vector4)
/* Noise Hybrid Multifractal */
/* Noise Hybrid Multi-fractal. */
NOISE_HYBRID_MULTI_FRACTAL(float)
NOISE_HYBRID_MULTI_FRACTAL(vector2)
NOISE_HYBRID_MULTI_FRACTAL(vector3)
NOISE_HYBRID_MULTI_FRACTAL(vector4)
/* Noise Ridged Multifractal */
/* Noise Ridged Multi-fractal. */
NOISE_RIDGED_MULTI_FRACTAL(float)
NOISE_RIDGED_MULTI_FRACTAL(vector2)

View File

@ -11,11 +11,11 @@ ccl_device_noinline void svm_node_tex_white_noise(KernelGlobals kg,
ccl_private float *stack,
uint dimensions,
uint inputs_stack_offsets,
uint ouptuts_stack_offsets)
uint outputs_stack_offsets)
{
uint vector_stack_offset, w_stack_offset, value_stack_offset, color_stack_offset;
svm_unpack_node_uchar2(inputs_stack_offsets, &vector_stack_offset, &w_stack_offset);
svm_unpack_node_uchar2(ouptuts_stack_offsets, &value_stack_offset, &color_stack_offset);
svm_unpack_node_uchar2(outputs_stack_offsets, &value_stack_offset, &color_stack_offset);
float3 vector = stack_load_float3(stack, vector_stack_offset);
float w = stack_load_float(stack, w_stack_offset);

View File

@ -643,7 +643,7 @@ GHOST_TKey GHOST_SystemWin32::processSpecialKey(short vKey, short /*scanCode*/)
key = GHOST_kKeyAccentGrave;
break;
case u'i':
/* `i` key on Turkish kbd. */
/* `i` key on Turkish keyboard. */
key = GHOST_kKeyI;
break;
default:

View File

@ -973,7 +973,7 @@ bool BLF_get_vfont_metrics(int fontid, float *ascend_ratio, float *em_ratio, flo
return false;
}
/* Copied without change from vfontdata_freetype.cc to ensure consistant sizing. */
/* Copied without change from vfontdata_freetype.cc to ensure consistent sizing. */
/* Blender default BFont is not "complete". */
const bool complete_font = (font->face->ascender != 0) && (font->face->descender != 0) &&

View File

@ -160,7 +160,7 @@ void BKE_curve_editNurb_keyIndex_delCV(GHash *keyindex, const void *cv);
void BKE_curve_editNurb_keyIndex_free(GHash **keyindex);
void BKE_curve_editNurb_free(Curve *cu);
/**
* Get list of nurbs from edit-nurbs ure.
* Get list of nurbs from edit-nurbs structure.
*/
ListBase *BKE_curve_editNurbs_get(Curve *cu);
const ListBase *BKE_curve_editNurbs_get_for_read(const Curve *cu);

View File

@ -8,7 +8,7 @@
*/
#include "BLI_compiler_attrs.h"
#include "DNA_gpencil_modifier_types.h" /* needed for all enum typdefs */
#include "DNA_gpencil_modifier_types.h" /* Needed for all enum type definitions. */
#ifdef __cplusplus
extern "C" {

View File

@ -107,7 +107,7 @@ bool BKE_lib_override_library_is_hierarchy_leaf(Main *bmain, ID *id);
/**
* Tag the liboverride ID for auto-refresh when it gets tagged for depsgraph update.
*
* NOTE: This should only handle direct user editing, it is assumed that indirct updates should
* NOTE: This should only handle direct user editing, it is assumed that indirect updates should
* never require an update of the liboverride diffing info.
*/
void BKE_lib_override_id_tag_on_deg_tag_from_user(ID *id);

View File

@ -9,7 +9,7 @@
#include "BLI_compiler_attrs.h"
#include "BLI_math_matrix_types.hh"
#include "DNA_modifier_types.h" /* needed for all enum typdefs */
#include "DNA_modifier_types.h" /* Needed for all enum type definitions. */
#include "BKE_customdata.hh"
@ -81,7 +81,7 @@ enum ModifierTypeFlag {
/**
* For modifiers that require original data and so cannot
* be placed after any non-deformative modifier.
* be placed after any non-deforming modifier.
*/
eModifierTypeFlag_RequiresOriginalData = (1 << 5),

View File

@ -356,7 +356,7 @@ std::optional<BoundBox> BKE_object_boundbox_get(Object *ob);
void BKE_object_dimensions_get(Object *ob, float r_vec[3]);
/**
* Retrieve the bounds of the evalauted object's geometry, stored on the original object as part of
* Retrieve the bounds of the evaluated object's geometry, stored on the original object as part of
* the latest dependency graph evaluation, or fall back to the current bounds of the object if no
* such cache exists. For evaluated objects this indirection is unnecessary, so
* #BKE_object_boundbox_get should be used instead.

View File

@ -8,7 +8,7 @@
*/
#include "BLI_compiler_attrs.h"
#include "DNA_shader_fx_types.h" /* needed for all enum typdefs */
#include "DNA_shader_fx_types.h" /* Needed for all enum type definitions. */
#ifdef __cplusplus
extern "C" {

View File

@ -430,7 +430,7 @@ void BKE_lib_override_id_tag_on_deg_tag_from_user(ID *id)
}
/* NOTE: Valid relationships between IDs here (especially the beloved ObData <-> ShapeKey special
* case) cannot be always expected when ID get tagged. So now, embedded IDs and similar also get
* tagged, and the 'liboverride refresh' code is responsible to properly progagate the update to
* tagged, and the 'liboverride refresh' code is responsible to properly propagate the update to
* the owner ID when needed (see #BKE_lib_override_library_main_operations_create). */
id->tag |= LIB_TAG_LIBOVERRIDE_AUTOREFRESH;
}
@ -4384,7 +4384,7 @@ void BKE_lib_override_library_main_operations_create(Main *bmain,
if (ID_IS_LINKED(id) || !ID_IS_OVERRIDE_LIBRARY_REAL(id)) {
continue;
}
/* Propagate potential embedded data tagg to the owner ID (see also
/* Propagate potential embedded data tag to the owner ID (see also
* #BKE_lib_override_id_tag_on_deg_tag_from_user). */
if (Key *key = BKE_key_from_id(id)) {
if (key->id.tag & LIB_TAG_LIBOVERRIDE_AUTOREFRESH) {

View File

@ -1097,7 +1097,7 @@ void BKE_mesh_nomain_to_mesh(Mesh *mesh_src, Mesh *mesh_dst, Object *ob)
}
}
/* Caches can have a large memory impact and aren't necessarily used, so don't indiscriminantly
/* Caches can have a large memory impact and aren't necessarily used, so don't indiscriminately
* store all of them in the #Main data-base mesh. However, some caches are quite small and
* copying them is "free" relative to how much work would be required if the data was needed. */
copy_loose_vert_hint(*mesh_src, *mesh_dst);

View File

@ -477,7 +477,7 @@ static void gather_attributes(const Span<AttributeIDRef> ids,
void mesh_remesh_reproject_attributes(const Mesh &src, Mesh &dst)
{
/* Gather attributes to tranfer for each domain. This makes it possible to skip
/* Gather attributes to transfer for each domain. This makes it possible to skip
* building index maps and even the main BVH tree if there are no attributes. */
const AttributeAccessor src_attributes = src.attributes();
Vector<AttributeIDRef> point_ids;

View File

@ -2,7 +2,7 @@
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/* The in-paint operation uses a jump flood algorithm to flood the region to be inpainted with the
/* The in-paint operation uses a jump flood algorithm to flood the region to be in-painted with the
* pixels at its boundary. The algorithms expects an input image whose values are those returned by
* the initialize_jump_flooding_value function, given the texel location and a boolean specifying
* if the pixel is a boundary one.

View File

@ -28,7 +28,7 @@ void main()
float distance_to_boundary = distance(vec2(texel), vec2(closest_boundary_texel));
imageStore(distance_to_boundary_img, texel, vec4(distance_to_boundary));
/* We follow this shader by a blur shader that smoothes out the inpainting region, where the blur
/* We follow this shader by a blur shader that smooths out the inpainting region, where the blur
* radius is the radius of the circle that touches the boundary. We can imagine the blur window
* to be inscribed in that circle and thus the blur radius is the distance to the boundary
* divided by square root two. As a performance optimization, we limit the blurring to areas that

View File

@ -92,7 +92,7 @@ class World {
void sync_volume();
/* Returns a dummy black world for when a valid world isn't present or when we want to suppress
* any light comming from the world. */
* any light coming from the world. */
::World *default_world_get();
};

View File

@ -167,7 +167,7 @@ void horizon_scan_context_sample_finish(
vec3 sample_radiance = horizon_scan_sample_radiance(sample_uv);
/* Take emitter surface normal into consideration. */
vec3 sample_normal = horizon_scan_sample_normal(sample_uv);
/* Discard backfacing samples.
/* Discard back-facing samples.
* The paper suggests a smooth test which is not physically correct since we
* already consider the sample reflected radiance.
* Set the weight to allow energy conservation. If we modulate the radiance, we loose energy. */

View File

@ -1329,13 +1329,13 @@ static void GREASE_PENCIL_OT_stroke_switch_direction(wmOperatorType *ot)
* \{ */
enum class CapsMode : int8_t {
/* Switchs both to Flat. */
/* Switches both to Flat. */
FLAT,
/* Change only start. */
START,
/* Change only end. */
END,
/* Switchs both to default rounded. */
/* Switches both to default rounded. */
ROUND,
};

View File

@ -369,7 +369,7 @@ static void ui_popup_block_position(wmWindow *window,
dir2 |= (UI_DIR_LEFT | UI_DIR_RIGHT);
}
/* Popovers don't need secondary direction. Pulldowns to
/* Popovers don't need secondary direction. Pull-downs to
* the left or right are currently not supported. */
const bool no_2nd_dir = (but->type == UI_BTYPE_POPOVER || ui_but_menu_draw_as_popover(but) ||
dir1 & (UI_DIR_RIGHT | UI_DIR_LEFT));

View File

@ -4751,7 +4751,7 @@ static int widget_roundbox_set(uiBut *but, rcti *rect)
if (but->active && (but->type != UI_BTYPE_POPOVER) && !ui_but_menu_draw_as_popover(but)) {
const int direction = ui_but_menu_direction(but);
/* Pulldown menus that open above or below a button can have more than one direction. */
/* Pull-down menus that open above or below a button can have more than one direction. */
if (direction & UI_DIR_UP) {
roundbox &= ~(UI_CNR_TOP_RIGHT | UI_CNR_TOP_LEFT);
}

View File

@ -2572,7 +2572,7 @@ static int make_override_library_invoke(bContext *C, wmOperator *op, const wmEve
blender::VectorSet<Collection *> potential_root_collections;
LISTBASE_FOREACH (Collection *, collection, &bmain->collections) {
/* Only check for linked collections from the same library, in the current viewlayer. */
/* Only check for linked collections from the same library, in the current view-layer. */
if (!ID_IS_LINKED(&collection->id) || collection->id.lib != obact->id.lib ||
!BKE_view_layer_has_collection(view_layer, collection))
{

View File

@ -115,7 +115,7 @@ static int text_font_draw(const TextDrawContext *tdc,
char fmt_prev = 0xff;
for (int a = 0; a < str_len; a++) {
if (format[a] != fmt_prev) {
/* Change of format so ouptut the previous section. */
/* Change of format so output the previous section. */
if (a - str_pos > 0) {
BLF_position(tdc->font_id, x + (columns * tdc->cwidth_px), y, 0);
columns += BLF_draw_mono(

View File

@ -1386,7 +1386,7 @@ static void p_polygon_kernel_center(float (*points)[2], int npoints, float *cent
/* Simplify/Complexity
*
* This is currently used for elminating degenerate vertex coordinates.
* This is currently used for eliminating degenerate vertex coordinates.
* In the future this can be used for efficient unwrapping of high resolution
* charts at lower resolution. */

View File

@ -539,7 +539,7 @@ typedef enum eGPUTextureUsage {
GPU_TEXTURE_USAGE_SHADER_WRITE = (1 << 1),
/* Whether a texture is used as an attachment in a frame-buffer. */
GPU_TEXTURE_USAGE_ATTACHMENT = (1 << 2),
/* Whether a texture is used to create a texture view utilising a different texture format to the
/* Whether a texture is used to create a texture view utilizing a different texture format to the
* source textures format. This includes the use of stencil views. */
GPU_TEXTURE_USAGE_FORMAT_VIEW = (1 << 3),
/* Whether the texture needs to be read from by the CPU. */

View File

@ -166,35 +166,35 @@
return value; \
}
/* Noise fBM */
/* Noise fBM. */
NOISE_FBM(float)
NOISE_FBM(vec2)
NOISE_FBM(vec3)
NOISE_FBM(vec4)
/* Noise Multifractal */
/* Noise Multi-fractal. */
NOISE_MULTI_FRACTAL(float)
NOISE_MULTI_FRACTAL(vec2)
NOISE_MULTI_FRACTAL(vec3)
NOISE_MULTI_FRACTAL(vec4)
/* Noise Hetero Terrain */
/* Noise Hetero Terrain. */
NOISE_HETERO_TERRAIN(float)
NOISE_HETERO_TERRAIN(vec2)
NOISE_HETERO_TERRAIN(vec3)
NOISE_HETERO_TERRAIN(vec4)
/* Noise Hybrid Multifractal */
/* Noise Hybrid Multi-fractal. */
NOISE_HYBRID_MULTI_FRACTAL(float)
NOISE_HYBRID_MULTI_FRACTAL(vec2)
NOISE_HYBRID_MULTI_FRACTAL(vec3)
NOISE_HYBRID_MULTI_FRACTAL(vec4)
/* Noise Ridged Multifractal */
/* Noise Ridged Multi-fractal. */
NOISE_RIDGED_MULTI_FRACTAL(float)
NOISE_RIDGED_MULTI_FRACTAL(vec2)

View File

@ -224,7 +224,7 @@ void node_noise_tex_fbm_4d(vec3 co,
NOISE_FRACTAL_DISTORTED_4D(noise_fbm)
}
/* Noise Multifractal */
/* Noise Multi-fractal. */
void node_noise_tex_multi_fractal_1d(vec3 co,
float w,
@ -396,7 +396,7 @@ void node_noise_tex_hetero_terrain_4d(vec3 co,
NOISE_FRACTAL_DISTORTED_4D(noise_hetero_terrain)
}
/* Noise Hybrid Multifractal */
/* Noise Hybrid Multi-fractal. */
void node_noise_tex_hybrid_multi_fractal_1d(vec3 co,
float w,
@ -482,7 +482,7 @@ void node_noise_tex_hybrid_multi_fractal_4d(vec3 co,
NOISE_FRACTAL_DISTORTED_4D(noise_hybrid_multi_fractal)
}
/* Noise Ridged Multifractal */
/* Noise Ridged Multi-fractal. */
void node_noise_tex_ridged_multi_fractal_1d(vec3 co,
float w,

View File

@ -1,4 +1,4 @@
/* SPDX-FileCopyrightText: 2023 Blender Authorss
/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
@ -14,14 +14,14 @@ namespace blender::gpu {
class VKDevice;
/**
* A timeline semaphore is a special semaphore type used to syncronize between commands and
* resource usage in a time aware fasion.
* A timeline semaphore is a special semaphore type used to synchronize between commands and
* resource usage in a time aware fashion.
*
* Synchronization is a core part of Vulkan and the Timeline Semaphore is a utility that
* Synchronization is a core part of VULKAN and the Timeline Semaphore is a utility that
* facilitates its implementation in Blender.
*
* There are resources that needs to be tracked in time in order to know when to submit, free or
* reuse these resource. Some usecases are:
* reuse these resource. Some use cases are:
*
* - Command buffers can only be reset or freed when they are executed on the device. When the
* command buffers are still pending for execution they may not be reused or freed.
@ -34,7 +34,7 @@ class VKDevice;
* For each device queue a timeline semaphore should be constructed. Every time when a command
* buffer is submitted the submission will wait for the current timeline value to be completed.
* Locally the command buffer can keep track of the timeline value when submitting commands so
* `gpuFinish` could be implemented is a context aware fasion.
* `gpuFinish` could be implemented is a context aware fashion.
*
* #VKTimelineSemaphore::Value can be stored locally. By calling the wait function you can ensure
* that at least the given value has been finished.

View File

@ -34,8 +34,8 @@ static void set_light_extents(const pxr::UsdPrim &prim, const pxr::UsdTimeCode t
boundable.CreateExtentAttr().Set(extent, time);
}
/* We're intentionally not erroring on non-boundable lights,
* because the error spam can be annoying. */
/* We're intentionally not setting an error on non-boundable lights,
* because overly noisy errors are annoying. */
}
void USDLightWriter::do_write(HierarchyContext &context)

View File

@ -94,7 +94,7 @@ static bool geometry_node_tree_validate_link(eNodeSocketDatatype type_a,
return true;
}
if (ELEM(type_a, SOCK_FLOAT, SOCK_VECTOR) && type_b == SOCK_ROTATION) {
/* Floats and vectors implicitly conver to rotations. */
/* Floats and vectors implicitly convert to rotations. */
return true;
}
if (type_a == SOCK_ROTATION && type_b == SOCK_VECTOR) {

View File

@ -33,7 +33,7 @@ static void node_declare(NodeDeclarationBuilder &b)
.supported_type(GeometryComponent::Type::Mesh);
if (node != nullptr) {
const eCustomDataType data_type = eCustomDataType(node_storage(*node).data_type);
/* TODO: Field interfacind is depend in offsetd of next declrations! */
/* TODO: Field interfacing depends on the offset of the next declarations! */
b.add_input(data_type, "Attribute").hide_value().field_on_all();
}

View File

@ -324,6 +324,7 @@ dict_custom = {
"reprojecting",
"reprojection",
"reprojections",
"reprojects",
"repurpose",
"rescale",
"rescaled",
@ -331,6 +332,7 @@ dict_custom = {
"restorable",
"resynced",
"resyncing",
"retarget",
"retiming",
"reusability",
"saveable",