diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-04 02:29:53 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-04 02:31:11 +0300 |
commit | 8b06c524d207f5e67ef22d6a1869c94d8f91717f (patch) | |
tree | 3a89ed263632daa2b9bd49971ef45dee46744375 /source/blender/editors | |
parent | fd2519e0b6948903892c3cfc373c903337979407 (diff) |
Cleanup: spelling in comments, function name
Diffstat (limited to 'source/blender/editors')
17 files changed, 39 insertions, 36 deletions
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c index f175145fca7..f720f261ad5 100644 --- a/source/blender/editors/gpencil/annotate_draw.c +++ b/source/blender/editors/gpencil/annotate_draw.c @@ -110,7 +110,9 @@ static void annotation_draw_stroke_arrow_buffer(uint pos, immEnd(); } -/* draw stroke defined in buffer (simple ogl lines/points for now, as dotted lines) */ +/** + * Draw stroke defined in buffer (simple GPU lines/points for now, as dotted lines). + */ static void annotation_draw_stroke_buffer(bGPdata *gps, short thickness, short dflag, @@ -298,7 +300,9 @@ static void annotation_draw_stroke_point(const bGPDspoint *points, immUnbindProgram(); } -/* draw a given stroke in 3d (i.e. in 3d-space), using simple ogl lines */ +/** + * Draw a given stroke in 3d (i.e. in 3d-space), using simple GPU lines. + */ static void annotation_draw_stroke_3d( const bGPDspoint *points, int totpoints, short thickness, const float ink[4], bool cyclic) { diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index 5ab4a663efe..1a7b034f2f8 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -2466,10 +2466,10 @@ static int annotation_draw_modal(bContext *C, wmOperator *op, const wmEvent *eve EVT_PAD7, EVT_PAD8, EVT_PAD9)) { - /* allow numpad keys so that camera/view manipulations can still take place - * - PAD0 in particular is really important for Grease Pencil drawing, + /* Allow numpad keys so that camera/view manipulations can still take place + * - #EVT_PAD0 in particular is really important for Grease Pencil drawing, * as animators may be working "to camera", so having this working - * is essential for ensuring that they can quickly return to that view + * is essential for ensuring that they can quickly return to that view. */ } else if ((event->type == EVT_BKEY) && (event->val == KM_RELEASE)) { diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 4862545e917..22bdc1af119 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -3649,10 +3649,10 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) EVT_PAD7, EVT_PAD8, EVT_PAD9)) { - /* allow numpad keys so that camera/view manipulations can still take place - * - PAD0 in particular is really important for Grease Pencil drawing, + /* Allow numpad keys so that camera/view manipulations can still take place + * - #EVT_PAD0 in particular is really important for Grease Pencil drawing, * as animators may be working "to camera", so having this working - * is essential for ensuring that they can quickly return to that view + * is essential for ensuring that they can quickly return to that view. */ } else if ((!ELEM(p->paintmode, GP_PAINTMODE_ERASER, GP_PAINTMODE_SET_CP))) { diff --git a/source/blender/editors/include/ED_numinput.h b/source/blender/editors/include/ED_numinput.h index 77c3794b6fc..12e3ffee627 100644 --- a/source/blender/editors/include/ED_numinput.h +++ b/source/blender/editors/include/ED_numinput.h @@ -66,14 +66,14 @@ struct UnitSettings; * \{ */ /** - * There are important things to note here for code using numinput: + * There are important things to note here for code using numeric-input: * - Values passed to #applyNumInput() should be valid and are stored as default ones (val_org), * if it is not EDITED. - * - bool returned by #applyNumInput should be used to decide whether to apply - * numinput-specific post-process to data. + * - `bool` returned by #applyNumInput should be used to decide whether to apply + * numeric-input-specific post-process to data. * - Once #applyNumInput has been called, - * #hasNumInput returns a valid value to decide whether to use numinput as drawstr source or not - * (i.e. to call #outputNumInput). + * #hasNumInput returns a valid value to decide whether to use numinput as `drawstr` + * source or not (i.e. to call #outputNumInput). * * Those two steps have to be separated * (so do not use a common call to #hasNumInput() to do both in the same time!). diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 80fef93faf8..dbb2ea1dd42 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -3903,8 +3903,8 @@ static void ui_do_but_textedit( char ascii = event->ascii; const char *utf8_buf = event->utf8_buf; - /* exception that's useful for number buttons, some keyboard - * numpads have a comma instead of a period */ + /* Exception that's useful for number buttons, some keyboard + * numpads have a comma instead of a period. */ if (ELEM(but->type, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER)) { /* Could use `data->min`. */ if (event->type == EVT_PADPERIOD && ascii == ',') { ascii = '.'; diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index d8fc7a4f9d4..8784b1a90d9 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -3552,7 +3552,7 @@ static int edbm_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmE return edbm_select_linked_pick_exec(C, op); } - /* unified_finednearest needs ogl */ + /* #unified_findnearest needs OpenGL. */ view3d_operator_needs_opengl(C); /* setup view context for argument to callbacks */ diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index 8f5aa919ec0..dbb6916dfce 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -571,7 +571,7 @@ static int multiresbake_image_exec(bContext *C, wmOperator *op) /* ****************** render BAKING ********************** */ -/* catch esc */ +/** Catch escape key to cancel. */ static int objects_bake_render_modal(bContext *C, wmOperator *UNUSED(op), const wmEvent *event) { /* no running blender, remove handler and pass through */ diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index 3b40a10eb2a..3529574a3a4 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -123,7 +123,7 @@ static void bake_progress_update(void *bjv, float progress) } } -/* catch esc */ +/** Catch escape key to cancel. */ static int bake_modal(bContext *C, wmOperator *UNUSED(op), const wmEvent *event) { /* no running blender, remove handler and pass through */ diff --git a/source/blender/editors/render/render_internal.cc b/source/blender/editors/render/render_internal.cc index 03c0f3977b7..33b68dfb47b 100644 --- a/source/blender/editors/render/render_internal.cc +++ b/source/blender/editors/render/render_internal.cc @@ -818,7 +818,7 @@ static void render_drawlock(void *rjv, bool lock) } } -/* catch esc */ +/** Catch escape key to cancel. */ static int screen_render_modal(bContext *C, wmOperator *op, const wmEvent *event) { Scene *scene = (Scene *)op->customdata; diff --git a/source/blender/editors/render/render_preview.cc b/source/blender/editors/render/render_preview.cc index eca30a6ac25..cfb88cd7868 100644 --- a/source/blender/editors/render/render_preview.cc +++ b/source/blender/editors/render/render_preview.cc @@ -259,7 +259,7 @@ static bool render_engine_supports_ray_visibility(const Scene *sce) return !STREQ(sce->r.engine, RE_engine_id_BLENDER_EEVEE); } -static void switch_preview_collection_visibilty(ViewLayer *view_layer, const ePreviewType pr_type) +static void switch_preview_collection_visibility(ViewLayer *view_layer, const ePreviewType pr_type) { /* Set appropriate layer as visible. */ LayerCollection *lc = static_cast<LayerCollection *>(view_layer->layer_collections.first); @@ -329,7 +329,7 @@ static void set_preview_visibility(Main *pr_main, const ePreviewType pr_type, const ePreviewRenderMethod pr_method) { - switch_preview_collection_visibilty(view_layer, pr_type); + switch_preview_collection_visibility(view_layer, pr_type); switch_preview_floor_visibility(pr_main, scene, view_layer, pr_method); BKE_layer_collection_sync(scene, view_layer); } diff --git a/source/blender/editors/render/render_shading.cc b/source/blender/editors/render/render_shading.cc index cd395674177..5e0927eb0cb 100644 --- a/source/blender/editors/render/render_shading.cc +++ b/source/blender/editors/render/render_shading.cc @@ -1141,7 +1141,7 @@ static void light_cache_bake_tag_cache(Scene *scene, wmOperator *op) } } -/* catch esc */ +/** Catch escape key to cancel. */ static int light_cache_bake_modal(bContext *C, wmOperator *op, const wmEvent *event) { Scene *scene = (Scene *)op->customdata; diff --git a/source/blender/editors/space_image/image_sequence.c b/source/blender/editors/space_image/image_sequence.c index abe2a359a69..365cf2542b2 100644 --- a/source/blender/editors/space_image/image_sequence.c +++ b/source/blender/editors/space_image/image_sequence.c @@ -33,9 +33,8 @@ typedef struct ImageFrame { } ImageFrame; /** - * Get a list of frames from the list of image files matching the first file - * name sequence pattern. The files and directory are read from standard - * fileselect operator properties. + * Get a list of frames from the list of image files matching the first file name sequence pattern. + * The files and directory are read from standard file-select operator properties. * * The output is a list of frame ranges, each containing a list of frames with matching names. */ diff --git a/source/blender/editors/transform/transform_mode_timescale.c b/source/blender/editors/transform/transform_mode_timescale.c index a4f46803143..4130f6dc034 100644 --- a/source/blender/editors/transform/transform_mode_timescale.c +++ b/source/blender/editors/transform/transform_mode_timescale.c @@ -123,12 +123,12 @@ void initTimeScale(TransInfo *t) t->flag |= T_NULL_ONE; t->num.val_flag[0] |= NUM_NULL_ONE; - /* num-input has max of (n-1) */ + /* Numeric-input has max of (n-1). */ t->idx_max = 0; t->num.flag = 0; t->num.idx_max = t->idx_max; - /* initialize snap like for everything else */ + /* Initialize snap like for everything else. */ t->snap[0] = t->snap[1] = 1.0f; copy_v3_fl(t->num.val_inc, t->snap[0]); diff --git a/source/blender/editors/transform/transform_mode_timeslide.c b/source/blender/editors/transform/transform_mode_timeslide.c index 4d40c427ef7..d442c12574b 100644 --- a/source/blender/editors/transform/transform_mode_timeslide.c +++ b/source/blender/editors/transform/transform_mode_timeslide.c @@ -203,17 +203,17 @@ void initTimeSlide(TransInfo *t) range[1] = max; } - /* num-input has max of (n-1) */ + /* Numeric-input has max of (n-1). */ t->idx_max = 0; t->num.flag = 0; t->num.idx_max = t->idx_max; - /* initialize snap like for everything else */ + /* Initialize snap like for everything else. */ t->snap[0] = t->snap[1] = 1.0f; copy_v3_fl(t->num.val_inc, t->snap[0]); t->num.unit_sys = t->scene->unit.system; - /* No time unit supporting frames currently... */ + /* No time unit supporting frames currently. */ t->num.unit_type[0] = B_UNIT_NONE; } diff --git a/source/blender/editors/transform/transform_mode_timetranslate.c b/source/blender/editors/transform/transform_mode_timetranslate.c index ea002129d0c..801d79e3fc7 100644 --- a/source/blender/editors/transform/transform_mode_timetranslate.c +++ b/source/blender/editors/transform/transform_mode_timetranslate.c @@ -129,17 +129,17 @@ void initTimeTranslate(TransInfo *t) initMouseInputMode(t, &t->mouse, INPUT_NONE); - /* num-input has max of (n-1) */ + /* Numeric-input has max of (n-1). */ t->idx_max = 0; t->num.flag = 0; t->num.idx_max = t->idx_max; - /* initialize snap like for everything else */ + /* Initialize snap like for everything else. */ t->snap[0] = t->snap[1] = 1.0f; copy_v3_fl(t->num.val_inc, t->snap[0]); t->num.unit_sys = t->scene->unit.system; - /* No time unit supporting frames currently... */ + /* No time unit supporting frames currently. */ t->num.unit_type[0] = B_UNIT_NONE; } diff --git a/source/blender/editors/util/ed_draw.c b/source/blender/editors/util/ed_draw.c index acf7fd713fa..eaa1684930d 100644 --- a/source/blender/editors/util/ed_draw.c +++ b/source/blender/editors/util/ed_draw.c @@ -760,7 +760,7 @@ void ED_region_image_metadata_draw( /* find window pixel coordinates of origin */ GPU_matrix_push(); - /* offset and zoom using ogl */ + /* Offset and zoom using GPU viewport. */ GPU_matrix_translate_2f(x, y); GPU_matrix_scale_2f(zoomx, zoomy); diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index cbf0522c328..bbf84ee74d7 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -1625,7 +1625,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *op) /* NOTE: Selecting faces is delayed so that it doesn't select verts/edges and confuse certain * UV selection checks. * This creates a temporary state which breaks certain UV selection functions that do face - * visibilty checks internally. Current implementation handles each case separately. */ + * visibility checks internally. Current implementation handles each case separately. */ /* call the mesh function if we are in mesh sync sel */ if (ts->uv_flag & UV_SYNC_SELECTION) { @@ -1641,7 +1641,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *op) } /* NOTE(@sidd017): Supporting selections in all cases is quite difficult considering there are - * at least 12 cases to look into (3 mesh selectmodes + 4 uv selectmodes + sticky modes). + * at least 12 cases to look into (3 mesh select-modes + 4 uv select-modes + sticky modes). * For now we select all UV faces as sticky disabled to ensure proper UV selection states (vert * + edge flags) */ if (use_face_center) { |