From e1571cb105179adf908cfc36df670fea71f75685 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 16 Apr 2023 20:41:22 +1000 Subject: [PATCH] Cleanup: correct terms, spelling in comments --- intern/ghost/intern/GHOST_SystemWayland.cc | 2 +- source/blender/blenkernel/BKE_icons.h | 2 +- source/blender/blenkernel/BKE_subdiv_ccg.h | 2 +- .../blender/editors/gpencil_legacy/annotate_draw.c | 4 ++-- .../blender/editors/gpencil_legacy/annotate_paint.c | 2 +- source/blender/editors/gpencil_legacy/gpencil_data.c | 2 +- .../blender/editors/gpencil_legacy/gpencil_paint.c | 2 +- .../editors/gpencil_legacy/gpencil_primitive.c | 2 +- source/blender/editors/sculpt_paint/paint_vertex.cc | 6 +++--- .../blender/editors/space_outliner/outliner_tools.cc | 2 +- .../blender/editors/space_view3d/view3d_navigate.cc | 2 +- .../transform/transform_convert_gpencil_legacy.c | 12 ++++++------ .../editors/transform/transform_convert_object.c | 2 +- .../editors/transform/transform_draw_cursors.c | 2 +- source/blender/makesrna/intern/rna_scene.c | 2 +- source/blender/windowmanager/intern/wm_dragdrop.cc | 2 +- source/blender/windowmanager/intern/wm_window.c | 7 +++---- 17 files changed, 27 insertions(+), 28 deletions(-) diff --git a/intern/ghost/intern/GHOST_SystemWayland.cc b/intern/ghost/intern/GHOST_SystemWayland.cc index 9933ae8f017..be56708997f 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cc +++ b/intern/ghost/intern/GHOST_SystemWayland.cc @@ -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)); } diff --git a/source/blender/blenkernel/BKE_icons.h b/source/blender/blenkernel/BKE_icons.h index db310f332ac..e8468b91f30 100644 --- a/source/blender/blenkernel/BKE_icons.h +++ b/source/blender/blenkernel/BKE_icons.h @@ -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, diff --git a/source/blender/blenkernel/BKE_subdiv_ccg.h b/source/blender/blenkernel/BKE_subdiv_ccg.h index 286dec82ccf..d22e014a8a7 100644 --- a/source/blender/blenkernel/BKE_subdiv_ccg.h +++ b/source/blender/blenkernel/BKE_subdiv_ccg.h @@ -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. */ diff --git a/source/blender/editors/gpencil_legacy/annotate_draw.c b/source/blender/editors/gpencil_legacy/annotate_draw.c index 49616670e15..e3346fe9690 100644 --- a/source/blender/editors/gpencil_legacy/annotate_draw.c +++ b/source/blender/editors/gpencil_legacy/annotate_draw.c @@ -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); diff --git a/source/blender/editors/gpencil_legacy/annotate_paint.c b/source/blender/editors/gpencil_legacy/annotate_paint.c index d7163cc52a1..17c1fcefb89 100644 --- a/source/blender/editors/gpencil_legacy/annotate_paint.c +++ b/source/blender/editors/gpencil_legacy/annotate_paint.c @@ -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) { diff --git a/source/blender/editors/gpencil_legacy/gpencil_data.c b/source/blender/editors/gpencil_legacy/gpencil_data.c index 32368022afe..846e2f3893f 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_data.c +++ b/source/blender/editors/gpencil_legacy/gpencil_data.c @@ -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; diff --git a/source/blender/editors/gpencil_legacy/gpencil_paint.c b/source/blender/editors/gpencil_legacy/gpencil_paint.c index aeb74980935..41979f33273 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_paint.c +++ b/source/blender/editors/gpencil_legacy/gpencil_paint.c @@ -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) { diff --git a/source/blender/editors/gpencil_legacy/gpencil_primitive.c b/source/blender/editors/gpencil_legacy/gpencil_primitive.c index 004d6d4d9ef..c46a1311dc6 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_primitive.c +++ b/source/blender/editors/gpencil_legacy/gpencil_primitive.c @@ -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); diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc index 49e938af181..10eeb2a63e4 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.cc +++ b/source/blender/editors/sculpt_paint/paint_vertex.cc @@ -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 *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; diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index 840945df81c..608a32ffef6 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -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)) { diff --git a/source/blender/editors/space_view3d/view3d_navigate.cc b/source/blender/editors/space_view3d/view3d_navigate.cc index 11db6a3f5bf..ababb996792 100644 --- a/source/blender/editors/space_view3d/view3d_navigate.cc +++ b/source/blender/editors/space_view3d/view3d_navigate.cc @@ -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. * diff --git a/source/blender/editors/transform/transform_convert_gpencil_legacy.c b/source/blender/editors/transform/transform_convert_gpencil_legacy.c index 6a5aac14496..89b449b8bd5 100644 --- a/source/blender/editors/transform/transform_convert_gpencil_legacy.c +++ b/source/blender/editors/transform/transform_convert_gpencil_legacy.c @@ -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); } diff --git a/source/blender/editors/transform/transform_convert_object.c b/source/blender/editors/transform/transform_convert_object.c index a0364642d1f..5945ebc2860 100644 --- a/source/blender/editors/transform/transform_convert_object.c +++ b/source/blender/editors/transform/transform_convert_object.c @@ -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); } diff --git a/source/blender/editors/transform/transform_draw_cursors.c b/source/blender/editors/transform/transform_draw_cursors.c index b76cfce7e96..bafc1df399f 100644 --- a/source/blender/editors/transform/transform_draw_cursors.c +++ b/source/blender/editors/transform/transform_draw_cursors.c @@ -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)) { diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 04d2d2e8c84..c2dc81bb9e5 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -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"); diff --git a/source/blender/windowmanager/intern/wm_dragdrop.cc b/source/blender/windowmanager/intern/wm_dragdrop.cc index fc7f5181bde..6575a2fc91d 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.cc +++ b/source/blender/windowmanager/intern/wm_dragdrop.cc @@ -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); } diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 422739e126a..8f43a72ccd7 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -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);