Cleanup: correct terms, spelling in comments

This commit is contained in:
Campbell Barton 2023-04-16 20:41:22 +10:00
parent 5f40118899
commit e1571cb105
17 changed files with 27 additions and 28 deletions

View File

@ -6763,7 +6763,7 @@ GHOST_TCapabilityFlag GHOST_SystemWayland::getCapabilities() const
/* WAYLAND doesn't support setting the cursor position directly,
* this is an intentional choice, forcing us to use a software cursor in this case. */
GHOST_kCapabilityCursorWarp |
/* Some drivers don't support back-buffer reading, see: #98462 & #106264.
/* Some drivers don't support front-buffer reading, see: #98462 & #106264.
* We could inspect the graphics card driver - for now just disable on WAYLAND. */
GHOST_kCapabilityGPUReadFrontBuffer));
}

View File

@ -33,7 +33,7 @@ enum {
ICON_DATA_PREVIEW,
/** 2D triangles: obj is #Icon_Geom */
ICON_DATA_GEOM,
/** Studiolight */
/** Studio-light. */
ICON_DATA_STUDIOLIGHT,
/** GPencil Layer color preview (annotations): obj is #bGPDlayer */
ICON_DATA_GPLAYER,

View File

@ -245,7 +245,7 @@ void BKE_subdiv_ccg_update_normals(SubdivCCG *subdiv_ccg,
struct CCGFace **effected_faces,
int num_effected_faces);
/* Average grid coordinates and normals along the grid boundatries. */
/* Average grid coordinates and normals along the grid boundaries. */
void BKE_subdiv_ccg_average_grids(SubdivCCG *subdiv_ccg);
/* Similar to above, but only updates given faces. */

View File

@ -602,7 +602,7 @@ static void annotation_draw_onionskins(
for (gf = gpf->prev; gf; gf = gf->prev) {
/* check if frame is drawable */
if ((gpf->framenum - gf->framenum) <= gpl->gstep) {
/* alpha decreases with distance from curframe index */
/* Alpha decreases with distance from current-frame index. */
fac = 1.0f - ((float)(gpf->framenum - gf->framenum) / (float)(gpl->gstep + 1));
color[3] = alpha * fac * 0.66f;
annotation_draw_strokes(gf, offsx, offsy, winx, winy, dflag, gpl->thickness, color);
@ -634,7 +634,7 @@ static void annotation_draw_onionskins(
for (gf = gpf->next; gf; gf = gf->next) {
/* check if frame is drawable */
if ((gf->framenum - gpf->framenum) <= gpl->gstep_next) {
/* alpha decreases with distance from curframe index */
/* Alpha decreases with distance from current-frame index. */
fac = 1.0f - ((float)(gf->framenum - gpf->framenum) / (float)(gpl->gstep_next + 1));
color[3] = alpha * fac * 0.66f;
annotation_draw_strokes(gf, offsx, offsy, winx, winy, dflag, gpl->thickness, color);

View File

@ -291,7 +291,7 @@ static bool annotation_stroke_filtermval(tGPsdata *p, const float mval[2], const
/* Check if the distance since the last point is significant enough:
* - Prevents points being added too densely
* - Distance here doesn't use sqrt to prevent slowness.
* - Distance here doesn't use `sqrt` to prevent slowness.
* We should still be safe from overflows though.
*/
if ((dx * dx + dy * dy) > MIN_EUCLIDEAN_PX * MIN_EUCLIDEAN_PX) {

View File

@ -2754,7 +2754,7 @@ void GPENCIL_OT_vertex_group_normalize_all(wmOperatorType *ot)
/****************************** Join ***********************************/
/* userdata for joined_gpencil_fix_animdata_cb() */
/** User-data for #gpencil_joined_fix_animdata_cb(). */
typedef struct tJoinGPencil_AdtFixData {
bGPdata *src_gpd;
bGPdata *tar_gpd;

View File

@ -374,7 +374,7 @@ static bool gpencil_stroke_filtermval(tGPsdata *p, const float mval[2], const fl
}
/* Check if the distance since the last point is significant enough:
* - Prevents points being added too densely
* - Distance here doesn't use sqrt to prevent slowness.
* - Distance here doesn't use `sqrt` to prevent slowness.
* We should still be safe from overflows though.
*/
if ((dx * dx + dy * dy) > MIN_EUCLIDEAN_PX * MIN_EUCLIDEAN_PX) {

View File

@ -1222,7 +1222,7 @@ static void gpencil_primitive_init(bContext *C, wmOperator *op)
"gp primitive cpoint");
tgpi->gpd->runtime.tot_cp_points = 0;
/* getcolor info */
/* Get color info. */
tgpi->material = BKE_gpencil_object_material_ensure_from_active_input_toolsettings(
bmain, tgpi->ob, ts);

View File

@ -3021,7 +3021,7 @@ static void do_vpaint_brush_blur_loops(bContext *C,
for (const int corner : poly) {
Color *col = lcol + corner;
/* Color is squared to compensate the sqrt color encoding. */
/* Color is squared to compensate the `sqrt` color encoding. */
blend[0] += (Blend)col->r * (Blend)col->r;
blend[1] += (Blend)col->g * (Blend)col->g;
blend[2] += (Blend)col->b * (Blend)col->b;
@ -3164,7 +3164,7 @@ static void do_vpaint_brush_blur_verts(bContext *C,
for (const int vert : ss->corner_verts.slice(poly)) {
Color *col = lcol + vert;
/* Color is squared to compensate the sqrt color encoding. */
/* Color is squared to compensate the `sqrt` color encoding. */
blend[0] += (Blend)col->r * (Blend)col->r;
blend[1] += (Blend)col->g * (Blend)col->g;
blend[2] += (Blend)col->b * (Blend)col->b;
@ -3463,7 +3463,7 @@ static void calculate_average_color(VPaintData<Color, Traits, domain> *vpd,
Color *col = lcol + elem_index;
/* Color is squared to compensate the sqrt color encoding. */
/* Color is squared to compensate the `sqrt` color encoding. */
accum2->value[0] += col->r * col->r;
accum2->value[1] += col->g * col->g;
accum2->value[2] += col->b * col->b;

View File

@ -2177,7 +2177,7 @@ static void outliner_batch_delete_object_tag(ReportList *reports,
reports, RPT_WARNING, "Cannot delete indirectly linked object '%s'", object->id.name + 2);
BLI_assert((object->id.tag & LIB_TAG_DOIT) == 0);
}
/* FIXME: This code checking object usercount won't work as expected if a same object belongs to
/* FIXME: This code checking object user-count won't work as expected if a same object belongs to
* more than one collection in the scene. */
if (ID_REAL_USERS(object) <= 1 && ID_EXTRA_USERS(object) == 0 &&
BKE_library_ID_is_indirectly_used(bmain, object)) {

View File

@ -174,7 +174,7 @@ static void view3d_orbit_apply_dyn_ofs_ortho_correction(float ofs[3],
*
* Imagine a camera is focused on a distant object. Now imagine a closer object in front of
* the camera is used as a pivot, the camera is rotated to view it from the side (~90d rotation).
* The outcome is the DOF is now focused on a distant region to the left/right.
* The outcome is the camera is now focused on a distant region to the left/right.
* The new focal point is unlikely to point to anything useful (unless by accident).
* Instead of a focal point - the `rv3d->ofs` is being manipulated in this case.
*

View File

@ -628,14 +628,14 @@ static void createTransGPencil_strokes(bContext *C,
}
}
/* screenspace needs special matrices... */
/* Screen-space needs special matrices. */
if ((gps->flag & (GP_STROKE_3DSPACE | GP_STROKE_2DSPACE | GP_STROKE_2DIMAGE)) ==
0) {
/* screenspace */
/* Screen-space. */
td->protectflag = OB_LOCK_LOCZ | OB_LOCK_ROTZ | OB_LOCK_SCALEZ;
}
else {
/* configure 2D dataspace points so that they don't play up... */
/* configure 2D data-space points so that they don't play up. */
if (gps->flag & (GP_STROKE_2DSPACE | GP_STROKE_2DIMAGE)) {
td->protectflag = OB_LOCK_LOCZ | OB_LOCK_ROTZ | OB_LOCK_SCALEZ;
}
@ -646,10 +646,10 @@ static void createTransGPencil_strokes(bContext *C,
copy_m3_m3(td->axismtx, diff_mat); /* axis orientation */
/* Triangulation must be calculated again,
* so save the stroke for recalc function */
* so save the stroke for recalculate function. */
td->extra = gps;
/* save pointer to object */
/* Save pointer to object. */
td->ob = obact;
td++;
@ -657,7 +657,7 @@ static void createTransGPencil_strokes(bContext *C,
}
}
/* March over these points, and calculate the proportional editing distances */
/* March over these points, and calculate the proportional editing distances. */
if (is_prop_edit && (head != tail)) {
calc_distanceCurveVerts(head, tail - 1, false);
}

View File

@ -285,7 +285,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
invert_m3_m3_safe_ortho(td->mtx, td->smtx);
}
else {
/* no conversion to/from dataspace */
/* No conversion to/from data-space. */
unit_m3(td->smtx);
unit_m3(td->mtx);
}

View File

@ -40,7 +40,7 @@ static void drawArrow(const uint pos_id, const enum eArrowDirection dir)
int size = (3.0f * UI_SCALE_FAC) + (2.0f * U.pixelsize);
/* To line up the arrow point nicely, one end has to be extended by half its width. But
* being on a 45 degree angle, Pythagoras says a movement of sqrt(2)/2 * (line width /2) */
* being on a 45 degree angle, Pythagoras says a movement of `sqrt(2) / 2 * (line width / 2)`. */
float adjust = (M_SQRT2 * ARROW_WIDTH / 4.0f);
if (ELEM(dir, LEFT, DOWN)) {

View File

@ -2787,7 +2787,7 @@ static void rna_def_gpencil_interpolate(BlenderRNA *brna)
"Grease Pencil Interpolate Settings",
"Settings for Grease Pencil interpolation tools");
/* custom curvemap */
/* Custom curve-map. */
prop = RNA_def_property(srna, "interpolation_curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "custom_ipo");
RNA_def_property_struct_type(prop, "CurveMapping");

View File

@ -983,7 +983,7 @@ static void wm_drag_draw_default(bContext *C, wmWindow *win, wmDrag *drag, const
}
wm_drag_draw_item_name(drag, UNPACK2(xy_tmp));
/* Operator name with roundbox. */
/* Operator name with round-box. */
wm_drag_draw_tooltip(C, win, drag, xy);
}

View File

@ -1347,11 +1347,10 @@ static bool ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_pt
if (state != GHOST_kWindowStateMinimized) {
/*
* Ghost sometimes send size or move events when the window hasn't changed.
* One case of this is using compiz on linux. To alleviate the problem
* we ignore all such event here.
* One case of this is using COMPIZ on Linux.
* To alleviate the problem we ignore all such event here.
*
* It might be good to eventually do that at Ghost level, but that is for
* another time.
* It might be good to eventually do that at GHOST level, but that is for another time.
*/
if (wm_window_update_size_position(win)) {
const bScreen *screen = WM_window_get_active_screen(win);