Cleanup: spelling in comments

This commit is contained in:
Campbell Barton
2024-07-13 16:56:57 +10:00
parent 355aced2c4
commit 9fb0d3c3ef
30 changed files with 69 additions and 59 deletions

View File

@@ -859,7 +859,7 @@ ccl_device_forceinline bool mnee_path_contribution(KernelGlobals kg,
probe_ray.self.prim = v.prim;
probe_ray.P = v.p;
/* Set view looking dir. */
/* Set view looking direction. */
wi = -wo;
wi_len = wo_len;
@@ -888,7 +888,7 @@ ccl_device_forceinline bool mnee_path_contribution(KernelGlobals kg,
surface_shader_eval<KERNEL_FEATURE_NODE_MASK_SURFACE_SHADOW>(
kg, state, sd_mnee, NULL, PATH_RAY_DIFFUSE, true);
/* Set light looking dir. */
/* Set light looking direction. */
wo = (vi == vertex_count - 1) ? (light_fixed_direction ? ls->D : ls->P - v.p) :
vertices[vi + 1].p - v.p;
wo = normalize_len(wo, &wo_len);

View File

@@ -25,9 +25,10 @@ extern GHOST_TSuccess GHOST_CreateSystemPaths();
extern GHOST_TSuccess GHOST_DisposeSystemPaths();
/**
* Determine the base dir in which shared resources are located. It will first try to use
* "unpack and run" path, then look for properly installed path, including versioning.
* \return Unsigned char string pointing to system dir (eg `/usr/share/blender/`).
* Determine the base directory in which shared resources are located.
* It will first try to use "unpack and run" path, then look for properly
* installed path, including versioning.
* \return Unsigned char string pointing to system directory (eg `/usr/share/blender/`).
*
* \note typically: `BKE_appdir_resource_path_id(BLENDER_RESOURCE_PATH_SYSTEM, false)` should be
* used instead of this function directly as it ensures environment variable overrides are used.
@@ -35,8 +36,8 @@ extern GHOST_TSuccess GHOST_DisposeSystemPaths();
extern const char *GHOST_getSystemDir(int version, const char *versionstr);
/**
* Determine the base dir in which user configuration is stored, including versioning.
* \return Unsigned char string pointing to user dir (eg ~).
* Determine the base directory in which user configuration is stored, including versioning.
* \return Unsigned char string pointing to user directory (eg ~).
*
* \note typically: `BKE_appdir_resource_path_id(BLENDER_RESOURCE_PATH_USER, false)` should be
* used instead of this function directly as it ensures environment variable overrides are used.
@@ -45,13 +46,13 @@ extern const char *GHOST_getUserDir(int version, const char *versionstr);
/**
* Determine a special ("well known") and easy to reach user directory.
* \return Unsigned char string pointing to user dir (eg `~/Documents/`).
* \return Unsigned char string pointing to user directory (eg `~/Documents/`).
*/
extern const char *GHOST_getUserSpecialDir(GHOST_TUserSpecialDirTypes type);
/**
* Determine the dir in which the binary file is found.
* \return Unsigned char string pointing to binary dir (eg ~/usr/local/bin/).
* Determine the directory in which the binary file is found.
* \return Unsigned char string pointing to binary directory (eg ~/usr/local/bin/).
*/
extern const char *GHOST_getBinaryDir();

View File

@@ -475,7 +475,7 @@ GHOST_TSuccess GHOST_ContextEGL::initializeDrawingContext()
std::vector<EGLint> surface_attrib_list;
surface_attrib_list.reserve(3);
#ifdef WITH_GHOST_WAYLAND
/* Fix transparency issue on Wayland + Nouveau/Zink+NVK. Due to unsupported texture formats
/* Fix transparency issue on: `Wayland + Nouveau/Zink+NVK`. Due to unsupported texture formats
* drivers can hit transparency code-paths resulting in showing the desktop in viewports.
*
* See #102994. */

View File

@@ -860,7 +860,7 @@ ID *action_slot_get_id_for_keying(Main &bmain,
/**
* Make a best-effort guess as to which ID* is animated by the given slot.
*
* This is only used in rare cases; ususally the ID* for which operations are
* This is only used in rare cases; usually the ID* for which operations are
* performed is known.
*
* \note This function was specifically written because the 'display name' of an

View File

@@ -30,7 +30,7 @@ struct UserDef;
struct WorkspaceConfigFileData;
/**
* The suffix used for blendfiles managed by the asset system.
* The suffix used for blend-files managed by the asset system.
*/
#define BLENDER_ASSET_FILE_SUFFIX ".asset.blend"
@@ -187,9 +187,9 @@ class PartialWriteContext : NonCopyable, NonMovable {
*
* Typically, the current G_MAIN's filepath.
*
* \note Currently always also copied into the temp bmain.filepath, as this simplifies remapping
* of relative filepaths. This may change in the future, if context can be loaded from external
* blendfiles.
* \note Currently always also copied into the temp `bmain.filepath`,
* as this simplifies remapping of relative file-paths.
* This may change in the future, if context can be loaded from external blend-files.
*/
std::string reference_root_filepath_;
/**
@@ -248,7 +248,7 @@ class PartialWriteContext : NonCopyable, NonMovable {
* nor handled as a regular dependency. Instead, the library is _always_ added to the context
* data, and never duplicated. Also, library matching always happens based on absolute filepath.
*
* \warning Heterogenous usages of these operations flags during a same PartialWriteContext
* \warning Heterogeneous usages of these operations flags during a same PartialWriteContext
* session may not generate expected results. Typically, once an ID has been added to the context
* as 'matching' counterpart of the source Main (i.e. sharing the same session UID), it will not
* be re-processed further if found again as dependency of another ID, or added explicitly as

View File

@@ -197,10 +197,10 @@ struct Main {
* will trigger a rebuild of the Slot-to-ID mapping. Since constructing this mapping requires
* a full scan of the animatable IDs in this `Main` anyway, it is kept as a flag here.
*
* \note This flag should not be set directly. Use animrig::Slot::users_invalidate() instead.
* That way the handling of this flag is limited to the code in animrig::Slot.
* \note This flag should not be set directly. Use #animrig::Slot::users_invalidate() instead.
* That way the handling of this flag is limited to the code in #animrig::Slot.
*
* \see blender::animrig::Slot::users_invalidate(Main &bmain)
* \see `blender::animrig::Slot::users_invalidate(Main &bmain)`
*/
bool is_action_slot_to_id_map_dirty;

View File

@@ -98,8 +98,9 @@ void BKE_appdir_init()
void BKE_appdir_exit()
{
/* System paths can be created on-demand by calls to this API. So they need to be properly
* disposed of here. Note that there may be several calls to this in'exit' process (e.g.
* wm_init/wm_exit will currently both call GHOST api directly, and BKE_appdir_init/_exit). */
* disposed of here. Note that there may be several calls to this in `exit` process
* (e.g. `wm_init/wm_exit` will currently both call GHOST API directly,
* & `BKE_appdir_init/_exit`). */
GHOST_DisposeSystemPaths();
#ifndef NDEBUG
BLI_assert(is_appdir_init == true);

View File

@@ -119,7 +119,7 @@ static std::string asset_blendfile_path_for_save(const bUserAssetLibrary &user_l
return "";
}
/* Make sure filename only contains valid characters for filesystem. */
/* Make sure filename only contains valid characters for file-system. */
char base_name_filesafe[FILE_MAXFILE];
BLI_strncpy(base_name_filesafe,
base_name.data(),
@@ -257,7 +257,7 @@ static void asset_reload(Main &global_main, Library *lib, ReportList &reports)
BKE_blendfile_library_relocate(lapp_context, &reports, lib, true);
BKE_blendfile_link_append_context_free(lapp_context);
/* Clear temporary tag from reloaction. */
/* Clear temporary tag from relocation. */
BKE_main_id_tag_all(&global_main, LIB_TAG_PRE_EXISTING, false);
/* Recreate dependency graph to include new IDs. */

View File

@@ -850,7 +850,7 @@ const char *BKE_modifier_path_relbase(Main *bmain, Object *ob)
{
/* - If the ID is from a library, return library path.
* - Else if the file has been saved return the blend file path.
* - Else if the file isn't saved and the ID isn't from a library, return the temp dir.
* - Else if the file isn't saved and the ID isn't from a library, return the temp directory.
*/
if ((bmain->filepath[0] != '\0') || ID_IS_LINKED(ob)) {
return ID_BLEND_PATH(bmain, &ob->id);

View File

@@ -807,7 +807,7 @@ bool BKE_paint_brush_set_essentials(Main *bmain, Paint *paint, const char *name)
void BKE_paint_brushes_validate(Main *bmain, Paint *paint)
{
/* Clear brush with invalid mode. Unclear if this can still happen,
* but kept from old paint toolslots code. */
* but kept from old paint tool-slots code. */
Brush *brush = BKE_paint_brush(paint);
if (brush && (paint->runtime.ob_mode & brush->ob_mode) == 0) {
BKE_paint_brush_set(paint, nullptr);

View File

@@ -2532,7 +2532,7 @@ static bool read_libblock_undo_restore_library(
}
Main *libmain = static_cast<Main *>(fd->old_mainlist->first);
/* Skip oldmain itself... */
/* Skip `oldmain` itself. */
for (libmain = libmain->next; libmain; libmain = libmain->next) {
if (&libmain->curlib->id == id_old) {
Main *old_main = static_cast<Main *>(fd->old_mainlist->first);

View File

@@ -19,7 +19,7 @@
# define threadgroup_size (gl_WorkGroupSize.x * gl_WorkGroupSize.y)
shared float array_of_values[threadgroup_size];
/* Only works for 2D threadgroups where the size is a power of 2 */
/* Only works for 2D thread-groups where the size is a power of 2. */
float parallelMax(const float value)
{
uint thread_id = gl_LocalInvocationIndex;

View File

@@ -1383,7 +1383,7 @@ static size_t animfilter_fcurves_span(bAnimContext *ac,
ac->bmain, fcu, ANIMTYPE_FCURVE, animated_id, fcurve_owner_id);
/* Filtering by name needs a way to look up the name, which is easiest if
* there is alread an bAnimListElem. */
* there is already an #bAnimListElem. */
if (filter_by_name && !ale_name_matches_dopesheet_filter(*ac->ads, *ale)) {
MEM_freeN(ale);
continue;

View File

@@ -79,7 +79,7 @@ class AssetCatalogSelectorTree : public ui::AbstractTreeView {
catalog_item.foreach_child([&, this](const asset_system::AssetCatalogTreeItem &child) {
Item &child_item = build_catalog_items_recursive(view_item, child);
/* Uncollapse to some level (gives quick acces, but don't let the tree get too big). */
/* Uncollapse to some level (gives quick access, but don't let the tree get too big). */
if (parent_count < 2) {
child_item.uncollapse_by_default();
}

View File

@@ -143,7 +143,7 @@ class AssetCatalogTreeView : public ui::AbstractTreeView {
catalog_item.foreach_child([&, this](const asset_system::AssetCatalogTreeItem &child) {
ui::BasicTreeViewItem &child_item = build_catalog_items_recursive(view_item, child);
/* Uncollapse to some level (gives quick acces, but don't let the tree get too big). */
/* Uncollapse to some level (gives quick access, but don't let the tree get too big). */
if (parent_count < 3) {
child_item.uncollapse_by_default();
}

View File

@@ -258,10 +258,10 @@ struct bAnimListElem {
/**
* For data that is owned by a specific slot, its handle.
*
* This is not declared as blender::animrig::slot_handle_t to avoid all the users of this
* header file to get the animrig module as extra dependency (which would spread to the undo
* system, lineart, etc). It's probably best to split off this struct definition from the rest of
* this header, as most code that uses this header doesn't need to know the definition of this
* This is not declared as #blender::animrig::slot_handle_t to avoid all the users of this
* header file to get the `animrig` module as extra dependency (which would spread to the undo
* system, line-art, etc). It's probably best to split off this struct definition from the rest
* of this header, as most code that uses this header doesn't need to know the definition of this
* struct.
*
* TODO: split off into separate header file.

View File

@@ -645,7 +645,7 @@ static void grease_pencil_fill_extension_cut(const bContext &C,
hit->no[0] = result.lambda;
};
/* Store intersections first before applying to the data, so that subsequent raycasts use
/* Store intersections first before applying to the data, so that subsequent ray-casts use
* original end points until all intersections are found. */
Vector<float3> new_extension_ends(extension_data.lines.ends.size());
for (const int i_line : extension_data.lines.starts.index_range()) {

View File

@@ -466,7 +466,7 @@ static void grease_pencil_interpolate_update(bContext &C, const wmOperator &op)
WM_event_add_notifier(&C, NC_GPENCIL | NA_EDITED, nullptr);
}
/* Restore timeline changes when cancelled. */
/* Restore timeline changes when canceled. */
static void grease_pencil_interpolate_restore(bContext &C, wmOperator &op)
{
using bke::greasepencil::Drawing;

View File

@@ -114,10 +114,12 @@ void enable_ex(Main &bmain, Depsgraph &depsgraph, Object &ob)
BKE_scene_graph_update_tagged(&depsgraph, &bmain);
}
/* Free the sculpt BMesh and BMLog
/**
* Free the sculpt BMesh and BMLog
*
* If 'unode' is given, the BMesh's data is copied out to the unode
* before the BMesh is deleted so that it can be restored from. */
* If `unode` is given, the #BMesh's data is copied out to the `unode`
* before the BMesh is deleted so that it can be restored from.
*/
static void disable(
Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob, undo::StepData *undo_step)
{

View File

@@ -661,14 +661,14 @@ static void handle_number_input(
float subframe_delta = 0.0f;
if (data->subframe_restore != 0.0f) {
/* Always remove the previous subframe adjustments we have potentially made with the mouse
* input when the user starts enterning values by hand.
/* Always remove the previous sub-frame adjustments we have potentially made with the mouse
* input when the user starts entering values by hand.
*/
subframe_delta = -data->subframe_restore;
data->subframe_restore = 0.0f;
}
if (std::trunc(offset_fl) != offset_fl) {
/* Only apply subframe offsets if the input is not an integer. */
/* Only apply sub-frame offsets if the input is not an integer. */
subframe_delta = offset_fl - data->previous_subframe_offset - delta_offset;
data->subframe_restore += subframe_delta;
}

View File

@@ -198,7 +198,7 @@ static StripDrawContext strip_draw_context_get(TimelineDrawContext *ctx, Sequenc
strip_ctx.content_end = SEQ_time_content_end_frame_get(scene, seq);
if (seq->type == SEQ_TYPE_SOUND_RAM && seq->sound != nullptr) {
/* Visualize subframe sound offsets */
/* Visualize sub-frame sound offsets. */
const double sound_offset = (seq->sound->offset_time + seq->sound_offset) * FPS;
strip_ctx.content_start += sound_offset;
strip_ctx.content_end += sound_offset;

View File

@@ -419,7 +419,7 @@ class TransformGizmos : public NodeGizmos {
int transform_orientation_ = V3D_ORIENT_GLOBAL;
/**
* Transformation of the object and potentialy crazy-space transforms applied on top of the
* Transformation of the object and potentially crazy-space transforms applied on top of the
* gizmos.
*/
float4x4 parent_transform_;
@@ -932,7 +932,7 @@ static void WIDGETGROUP_geometry_nodes_refresh(const bContext *C, wmGizmoGroup *
Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
/* A new map containing the active gizmos is build. This is less error prone than trying to
* update the old map inplace. */
* update the old map in place. */
Map<GeoNodesObjectGizmoID, std::unique_ptr<NodeGizmos>> new_gizmos_by_node;
/* This needs to stay around for a bit longer because the compute contexts are required when

View File

@@ -649,8 +649,8 @@ ImBuf *IMB_dupImBuf(const ImBuf *ibuf1)
}
if (ibuf1->float_buffer.data) {
/* Ensure the correct number of channels are being allocated for the new ImBuf. Some
* compositing scenarios might end up with >4 channels and we want to duplicate them prooperly.
/* Ensure the correct number of channels are being allocated for the new #ImBuf. Some
* compositing scenarios might end up with >4 channels and we want to duplicate them properly.
*/
if (imb_addrectfloatImBuf(ibuf2, ibuf1->channels, false) == false) {
IMB_freeImBuf(ibuf2);

View File

@@ -87,7 +87,7 @@ struct OBJImportParams {
};
/**
* Reads and retuns just the meshes in the obj file
* Reads and returns just the meshes in the obj file
*/
void OBJ_import_geometries(const OBJImportParams *import_params,
blender::Vector<blender::bke::GeometrySet> &geometries);

View File

@@ -288,7 +288,8 @@ typedef enum eFMod_Stepped_Flags {
/* Drivers -------------------------------------- */
/* Driver Target (dtar)
/**
* Driver Target (`dtar`)
*
* Defines how to access a dependency needed for a driver variable.
*/
@@ -412,7 +413,7 @@ typedef enum eDriverTarget_ContextProperty {
#define MAX_DRIVER_TARGETS 8
/**
* Driver Variable (dvar)
* Driver Variable (`dvar`)
*
* A 'variable' for use as an input for the driver evaluation.
* Defines a way of accessing some channel to use, that can be
@@ -487,7 +488,7 @@ typedef enum eDriverVar_Flags {
DVAR_FLAG_INVALID_EMPTY = (1 << 8),
} eDriverVar_Flags;
/* All invalid dvar name flags */
/** All invalid `dvar` name flags. */
#define DVAR_ALL_INVALID_FLAGS \
(DVAR_FLAG_INVALID_NAME | DVAR_FLAG_INVALID_START_NUM | DVAR_FLAG_INVALID_START_CHAR | \
DVAR_FLAG_INVALID_HAS_SPACE | DVAR_FLAG_INVALID_HAS_DOT | DVAR_FLAG_INVALID_HAS_SPECIAL | \

View File

@@ -10,10 +10,10 @@
* vector values but just a boolean for each component.
*
* Some nodes implement special #node_eval_elem and #node_eval_inverse_elem methods which allow
* analysing the potential impact of changing part of a value in one place of a node tree.
* analyzing the potential impact of changing part of a value in one place of a node tree.
*
* The types are generally quite small and trivially copyable and destructible. They just contain
* some bools.
* The types are generally quite small and trivially copyable and destructible.
* They just contain some booleans.
*/
#include <optional>

View File

@@ -204,7 +204,7 @@ static void foreach_gizmo_for_input(const ie::SocketElem &input_socket,
}
const bNode &node = input_socket.socket->owner_node();
if (zones->get_zone_by_node(node.identifier) != nullptr) {
/* Gizmos in zones are not supportet yet. */
/* Gizmos in zones are not supported yet. */
return;
}
if (is_builtin_gizmo_node(node)) {

View File

@@ -3431,8 +3431,9 @@ static void save_set_filepath(bContext *C, wmOperator *op)
STRNCPY(filepath, blendfile_path);
}
/* For convencience when using "Save As" on asset system files: Replace .asset.blend extension
* with just .blend. Asset system files must not be overridden (except by the asset system),
/* For convenience when using "Save As" on asset system files:
* Replace `.asset.blend` extension with just `.blend`.
* Asset system files must not be overridden (except by the asset system),
* there are further checks to prevent this entirely. */
if (bmain->is_asset_edit_file &&
blender::StringRef(filepath).endswith(BLENDER_ASSET_FILE_SUFFIX))

View File

@@ -255,7 +255,7 @@ bool wm_xr_passthrough_enabled(void *customdata);
/**
* \brief Disable XR passthrough if not supported.
*
* In case passthrough is not supported by the XR runtime, force uncheck the toggle in the GUI.
* In case passthrough is not supported by the XR runtime, force un-check the toggle in the GUI.
* It's assigned to Ghost-XR as a callback (see GHOST_XrDisablePassthroughFunc()).
*/
void wm_xr_disable_passthrough(void *customdata);

View File

@@ -50,6 +50,8 @@ dict_custom = {
"attenuations",
"backends",
"backlit",
"backpropagated",
"backpropagation",
"bindless",
"bitwise",
"blocky",
@@ -134,6 +136,7 @@ dict_custom = {
"dihedral",
"dimensionality",
"directionality",
"disambiguated",
"disambiguates",
"discoverability",
"discretization",
@@ -364,6 +367,7 @@ dict_custom = {
"skinnable",
"skippable",
"sortable",
"stationarity",
"stepsize",
"stepwise",
"stitchable",