Cleanup: spelling in comments

This commit is contained in:
Campbell Barton 2022-12-05 12:58:18 +11:00
parent 0dee238c8c
commit 9cb061f4f0
Notes: blender-bot 2023-05-29 09:17:12 +02:00
Referenced by issue #103118, Using Metarig Limbs With only 1 B-Bone segment causes console spam and slows rig down massively
Referenced by issue #106340, Blender 3.5 returns identity instead of real value for matrix_basis, 3.4 works ok
Referenced by issue #107777, Regression: Shadow always produces black image on baking
28 changed files with 51 additions and 48 deletions

View File

@ -803,7 +803,7 @@ void BlenderDisplayDriver::draw(const Params &params)
const int position_attribute = GPU_vertformat_attr_add(
format, display_shader_->position_attribute_name, GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
/* Note: Shader is bound again through IMM to register this shader with the imm module
/* Note: Shader is bound again through IMM to register this shader with the IMM module
* and perform required setup for IMM rendering. This is required as the IMM module
* needs to be aware of which shader is bound, and the main display shader
* is bound externally. */

View File

@ -126,7 +126,7 @@ class BlenderDisplayDriver : public DisplayDriver {
void gpu_context_lock();
void gpu_context_unlock();
/* Create GPU resources used by the dispaly driver. */
/* Create GPU resources used by the display driver. */
bool gpu_resources_create();
/* Destroy all GPU resources which are being used by this object. */

View File

@ -113,7 +113,7 @@ ccl_device_inline void integrate_background(KernelGlobals kg,
/* Background MIS weights. */
float mis_weight = 1.0f;
/* Check if background light exists or if we should skip pdf. */
/* Check if background light exists or if we should skip PDF. */
if (!(INTEGRATOR_STATE(state, path, flag) & PATH_RAY_MIS_SKIP) &&
kernel_data.background.use_mis) {
mis_weight = light_sample_mis_weight_forward_background(kg, state, path_flag);

View File

@ -401,7 +401,7 @@ ccl_device_inline float light_sample_mis_weight_forward_surface(KernelGlobals kg
float pdf = triangle_light_pdf(kg, sd, t);
/* Light selection pdf. */
/* Handled in triangle_light_pdf for effeciency. */
/* Handled in triangle_light_pdf for efficiency. */
return light_sample_mis_weight_forward(kg, bsdf_pdf, pdf);
}

View File

@ -226,7 +226,7 @@ enum PathRayFlag : uint32_t {
*/
/* Surface had transmission component at previous bounce. Used for light tree
* traversal and culling to be consistent with MIS pdf at the next bounce. */
* traversal and culling to be consistent with MIS PDF at the next bounce. */
PATH_RAY_MIS_HAD_TRANSMISSION = (1U << 10U),
/* Don't apply multiple importance sampling weights to emission from

View File

@ -1195,7 +1195,7 @@ int GHOST_XrGetControllerModelData(GHOST_XrContextHandle xr_context,
#ifdef WITH_VULKAN_BACKEND
/**
* Return vulkan handles for the given context.
* Return VULKAN handles for the given context.
*/
void GHOST_GetVulkanHandles(GHOST_ContextHandle context,
void *r_instance,
@ -1204,7 +1204,7 @@ void GHOST_GetVulkanHandles(GHOST_ContextHandle context,
uint32_t *r_graphic_queue_familly);
/**
* Return vulkan backbuffer resources handles for the given window.
* Return VULKAN back-buffer resources handles for the given window.
*/
void GHOST_GetVulkanBackbuffer(GHOST_WindowHandle windowhandle,
void *image,

View File

@ -100,7 +100,7 @@ static const char *vulkan_error_as_string(VkResult result)
printf(__VA_ARGS__); \
}
/* Tripple buffering. */
/* Triple buffering. */
const int MAX_FRAMES_IN_FLIGHT = 2;
GHOST_ContextVK::GHOST_ContextVK(bool stereoVisual,
@ -220,7 +220,7 @@ GHOST_TSuccess GHOST_ContextVK::swapBuffers()
&m_currentImage);
if (result == VK_ERROR_OUT_OF_DATE_KHR || result == VK_SUBOPTIMAL_KHR) {
/* Swapchain is out of date. Recreate swapchain and skip this frame. */
/* Swap-chain is out of date. Recreate swap-chain and skip this frame. */
destroySwapchain();
createSwapchain();
return GHOST_kSuccess;
@ -271,7 +271,7 @@ GHOST_TSuccess GHOST_ContextVK::swapBuffers()
result = vkQueuePresentKHR(m_present_queue, &present_info);
if (result == VK_ERROR_OUT_OF_DATE_KHR || result == VK_SUBOPTIMAL_KHR) {
/* Swapchain is out of date. Recreate swapchain and skip this frame. */
/* Swap-chain is out of date. Recreate swap-chain and skip this frame. */
destroySwapchain();
createSwapchain();
return GHOST_kSuccess;
@ -932,7 +932,7 @@ GHOST_TSuccess GHOST_ContextVK::initializeDrawingContext()
present_queue_create_info.queueCount = 1;
present_queue_create_info.pQueuePriorities = queue_priorities;
/* Eash queue must be unique. */
/* Each queue must be unique. */
if (m_queue_family_graphic != m_queue_family_present) {
queue_create_infos.push_back(present_queue_create_info);
}

View File

@ -242,8 +242,8 @@ static void movieclip_blend_write(BlendWriter *writer, ID *id, const void *id_ad
LISTBASE_FOREACH (MovieTrackingObject *, object, &tracking->objects) {
#if USE_LEGACY_CAMERA_OBJECT_FORMAT_ON_SAVE
/* When saving camers object in the legacy format clear the list of tracks. This is because the
* tracking object code is generic and assumes object owns the tracks in the list. For the
/* When saving cameras object in the legacy format clear the list of tracks. This is because
* the tracking object code is generic and assumes object owns the tracks in the list. For the
* camera tracks that is not the case in the legacy format. */
if (!is_undo && (object->flag & TRACKING_OBJECT_CAMERA)) {
MovieTrackingObject legacy_object = *object;

View File

@ -499,7 +499,7 @@ static std::optional<UVBorderCorner> sharpest_border_corner(UVIsland &island)
/** The inner edge of a fan. */
struct InnerEdge {
MeshPrimitive *primitive;
/* UVs order are already applied. So uvs[0] mathes primitive->vertices[vert_order[0]]/ */
/* UVs order are already applied. So `uvs[0]` matches `primitive->vertices[vert_order[0]]`. */
float2 uvs[3];
int vert_order[3];
@ -1198,7 +1198,7 @@ UVBorder UVPrimitive::extract_border() const
{
Vector<UVBorderEdge> border_edges;
for (UVEdge *edge : edges) {
/* TODO remove const cast. only needed for debugging atm. */
/* TODO remove const cast. only needed for debugging ATM. */
UVBorderEdge border_edge(edge, const_cast<UVPrimitive *>(this));
border_edges.append(border_edge);
}

View File

@ -83,11 +83,11 @@ void tracking_set_marker_coords_from_tracking(int frame_width,
* Convert the lens principal point (optical center) between normalized and pixel spaces.
*
* The normalized space stores principal point relative to the frame center which has normalized
* princibal coordinate of (0, 0). The right top corder of the frame corresponds to a notmalized
* principal coordinate of (1, 1), and the left bottom cornder corresponds to coordinate of
* principal coordinate of (0, 0). The right top corner of the frame corresponds to a normalized
* principal coordinate of (1, 1), and the left bottom corner corresponds to coordinate of
* (-1, -1).
*
* The pixel space is measured in pixels, with the reference being the left bottom cornder of
* The pixel space is measured in pixels, with the reference being the left bottom corner of
* the frame.
*/
void tracking_principal_point_normalized_to_pixel(const float principal_point_normalized[2],

View File

@ -36,9 +36,9 @@ uint BLI_ghashutil_ptrhash(const void *key)
size_t y = (size_t)key;
/* bottom 3 or 4 bits are likely to be 0; rotate y by 4 to avoid
* excessive hash collisions for dicts and sets */
* excessive hash collisions for dictionaries and sets */
/* NOTE: Unlike Python 'sizeof(uint)' is used instead of 'sizeof(void *)',
/* NOTE: Unlike Python `sizeof(uint)` is used instead of `sizeof(void *)`,
* Otherwise casting to 'uint' ignores the upper bits on 64bit platforms. */
return (uint)(y >> 4) | ((uint)y << (sizeof(uint[8]) - 4));
}

View File

@ -20,7 +20,7 @@ class NodeOperationBuilder;
/**
* \brief Wraps a bNode in its Node instance.
*
* For all nodetypes a wrapper class is created.
* For all node-types a wrapper class is created.
*
* \note When adding a new node to blender, this method needs to be changed to return the correct
* Node instance.

View File

@ -132,7 +132,7 @@ static GPUVertCompType get_comp_type_for_type(eCustomDataType type)
return GPU_COMP_I32;
case CD_PROP_BYTE_COLOR:
/* This should be u8,
* but u16 is required to store the color in linear space without precission loss */
* but u16 is required to store the color in linear space without precision loss */
return GPU_COMP_U16;
default:
return GPU_COMP_F32;

View File

@ -1400,7 +1400,7 @@ static void insert_seam_vert_array(const ProjPaintState *ps,
vec[1] *= ibuf_y;
vseam->angle = atan2f(vec[1], vec[0]);
/* If face windings are not initialized, something must be wrong. */
/* If the face winding data is not initialized, something must be wrong. */
BLI_assert((ps->faceWindingFlags[tri_index] & PROJ_FACE_WINDING_INIT) != 0);
vseam->normal_cw = (ps->faceWindingFlags[tri_index] & PROJ_FACE_WINDING_CW);

View File

@ -508,9 +508,8 @@ float SCULPT_automasking_factor_get(AutomaskingCache *automasking,
float mask = 1.0f;
/* Since brush normal mode depends on the current mirror symmery pass
* it is not folded into the factor cache (when it exists).
*/
/* Since brush normal mode depends on the current mirror symmetry pass
* it is not folded into the factor cache (when it exists). */
if ((ss->cache || ss->filter_cache) &&
(automasking->settings.flags & BRUSH_AUTOMASKING_BRUSH_NORMAL)) {
mask *= automasking_brush_normal_factor(automasking, ss, vert, automask_data);

View File

@ -85,7 +85,7 @@ typedef struct PointTrackPick {
} PointTrackPick;
/* Pick point track which is closest to the given coordinate.
* Operates in the original non-stabilized and non-un-distored coordinates. */
* Operates in the original non-stabilized and non-un-distorted coordinates. */
PointTrackPick ed_tracking_pick_point_track(const TrackPickOptions *options,
struct bContext *C,
const float co[2]);
@ -114,7 +114,7 @@ typedef struct PlaneTrackPick {
} PlaneTrackPick;
/* Pick plane track which is closest to the given coordinate.
* Operates in the original non-stabilized and non-un-distored coordinates. */
* Operates in the original non-stabilized and non-un-distorted coordinates. */
PlaneTrackPick ed_tracking_pick_plane_track(const TrackPickOptions *options,
struct bContext *C,
const float co[2]);
@ -136,7 +136,7 @@ typedef struct TrackingPick {
} TrackingPick;
/* Pick closest point or plane track (whichever is the closest to the given coordinate).
* Operates in the original non-stabilized and non-un-distored coordinates. */
* Operates in the original non-stabilized and non-un-distorted coordinates. */
TrackingPick ed_tracking_pick_closest(const TrackPickOptions *options,
bContext *C,
const float co[2]);

View File

@ -277,7 +277,7 @@ PointTrackPick ed_tracking_pick_point_track(const TrackPickOptions *options,
/* Here we also check whether the mouse is actually closer to the widget which controls scale
* and tilt.
* NOTE: The tilt contorl is only visible for selected tracks. */
* NOTE: The tilt control is only visible for selected tracks. */
if (is_track_selected) {
distance_squared = mouse_to_tilt_distance_squared(marker, co, width, height);
if (distance_squared < current_pick.distance_px_squared) {

View File

@ -239,7 +239,7 @@ static bool uv_shear_in_clip_bounds_test(const TransInfo *t, const float value)
sub_v2_v2v2(uv, td->iloc, center);
uv[axis] = uv[axis] + value * uv[1 - axis] * (2 * axis - 1);
add_v2_v2(uv, center);
/* TODO: udim support. */
/* TODO: UDIM support. */
if (uv[axis] < 0.0f || 1.0f < uv[axis]) {
return false;
}

View File

@ -847,7 +847,7 @@ void GPU_texture_get_mipmap_size(GPUTexture *tex, int lvl, int *r_size)
GPUPixelBuffer *GPU_pixel_buffer_create(uint size)
{
/* Ensure buffer satifies the alignment of 256 bytes for copying
/* Ensure buffer satisfies the alignment of 256 bytes for copying
* data between buffers and textures. As specified in:
* https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf
*

View File

@ -88,7 +88,7 @@ class MTLStateManager : public StateManager {
class MTLFence : public Fence {
private:
/* Using an event in this instance, as this is global for the command stream, rather than being
* inserted at the encoder level. This has the behaviour to match the GL functionality. */
* inserted at the encoder level. This has the behavior to match the GL functionality. */
id<MTLEvent> mtl_event_ = nil;
/* Events can be re-used multiple times. We can track a counter flagging the latest value
* signalled. */

View File

@ -1860,7 +1860,7 @@ MTLPixelBuffer::MTLPixelBuffer(uint size) : PixelBuffer(size)
{
MTLContext *ctx = MTLContext::get();
BLI_assert(ctx);
/* Ensure buffer satifies the alignment of 256 bytes for copying
/* Ensure buffer satisfies the alignment of 256 bytes for copying
* data between buffers and textures. As specified in:
* https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf */
BLI_assert(size >= 256);

View File

@ -49,12 +49,14 @@ typedef struct MovieTrackingCamera {
short units;
char _pad1[2];
/* Principal point (optical center) stored in normalized coordinates.
/**
* Principal point (optical center) stored in normalized coordinates.
*
* The normalized space stores principal point relative to the frame center which has normalized
* princibal coordinate of (0, 0). The right top corder of the frame corresponds to a notmalized
* principal coordinate of (1, 1), and the left bottom cornder corresponds to coordinate of
* (-1, -1). */
* principal coordinate of (0, 0). The right top corer of the frame corresponds to a normalized
* principal coordinate of (1, 1), and the left bottom corner corresponds to coordinate of
* (-1, -1).
*/
float principal_point[2];
/** Legacy principal point in pixel space. */

View File

@ -235,7 +235,7 @@ static int adjacent_edge(Span<MLoop> loops, const int loop_i, const MPoly &poly,
* Calculate the disjoint fans connected to the vertex, where a fan is a group of edges connected
* through polygons. The connected_edges vector is rearranged in such a way that edges in the same
* fan are grouped together. The r_fans_sizes Vector gives the sizes of the different fans, and can
* be used to retreive the fans from connected_edges.
* be used to retrieve the fans from connected_edges.
*/
static void calc_vertex_fans(const int vertex,
const Span<MLoop> new_loops,

View File

@ -172,7 +172,7 @@ static void node_geo_exec(GeoNodeExecParams params)
if (use_creases) {
/* Remove the layer in case it was created by the node from the field input. The fact
* that this node uses #CD_CREASE to input creases to the subvision code is meant to be
* that this node uses #CD_CREASE to input creases to the subdivision code is meant to be
* an implementation detail ideally. */
CustomData_free_layers(&mesh_out->edata, CD_CREASE, mesh_out->totedge);
}

View File

@ -375,7 +375,7 @@ PyObject *BPy_BMLoopColor_CreatePyObject(struct MLoopCol *mloopcol)
* its only that BMesh is the only part of blender that uses a hand written api like this.
* This type could eventually be used to access lattice weights.
*
* \note Many of blender-api's dict-like-wrappers act like ordered dicts,
* \note Many of Blender-API's dictionary-like-wrappers act like ordered dictionaries,
* This is intentionally _not_ ordered, the weights can be in any order and it won't matter,
* the order should not be used in the api in any meaningful way (as with a python dict)
* only expose as mapping, not a sequence.

View File

@ -5,7 +5,7 @@
*
* This file defines a singleton py object accessed via 'bpy.app.translations',
* which exposes various data and functions useful in i18n work.
* Most notably, it allows to extend main translations with py dicts.
* Most notably, it allows to extend main translations with Python dictionaries.
*/
#include <Python.h>
@ -44,7 +44,7 @@ typedef struct {
/** A readonly mapping {C context id: python id} (actually, a MappingProxy). */
PyObject *contexts_C_to_py;
/**
* A py dict containing all registered py dicts
* A Python dictionary containing all registered Python dictionaries
* (order is more or less random, first match wins!).
*/
PyObject *py_messages;
@ -112,7 +112,9 @@ static void _ghashutil_keyfree(void *ptr)
/** \name Python'S Messages Cache
* \{ */
/* We cache all messages available for a given locale from all py dicts into a single ghash.
/**
* We cache all messages available for a given locale
* from all Python dictionaries into a single #GHash.
* Changing of locale is not so common, while looking for a message translation is,
* so let's try to optimize the later as much as we can!
* Note changing of locale, as well as (un)registering a message dict, invalidate that cache.
@ -141,7 +143,7 @@ static void _build_translations_cache(PyObject *py_messages, const char *locale)
_clear_translations_cache();
_translations_cache = BLI_ghash_new(_ghashutil_keyhash, _ghashutil_keycmp, __func__);
/* Iterate over all py dicts. */
/* Iterate over all Python dictionaries. */
while (PyDict_Next(py_messages, &pos, &uuid, &uuid_dict)) {
PyObject *lang_dict;

View File

@ -516,7 +516,7 @@ static void do_multires_bake(MultiresBakeRender *bkr,
vert_normals,
poly_normals,
(const float(*)[3])dm->getLoopDataArray(dm, CD_NORMAL),
(const float(*)[3])dm->getVertDataArray(dm, CD_ORCO), /* may be nullptrptr */
(const float(*)[3])dm->getVertDataArray(dm, CD_ORCO), /* May be nullptr. */
/* result */
&dm->loopData,
dm->getNumLoops(dm),

View File

@ -118,8 +118,8 @@ void SEQ_transform_translate_sequence(Scene *evil_scene, Sequence *seq, int delt
}
/* Meta strips requires their content is to be translated, and then frame range of the meta is
* updated based on nested strips. Thiw won't work for empty metas, so they can be treated as
* normal strip. */
* updated based on nested strips. This won't work for empty meta-strips,
* so they can be treated as normal strip. */
if (seq->type == SEQ_TYPE_META && !BLI_listbase_is_empty(&seq->seqbase)) {
Sequence *seq_child;
for (seq_child = seq->seqbase.first; seq_child; seq_child = seq_child->next) {