diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-02-05 08:23:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-02-05 08:23:34 +0300 |
commit | 17e1e2bfd8dfbd6f6fc42cc305e93393342020f7 (patch) | |
tree | 8a164422f7eb7d3aa9f7473c19c80da535c29a05 /source/blender/editors | |
parent | b62b923f544fa1df0aecd56f3568dd5185601306 (diff) |
Cleanup: correct spelling in comments
Diffstat (limited to 'source/blender/editors')
113 files changed, 261 insertions, 258 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 64fa93773b9..24bb58535a5 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -430,7 +430,7 @@ static bool acf_generic_dataexpand_setting_valid(bAnimContext *ac, case ACHANNEL_SETTING_MUTE: return ((ac) && (ac->spacetype == SPACE_NLA)); - /* select is ok for most "ds*" channels (e.g. dsmat) */ + /* Select is ok for most `ds*` channels (e.g. `dsmat`) */ case ACHANNEL_SETTING_SELECT: return true; diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 7afb03b833d..109cf79c786 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -1736,7 +1736,7 @@ static int animchannels_group_exec(bContext *C, wmOperator *op) /* free temp data */ ANIM_animdata_freelist(&anim_data); - /* updatss */ + /* Updates. */ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); } diff --git a/source/blender/editors/animation/anim_motion_paths.c b/source/blender/editors/animation/anim_motion_paths.c index 088ac9dbcba..bd7d0eed2c9 100644 --- a/source/blender/editors/animation/anim_motion_paths.c +++ b/source/blender/editors/animation/anim_motion_paths.c @@ -331,7 +331,7 @@ static void motionpath_calculate_update_range(MPathTarget *mpt, int fcu_sfra = motionpath_get_prev_prev_keyframe(mpt, &fcu_keys, current_frame); int fcu_efra = motionpath_get_next_next_keyframe(mpt, &fcu_keys, current_frame); - /* Extend range furher, since accelleration compensation propagates even further away. */ + /* Extend range fuhrer, since acceleration compensation propagates even further away. */ if (fcu->auto_smoothing != FCURVE_SMOOTH_NONE) { fcu_sfra = motionpath_get_prev_prev_keyframe(mpt, &fcu_keys, fcu_sfra); fcu_efra = motionpath_get_next_next_keyframe(mpt, &fcu_keys, fcu_efra); diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index db3a1b99135..0d1633ab3a2 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -614,7 +614,7 @@ int insert_vert_fcurve( return -1; } - /* set handletype and interpolation */ + /* Set handle-type and interpolation. */ if ((fcu->totvert > 2) && (flag & INSERTKEY_REPLACE) == 0) { BezTriple *bezt = (fcu->bezt + a); diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index fba88e78162..3d1d8d0d1f1 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -699,11 +699,11 @@ void ED_armature_from_edit(Main *bmain, bArmature *arm) BKE_armature_bonelist_free(&arm->bonebase, true); arm->act_bone = NULL; - /* remove zero sized bones, this gives unstable restposes */ + /* Remove zero sized bones, this gives unstable rest-poses. */ for (eBone = arm->edbo->first; eBone; eBone = neBone) { float len_sq = len_squared_v3v3(eBone->head, eBone->tail); neBone = eBone->next; - /* TODO(sergey): How to ensure this is a constexpr? */ + /* TODO(sergey): How to ensure this is a `constexpr`? */ if (len_sq <= square_f(0.000001f)) { /* FLT_EPSILON is too large? */ EditBone *fBone; diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 3c0b6dacbf6..ae1516dad05 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -422,7 +422,7 @@ static void bvh_callback(void *userdata, int index, const BVHTreeRay *ray, BVHTr } } -/* Raytracing for vertex to bone/vertex visibility */ +/* Ray-tracing for vertex to bone/vertex visibility. */ static void heat_ray_tree_create(LaplacianSystem *sys) { const MLoopTri *looptri = sys->heat.mlooptri; diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index 91893af003f..78bce8679bb 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -149,7 +149,7 @@ bool ED_object_posemode_exit(bContext *C, Object *ob) return ok; } -/* if a selected or active bone is protected, throw error (oonly if warn == 1) and return 1 */ +/* if a selected or active bone is protected, throw error (only if warn == 1) and return 1 */ /* only_selected == 1: the active bone is allowed to be protected */ #if 0 /* UNUSED 2.5 */ static bool pose_has_protected_selected(Object *ob, short warn) diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c index 55c9877e55f..38d15d8b880 100644 --- a/source/blender/editors/armature/pose_group.c +++ b/source/blender/editors/armature/pose_group.c @@ -423,7 +423,7 @@ static int group_sort_exec(bContext *C, wmOperator *UNUSED(op)) BLI_addtail(&pose->agroups, agrp_array[i].agrp); } - /* fix changed bone group indizes in bones */ + /* Fix changed bone group indices in bones. */ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { for (i = 0; i < agrp_count; i++) { if (pchan->agrp_index == agrp_array[i].index) { diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index 947e2dbf5aa..45f623f3a9d 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -1106,7 +1106,7 @@ static void poselib_keytag_pose(bContext *C, Scene *scene, tPoseLib_PreviewData if (pchan) { if (!any_bone_selected || ((pchan->bone) && (pchan->bone->flag & BONE_SELECTED))) { if (autokey) { - /* add datasource override for the PoseChannel, to be used later */ + /* Add data-source override for the PoseChannel, to be used later. */ ANIM_relative_keyingset_add_source(&dsources, &pld->ob->id, &RNA_PoseBone, pchan); /* clear any unkeyed tags */ @@ -1142,7 +1142,7 @@ static void poselib_preview_apply(bContext *C, wmOperator *op) /* only recalc pose (and its dependencies) if pose has changed */ if (pld->redraw == PL_PREVIEW_REDRAWALL) { - /* don't clear pose if firsttime */ + /* Don't clear pose if first time. */ if ((pld->flag & PL_PREVIEW_FIRSTTIME) == 0) { poselib_backup_restore(pld); } diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index 0b3c3855059..d3d360aa636 100644 --- a/source/blender/editors/armature/pose_slide.c +++ b/source/blender/editors/armature/pose_slide.c @@ -702,7 +702,7 @@ static void pose_slide_apply(bContext *C, tPoseSlideOp *pso) { tPChanFCurveLink *pfl; - /* sanitise the frame ranges */ + /* Sanitize the frame ranges. */ if (pso->prevFrame == pso->nextFrame) { /* move out one step either side */ pso->prevFrame--; @@ -1125,7 +1125,7 @@ static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event) if (event->val == KM_PRESS) { switch (event->type) { /* Transform Channel Limits */ - /* XXX: Replace these hardcoded hotkeys with a modalmap that can be customised */ + /* XXX: Replace these hard-coded hotkeys with a modal-map that can be customized. */ case EVT_GKEY: /* Location */ { pose_slide_toggle_channels_mode(op, pso, PS_TFM_LOC); @@ -1183,7 +1183,7 @@ static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event) } } else { - /* unhandled event - maybe it was some view manip? */ + /* unhandled event - maybe it was some view manipulation? */ /* allow to pass through */ return OPERATOR_RUNNING_MODAL | OPERATOR_PASS_THROUGH; } diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index 3505aea3f40..722865cc942 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -225,7 +225,7 @@ static void applyarmature_process_selected_recursive(bArmature *arm, ApplyArmature_ParentState new_pstate = {.bone = bone}; if (BLI_findptr(selected, pchan, offsetof(CollectionPointerLink, ptr.data))) { - /* SELECTED BONE: Snap to final pose transform minus unapplied parent effects. + /* SELECTED BONE: Snap to final pose transform minus un-applied parent effects. * * I.e. bone position with accumulated parent effects but no local * transformation will match the original final pose_mat. diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c index 2a6dc9f406b..7e6da7f96b0 100644 --- a/source/blender/editors/armature/pose_utils.c +++ b/source/blender/editors/armature/pose_utils.c @@ -312,7 +312,7 @@ void poseAnim_mapping_autoKeyframe(bContext *C, Scene *scene, ListBase *pfLinks, continue; } - /* add datasource override for the PoseChannel, to be used later */ + /* Add data-source override for the PoseChannel, to be used later. */ ANIM_relative_keyingset_add_source(&dsources, &pfl->ob->id, &RNA_PoseBone, pchan); /* clear any unkeyed tags */ diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index c09bf41e152..1820c2f133c 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -433,7 +433,7 @@ void UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3], * (for anything fancy use UI_GetThemeColor[Fancy] then BLF_color) */ void UI_FontThemeColor(int fontid, int colorid); -/* clear the framebuffer using the input colorid */ +/* Clear the frame-buffer using the input colorid. */ void UI_ThemeClearColor(int colorid); /* internal (blender) usage only, for init and set active */ diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 4f70d68f495..10cbc2dc5fa 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1422,10 +1422,10 @@ static bool ui_but_event_property_operator_string(const bContext *C, // printf("prop shortcut: '%s' (%s)\n", RNA_property_identifier(prop), data_path); } - /* we have a datapath! */ + /* We have a data-path! */ bool found = false; if (data_path || (prop_enum_value_ok && prop_enum_value_id)) { - /* create a property to host the "datapath" property we're sending to the operators */ + /* Create a property to host the "data_path" property we're sending to the operators. */ IDProperty *prop_path; const IDPropertyTemplate val = {0}; @@ -1945,7 +1945,7 @@ void ui_fontscale(short *points, float aspect) } } -/* project button or block (but==NULL) to pixels in regionspace */ +/* Project button or block (but==NULL) to pixels in region-space. */ static void ui_but_to_pixelrect(rcti *rect, const ARegion *region, uiBlock *block, uiBut *but) { rctf rectf; @@ -4024,7 +4024,7 @@ static uiBut *ui_def_but(uiBlock *block, but->emboss = block->emboss; but->pie_dir = UI_RADIAL_NONE; - but->block = block; /* pointer back, used for frontbuffer status, and picker */ + but->block = block; /* pointer back, used for front-buffer status, and picker. */ if ((block->flag & UI_BUT_ALIGN) && ui_but_can_align(but)) { but->alignnr = block->alignnr; @@ -4747,7 +4747,7 @@ static int findBitIndex(uint x) return idx; } -/* autocomplete helper functions */ +/* Auto-complete helper functions. */ struct AutoComplete { size_t maxlen; int matches; diff --git a/source/blender/editors/interface/interface_context_menu.c b/source/blender/editors/interface/interface_context_menu.c index 85730d138ac..53a04ec9db5 100644 --- a/source/blender/editors/interface/interface_context_menu.c +++ b/source/blender/editors/interface/interface_context_menu.c @@ -953,7 +953,7 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but) } } - /* If the button reprents an id, it can set the "id" context pointer. */ + /* If the button represents an id, it can set the "id" context pointer. */ if (U.experimental.use_asset_browser && ED_asset_can_make_single_from_context(C)) { ID *id = CTX_data_pointer_get_type(C, "id", &RNA_ID).data; diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 0bae57f14d3..d10cdc207c2 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -355,7 +355,7 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(region), GPU_blend(GPU_BLEND_NONE); # if 0 - /* restore scissortest */ + /* Restore scissor-test. */ GPU_scissor(scissor[0], scissor[1], scissor[2], scissor[3]); # endif @@ -1410,7 +1410,7 @@ void ui_draw_but_UNITVEC(uiBut *but, const uiWidgetColors *wcol, const rcti *rec GPU_batch_uniform_3fv(sphere, "light", light); GPU_batch_draw(sphere); - /* restore */ + /* Restore. */ GPU_face_culling(GPU_CULL_NONE); /* AA circle */ @@ -1740,7 +1740,7 @@ void ui_draw_but_CURVE(ARegion *region, uiBut *but, const uiWidgetColors *wcol, immEnd(); immUnbindProgram(); - /* restore scissortest */ + /* Restore scissor-test. */ GPU_scissor(scissor[0], scissor[1], scissor[2], scissor[3]); /* outline */ @@ -2030,7 +2030,7 @@ void ui_draw_but_CURVEPROFILE(ARegion *region, } immUnbindProgram(); - /* restore scissortest */ + /* Restore scissor-test. */ GPU_scissor(scissor[0], scissor[1], scissor[2], scissor[3]); /* Outline */ diff --git a/source/blender/editors/interface/interface_eyedropper_depth.c b/source/blender/editors/interface/interface_eyedropper_depth.c index ead65a62226..e71a0b9196c 100644 --- a/source/blender/editors/interface/interface_eyedropper_depth.c +++ b/source/blender/editors/interface/interface_eyedropper_depth.c @@ -66,9 +66,9 @@ typedef struct DepthDropper { bool is_undo; bool is_set; - float init_depth; /* for resetting on cancel */ + float init_depth; /* For resetting on cancel. */ - bool accum_start; /* has mouse been presed */ + bool accum_start; /* Has mouse been pressed. */ float accum_depth; int accum_tot; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 9ee625fc02e..ba96b3ce31f 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -349,7 +349,7 @@ typedef struct uiHandleButtonData { #endif ColorBand *coba; - /* tooltip */ + /* Tool-tip. */ uint tooltip_force : 1; /* auto open */ @@ -1617,7 +1617,7 @@ static int ui_handler_region_drag_toggle(bContext *C, const wmEvent *event, void static bool ui_but_is_drag_toggle(const uiBut *but) { return ((ui_drag_toggle_but_is_supported(but) == true) && - /* menu check is importnt so the button dragged over isn't removed instantly */ + /* Menu check is important so the button dragged over isn't removed instantly. */ (ui_block_is_menu(but->block) == false)); } @@ -3710,9 +3710,9 @@ static void ui_do_but_textedit( case EVT_AKEY: - /* Ctrl + A: Select all */ + /* Ctrl-A: Select all. */ #if defined(__APPLE__) - /* OSX uses cmd-a systemwide, so add it */ + /* OSX uses Command-A system-wide, so add it. */ if ((event->oskey && !IS_EVENT_MOD(event, shift, alt, ctrl)) || (event->ctrl && !IS_EVENT_MOD(event, shift, alt, oskey))) #else @@ -3726,7 +3726,7 @@ static void ui_do_but_textedit( break; case EVT_TABKEY: - /* there is a key conflict here, we can't tab with autocomplete */ + /* There is a key conflict here, we can't tab with auto-complete. */ if (but->autocomplete_func || data->searchbox) { const int autocomplete = ui_textedit_autocomplete(C, but, data); changed = autocomplete != AUTOCOMPLETE_NO_MATCH; @@ -4575,7 +4575,7 @@ static int ui_do_but_TOG(bContext *C, uiBut *but, uiHandleButtonData *data, cons return WM_UI_HANDLER_BREAK; } if (ELEM(event->type, MOUSEPAN, WHEELDOWNMOUSE, WHEELUPMOUSE) && event->ctrl) { - /* Support ctrl-wheel to cycle values on expanded enum rows. */ + /* Support Ctrl-Wheel to cycle values on expanded enum rows. */ if (but->type == UI_BTYPE_ROW) { int type = event->type; int val = event->val; @@ -5086,7 +5086,7 @@ static int ui_do_but_NUM( else if (event->type == LEFTMOUSE && event->val == KM_RELEASE) { if (data->dragchange) { #ifdef USE_DRAG_MULTINUM - /* if we started multibutton but didn't drag, then edit */ + /* If we started multi-button but didn't drag, then edit. */ if (data->multi_data.init == BUTTON_MULTI_INIT_SETUP) { click = 1; } @@ -5408,7 +5408,7 @@ static int ui_do_but_SLI( else if (event->type == LEFTMOUSE && event->val == KM_RELEASE) { if (data->dragchange) { #ifdef USE_DRAG_MULTINUM - /* if we started multibutton but didn't drag, then edit */ + /* If we started multi-button but didn't drag, then edit. */ if (data->multi_data.init == BUTTON_MULTI_INIT_SETUP) { click = 1; } @@ -7822,7 +7822,7 @@ static void ui_blocks_set_tooltips(ARegion *region, const bool enable) } /** - * Recreate tooltip (use to update dynamic tips) + * Recreate tool-tip (use to update dynamic tips) */ void UI_but_tooltip_refresh(bContext *C, uiBut *but) { @@ -7921,7 +7921,7 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s return; } - /* highlight has timers for tooltips and auto open */ + /* Highlight has timers for tool-tips and auto open. */ if (state == BUTTON_STATE_HIGHLIGHT) { but->flag &= ~UI_SELECT; @@ -8261,7 +8261,7 @@ static void button_activate_exit( } } - /* disable tooltips until mousemove + last active flag */ + /* Disable tool-tips until mouse-move + last active flag. */ LISTBASE_FOREACH (uiBlock *, block_iter, &data->region->uiblocks) { LISTBASE_FOREACH (uiBut *, bt, &block_iter->buttons) { bt->flag &= ~UI_BUT_LAST_ACTIVE; @@ -8349,7 +8349,7 @@ static uiBut *ui_context_button_active(const ARegion *region, bool (*but_check_c but_found = activebut; - /* recurse into opened menu, like colorpicker case */ + /* Recurse into opened menu, like color-picker case. */ if (data && data->menu && (region != data->menu->region)) { region = data->menu->region; } @@ -8531,7 +8531,7 @@ void UI_context_update_anim_flag(const bContext *C) } if (activebut) { - /* always recurse into opened menu, so all buttons update (like colorpicker) */ + /* Always recurse into opened menu, so all buttons update (like color-picker). */ uiHandleButtonData *data = activebut->active; if (data && data->menu) { region = data->menu->region; @@ -8573,7 +8573,8 @@ static int ui_handle_button_over(bContext *C, const wmEvent *event, ARegion *reg button_activate_init(C, region, but, BUTTON_ACTIVATE_OVER); if (event->alt && but->active) { - /* display tooltips if holding alt on mouseover when tooltips are off in prefs */ + /* Display tool-tips if holding Alt on mouse-over when tool-tips are disabled in the + * preferences. */ but->active->tooltip_force = true; } } @@ -8795,7 +8796,7 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but) button_activate_state(C, but, BUTTON_STATE_EXIT); } else if (event->x != event->prevx || event->y != event->prevy) { - /* re-enable tooltip on mouse move */ + /* Re-enable tool-tip on mouse move. */ ui_blocks_set_tooltips(region, true); button_tooltip_timer_reset(C, but); } @@ -8819,7 +8820,7 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but) break; } /* XXX hardcoded keymap check... but anyway, - * while view changes, tooltips should be removed */ + * while view changes, tool-tips should be removed */ case WHEELUPMOUSE: case WHEELDOWNMOUSE: case MIDDLEMOUSE: @@ -9522,7 +9523,7 @@ static int ui_handle_menu_button(bContext *C, const wmEvent *event, uiPopupBlock /* pass, skip for dialogs */ } else if (!ui_region_contains_point_px(but->active->region, event->x, event->y)) { - /* pass, needed to click-exit outside of non-flaoting menus */ + /* Pass, needed to click-exit outside of non-floating menus. */ ui_region_auto_open_clear(but->active->region); } else if ((!ELEM(event->type, MOUSEMOVE, WHEELUPMOUSE, WHEELDOWNMOUSE, MOUSEPAN)) && @@ -10144,7 +10145,7 @@ static int ui_handle_menu_event(bContext *C, ui_mouse_motion_towards_check(block, menu, &event->x, is_parent_inside == false); - /* check for all parent rects, enables arrowkeys to be used */ + /* Check for all parent rects, enables arrow-keys to be used. */ for (saferct = block->saferct.first; saferct; saferct = saferct->next) { /* for mouse move we only check our own rect, for other * events we check all preceding block rects too to make @@ -10418,7 +10419,7 @@ static int ui_pie_handler(bContext *C, const wmEvent *event, uiPopupBlockHandle } } - /* check pie velociy here if gesture has ended */ + /* Check pie velocity here if gesture has ended. */ if (block->pie_data.flags & UI_PIE_GESTURE_END_WAIT) { float len_sq = 10; @@ -10744,7 +10745,7 @@ static int ui_region_handler(bContext *C, const wmEvent *event, void *UNUSED(use } } - /* re-enable tooltips */ + /* Re-enable tool-tips. */ if (event->type == MOUSEMOVE && (event->x != event->prevx || event->y != event->prevy)) { ui_blocks_set_tooltips(region, true); } @@ -10841,7 +10842,7 @@ static int ui_handler_region_menu(bContext *C, const wmEvent *event, void *UNUSE } } - /* re-enable tooltips */ + /* Re-enable tool-tips. */ if (event->type == MOUSEMOVE && (event->x != event->prevx || event->y != event->prevy)) { ui_blocks_set_tooltips(region, true); } @@ -10935,7 +10936,7 @@ static int ui_popup_handler(bContext *C, const wmEvent *event, void *userdata) WM_event_add_mousemove(win); } else { - /* re-enable tooltips */ + /* Re-enable tool-tips */ if (event->type == MOUSEMOVE && (event->x != event->prevx || event->y != event->prevy)) { ui_blocks_set_tooltips(menu->region, true); } @@ -10945,7 +10946,7 @@ static int ui_popup_handler(bContext *C, const wmEvent *event, void *userdata) ui_apply_but_funcs_after(C); if (reset_pie) { - /* reaqcuire window in case pie invalidates it somehow */ + /* Reacquire window in case pie invalidates it somehow. */ wmWindow *win = CTX_wm_window(C); if (win) { diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index f4e68ca3909..6a921f3f541 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -525,7 +525,7 @@ struct uiBlock { /** for doing delayed */ int bounds, minbounds; - /** pulldowns, to detect outside, can differ per case how it is created */ + /** pull-downs, to detect outside, can differ per case how it is created. */ rctf safety; /** uiSafetyRct list */ ListBase saferct; @@ -659,7 +659,7 @@ void ui_block_cm_to_display_space_v3(uiBlock *block, float pixel[3]); /* interface_regions.c */ struct uiKeyNavLock { - /* set when we're using keyinput */ + /* Set when we're using key-input. */ bool is_keynav; /* only used to check if we've moved the cursor */ int event_xy[2]; @@ -756,7 +756,7 @@ uiBlock *ui_block_func_COLOR(struct bContext *C, uiPopupBlockHandle *handle, voi ColorPicker *ui_block_colorpicker_create(struct uiBlock *block); /* interface_region_search.c */ -/* Searchbox for string button */ +/* Search-box for string button. */ struct ARegion *ui_searchbox_create_generic(struct bContext *C, struct ARegion *butregion, uiButSearch *search_but); diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 3281b8de920..fef243d7193 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -2642,7 +2642,7 @@ void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname static void search_id_collection(StructRNA *ptype, PointerRNA *r_ptr, PropertyRNA **r_prop) { /* look for collection property in Main */ - /* Note: using global Main is OK-ish here, UI shall not access other Mains anyay... */ + /* NOTE: using global Main is OK-ish here, UI shall not access other Mains anyway. */ RNA_main_pointer_create(G_MAIN, r_ptr); *r_prop = NULL; @@ -2821,7 +2821,7 @@ void ui_item_menutype_func(bContext *C, uiLayout *layout, void *arg_mt) UI_menutype_draw(C, mt, layout); - /* menus are created flipped (from event handling pov) */ + /* Menus are created flipped (from event handling point of view). */ layout->root->block->flag ^= UI_BLOCK_IS_FLIP; } diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index e5aa0665a16..05a2a6ef29b 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -901,7 +901,7 @@ bool UI_context_copy_to_selected_list(bContext *C, MEM_freeN(link); } else { - /* avoid prepending 'data' to the path */ + /* Avoid prepending 'data' to the path. */ RNA_id_pointer_create(id_data, &link->ptr); } diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index b4af63b6f4d..9a13918bb69 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1339,7 +1339,7 @@ void ui_draw_aligned_panel(const uiStyle *style, { const Panel *panel = block->panel; - /* Add 0.001f to prevent flicker frpm float inaccuracy. */ + /* Add 0.001f to prevent flicker from float inaccuracy. */ const rcti header_rect = { rect->xmin, rect->xmax, @@ -2366,7 +2366,7 @@ static int ui_handle_panel_category_cycling(const wmEvent *event, PanelCategoryDyn *pc_dyn = UI_panel_category_find(region, category); if (LIKELY(pc_dyn)) { if (is_mousewheel) { - /* We can probably get rid of this and only allow ctrl-tabbing. */ + /* We can probably get rid of this and only allow Ctrl-Tabbing. */ pc_dyn = (event->type == WHEELDOWNMOUSE) ? pc_dyn->next : pc_dyn->prev; } else { diff --git a/source/blender/editors/interface/interface_region_menu_pie.c b/source/blender/editors/interface/interface_region_menu_pie.c index d047d5421d7..81c627816b9 100644 --- a/source/blender/editors/interface/interface_region_menu_pie.c +++ b/source/blender/editors/interface/interface_region_menu_pie.c @@ -392,7 +392,7 @@ void ui_pie_menu_level_create(uiBlock *block, EnumPropertyItem *remaining = MEM_mallocN(array_size + sizeof(EnumPropertyItem), "pie_level_item_array"); memcpy(remaining, items + totitem_parent, array_size); - /* a NULL terminating sentinal element is required */ + /* A NULL terminating sentinel element is required. */ memset(&remaining[totitem_remain], 0, sizeof(EnumPropertyItem)); /* yuk, static... issue is we can't reliably free this without doing dangerous changes */ diff --git a/source/blender/editors/interface/interface_region_popup.c b/source/blender/editors/interface/interface_region_popup.c index 62b8ce9d3eb..3228e9741bb 100644 --- a/source/blender/editors/interface/interface_region_popup.c +++ b/source/blender/editors/interface/interface_region_popup.c @@ -539,7 +539,7 @@ static void ui_popup_block_remove(bContext *C, uiPopupBlockHandle *handle) CTX_wm_window_set(C, win); ui_region_temp_remove(C, screen, handle->region); - /* Reset context (area and region were NULL'ed when chaning context window). */ + /* Reset context (area and region were NULL'ed when changing context window). */ CTX_wm_window_set(C, ctx_win); CTX_wm_area_set(C, ctx_area); CTX_wm_region_set(C, ctx_region); diff --git a/source/blender/editors/interface/interface_region_search.c b/source/blender/editors/interface/interface_region_search.c index d5a9a94b8ae..d1d4290bd11 100644 --- a/source/blender/editors/interface/interface_region_search.c +++ b/source/blender/editors/interface/interface_region_search.c @@ -289,7 +289,7 @@ int ui_searchbox_find_index(ARegion *region, const char *name) return UI_search_items_find_index(&data->items, name); } -/* x and y in screencoords */ +/* x and y in screen-coords. */ bool ui_searchbox_inside(ARegion *region, int x, int y) { uiSearchboxData *data = region->regiondata; @@ -1060,7 +1060,7 @@ void ui_but_search_refresh(uiButSearch *search_but) ui_searchbox_update_fn(but->block->evil_C, search_but, but->drawstr, items); - /* only redalert when we are sure of it, this can miss cases when >10 matches */ + /* Only red-alert when we are sure of it, this can miss cases when >10 matches. */ if (items->totitem == 0) { UI_but_flag_enable(but, UI_BUT_REDALERT); } diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 8127a32b271..cf0c1444d4d 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -349,7 +349,7 @@ static bool id_search_allows_id(TemplateID *template_ui, const int flag, ID *id, } } - /* Hide dot-datablocks, but only if filter does not force them visible. */ + /* Hide dot prefixed data-blocks, but only if filter does not force them visible. */ if (U.uiflag & USER_HIDE_DOT) { if ((id->name[2] == '.') && (query[0] != '.')) { return false; @@ -923,7 +923,7 @@ static void template_ID(const bContext *C, idfrom = template_ui->ptr.owner_id; // lb = template_ui->idlb; - /* Allow opertators to take the ID from context. */ + /* Allow operators to take the ID from context. */ uiLayoutSetContextPointer(layout, "id", &idptr); block = uiLayoutGetBlock(layout); @@ -934,7 +934,7 @@ static void template_ID(const bContext *C, } if (text) { - /* Add label resepecting the separated layout property split state. */ + /* Add label respecting the separated layout property split state. */ uiItemL_respect_property_split(layout, text, ICON_NONE); } diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 0c3448b987d..8b185f5dc20 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -1311,7 +1311,7 @@ static void widgetbase_draw_ex(uiWidgetBase *wtb, tria_col[3] = wcol->item[3]; } - /* Draw everything in one drawcall */ + /* Draw everything in one draw-call. */ if (inner_col1[3] || inner_col2[3] || outline_col[3] || emboss_col[3] || tria_col[3] || show_alpha_checkers) { widgetbase_set_uniform_colors_ubv( @@ -2349,7 +2349,7 @@ static void widget_draw_text_icon(const uiFontStyle *fstyle, int icon_size = BLI_rcti_size_y(rect); int text_size = 0; - /* This is a bit britle, but avoids adding an 'UI_BUT_HAS_LABEL' flag to but... */ + /* This is a bit brittle, but avoids adding an 'UI_BUT_HAS_LABEL' flag to but... */ if (icon_size > BLI_rcti_size_x(rect)) { /* button is not square, it has extra height for label */ text_size = UI_UNIT_Y; @@ -3614,7 +3614,7 @@ static void widget_scroll( rect1.xmin = rect1.xmin + ceilf(fac * (value - but->softmin)); rect1.xmax = rect1.xmin + ceilf(fac * (but->a1 - but->softmin)); - /* ensure minimium size */ + /* Ensure minimum size. */ const float min = BLI_rcti_size_y(rect); if (BLI_rcti_size_x(&rect1) < min) { @@ -3631,7 +3631,7 @@ static void widget_scroll( rect1.ymax = rect1.ymax - ceilf(fac * (value - but->softmin)); rect1.ymin = rect1.ymax - ceilf(fac * (but->a1 - but->softmin)); - /* ensure minimium size */ + /* Ensure minimum size. */ const float min = BLI_rcti_size_x(rect); if (BLI_rcti_size_y(&rect1) < min) { @@ -3668,7 +3668,7 @@ static void widget_progressbar( const float offs = wcol->roundness * BLI_rcti_size_y(&rect_prog); float w = value * BLI_rcti_size_x(&rect_prog); - /* ensure minimium size */ + /* Ensure minimum size. */ w = MAX2(w, offs); rect_bar.xmax = rect_bar.xmin + w; diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 4e642137d2a..6c5e672c6bf 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -2224,7 +2224,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, const wmEvent * scroller_activate_init(C, op, event, in_scroller); v2dScrollerMove *vsm = (v2dScrollerMove *)op->customdata; - /* support for quick jump to location - gtk and qt do this on linux */ + /* Support for quick jump to location - GTK and QT do this on Linux. */ if (event->type == MIDDLEMOUSE) { switch (vsm->scroller) { case 'h': /* horizontal scroller - so only horizontal movement diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c index 8ea3c883433..644aa3903f6 100644 --- a/source/blender/editors/mesh/editmesh_bevel.c +++ b/source/blender/editors/mesh/editmesh_bevel.c @@ -575,7 +575,7 @@ static void edbm_bevel_mouse_set_value(wmOperator *op, const wmEvent *event) opdata->shift_value[vmode] = -1.0f; } - /* clamp accordingto value mode, and store value back */ + /* Clamp according to value mode, and store value back. */ CLAMP(value, value_clamp_min[vmode], value_clamp_max[vmode]); if (vmode == SEGMENTS_VALUE) { opdata->segments = value; diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 379140a821a..1f894ec0f1d 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -210,7 +210,7 @@ typedef struct KnifeTool_OpData { /* run by the UI or not */ bool is_interactive; - /* operatpr options */ + /* Operator options. */ bool cut_through; /* preference, can be modified at runtime (that feature may go) */ bool only_select; /* set on initialization */ bool select_result; /* set on initialization */ diff --git a/source/blender/editors/mesh/editmesh_mask_extract.c b/source/blender/editors/mesh/editmesh_mask_extract.c index 3e0bee3c4b8..7d849c096e7 100644 --- a/source/blender/editors/mesh/editmesh_mask_extract.c +++ b/source/blender/editors/mesh/editmesh_mask_extract.c @@ -81,7 +81,7 @@ typedef struct GeometryExtactParams { /* For extracting Mask. */ float mask_threshold; - /* Common paramenters. */ + /* Common parameters. */ bool add_boundary_loop; int num_smooth_iterations; bool apply_shrinkwrap; @@ -106,7 +106,7 @@ static int geometry_extract_apply(bContext *C, BKE_sculpt_mask_layers_ensure(ob, NULL); - /* Ensures that deformation from sculpt mode is taken into accunt before duplicating the mesh to + /* Ensures that deformation from sculpt mode is taken into account before duplicating the mesh to * extract the geometry. */ CTX_data_ensure_evaluated_depsgraph(C); @@ -385,7 +385,7 @@ static int face_set_extract_modal(bContext *C, wmOperator *op, const wmEvent *ev ED_workspace_status_text(C, NULL); /* This modal operator uses and eyedropper to pick a Face Set from the mesh. This ensures - * that the mouse clicked in a viewport region and its coordinates can be used to raycast + * that the mouse clicked in a viewport region and its coordinates can be used to ray-cast * the PBVH and update the active Face Set ID. */ bScreen *screen = CTX_wm_screen(C); ARegion *region = BKE_screen_find_main_region_at_xy( diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 0c68bb8f82b..c8449644dd0 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -2205,7 +2205,7 @@ void EDBM_selectmode_set(BMEditMesh *em) } } else if (em->selectmode & SCE_SELECT_FACE) { - /* deselect eges, and select again based on face select */ + /* Deselect edges, and select again based on face select. */ BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) { BM_edge_select_set(em->bm, eed, false); } @@ -2247,7 +2247,7 @@ void EDBM_selectmode_convert(BMEditMesh *em, /* first tag-to-select, then select --- this avoids a feedback loop */ - /* have to find out what the selectionmode was previously */ + /* Have to find out what the selection-mode was previously. */ if (selectmode_old == SCE_SELECT_VERTEX) { if (bm->totvertsel == 0) { /* pass */ diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 84f4e35cb0c..d37fccc9f15 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -4010,7 +4010,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) short numcuts = 1; const short mode = RNA_int_get(op->ptr, "type"); - /* allocd vars */ + /* Allocated variables. */ float(*screen_vert_coords)[2], (*sco)[2], (*mouse_path)[2]; /* edit-object needed for matrix, and region->regiondata for projections to work */ diff --git a/source/blender/editors/mesh/editmesh_undo.c b/source/blender/editors/mesh/editmesh_undo.c index 83de760aaa0..d7f7cfa2888 100644 --- a/source/blender/editors/mesh/editmesh_undo.c +++ b/source/blender/editors/mesh/editmesh_undo.c @@ -171,7 +171,7 @@ static void um_arraystore_cd_compact(struct CustomData *cdata, else { bcd_reference_current = NULL; - /* do a full lookup when un-alligned */ + /* Do a full lookup when unaligned. */ if (bcd_reference) { const BArrayCustomData *bcd_iter = bcd_reference; while (bcd_iter) { diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 3b5897de0b0..3450d61337c 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -145,7 +145,7 @@ static void join_mesh_single(Depsgraph *depsgraph, if (ob_src != ob_dst) { float cmat[4][4]; - /* watch this: switch matmul order really goes wrong */ + /* Watch this: switch matrix multiplication order really goes wrong. */ mul_m4_m4m4(cmat, imat, ob_src->obmat); /* transform vertex coordinates into new space */ @@ -733,7 +733,7 @@ int ED_mesh_join_objects_exec(bContext *C, wmOperator *op) BKE_key_sort(key); } - /* Due to dependnecy cycle some other object might access old derived data. */ + /* Due to dependency cycle some other object might access old derived data. */ BKE_object_free_derived_caches(ob); DEG_relations_tag_update(bmain); /* removed objects, need to rebuild dag */ diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 9ab5eafa84d..2d3505fa9d0 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1711,9 +1711,8 @@ static int object_speaker_add_exec(bContext *C, wmOperator *op) Object *ob = ED_object_add_type(C, OB_SPEAKER, NULL, loc, rot, false, local_view_bits); const bool is_liboverride = ID_IS_OVERRIDE_LIBRARY(ob); - /* to make it easier to start using this immediately in NLA, a default sound clip is created - * ready to be moved around to retime the sound and/or make new sound clips - */ + /* To make it easier to start using this immediately in NLA, a default sound clip is created + * ready to be moved around to re-time the sound and/or make new sound clips. */ { /* create new data for NLA hierarchy */ AnimData *adt = BKE_animdata_add_id(&ob->id); diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index db9e51a490d..b1ba856ff0f 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -1339,7 +1339,7 @@ static int bake(const BakeAPIRender *bkr, highpoly[i].ob_eval->base_flag |= (BASE_VISIBLE_DEPSGRAPH | BASE_ENABLED_RENDER); highpoly[i].me = BKE_mesh_new_from_object(NULL, highpoly[i].ob_eval, false); - /* lowpoly to highpoly transformation matrix */ + /* Low-poly to high-poly transformation matrix. */ copy_m4_m4(highpoly[i].obmat, highpoly[i].ob->obmat); invert_m4_m4(highpoly[i].imat, highpoly[i].obmat); diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c index 4cbb8858bf4..a80810cc734 100644 --- a/source/blender/editors/object/object_data_transfer.c +++ b/source/blender/editors/object/object_data_transfer.c @@ -65,7 +65,7 @@ static const EnumPropertyItem DT_layer_items[] = { 0, "Vertex Group(s)", "Transfer active or all vertex groups"}, -#if 0 /* XXX For now, would like to finish/merge work from 2014 gsoc first. */ +#if 0 /* XXX For now, would like to finish/merge work from 2014 GSOC first. */ {DT_TYPE_SHAPEKEY, "SHAPEKEYS", 0, "Shapekey(s)", "Transfer active or all shape keys"}, #endif /* XXX When SkinModifier is enabled, diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 6350ffb9c77..7e0e52d3874 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -3024,7 +3024,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op) i++; } - /* make a copy of ocean to use for baking - threadsafety */ + /* Make a copy of ocean to use for baking - thread-safety. */ struct Ocean *ocean = BKE_ocean_add(); BKE_ocean_init_from_modifier(ocean, omd, omd->resolution); diff --git a/source/blender/editors/object/object_remesh.c b/source/blender/editors/object/object_remesh.c index d560d347217..f55ce88b426 100644 --- a/source/blender/editors/object/object_remesh.c +++ b/source/blender/editors/object/object_remesh.c @@ -327,7 +327,7 @@ static void voxel_size_edit_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), const float total_len = len_v3v3(cd->preview_plane[0], cd->preview_plane[1]); const int tot_lines = (int)(total_len / cd->voxel_size); - /* Smoothstep to reduce the alpha of the grid as the line number increases. */ + /* Smooth-step to reduce the alpha of the grid as the line number increases. */ const float a = VOXEL_SIZE_EDIT_MAX_GRIDS_LINES * 0.1f; const float b = VOXEL_SIZE_EDIT_MAX_GRIDS_LINES; const float x = clamp_f((tot_lines - a) / (b - a), 0.0f, 1.0); @@ -738,7 +738,7 @@ static int quadriflow_break_job(void *customdata) return should_break; } -/* called by oceanbake, wmJob sends notifier */ +/** Called by ocean-bake, #wmJob sends notifier. */ static void quadriflow_update_job(void *customdata, float progress, int *cancel) { QuadriFlowJob *qj = customdata; @@ -982,7 +982,7 @@ static int quadriflow_remesh_exec(bContext *C, wmOperator *op) quadriflow_free_job(job); } else { - /* Non blocking call. For when the operator has been called from the gui */ + /* Non blocking call. For when the operator has been called from the GUI. */ job->is_nonblocking_job = true; wmJob *wm_job = WM_jobs_get(CTX_wm_manager(C), diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 50dac12ab57..1e6a7b9f14e 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -317,7 +317,7 @@ bool ED_object_jump_to_object(bContext *C, Object *ob, const bool UNUSED(reveal_ /** * Select and make the target object and bone active. * Switches to Pose mode if in Object mode so the selection is visible. - * Unhides the target bone and bone layer if necessary. + * Un-hides the target bone and bone layer if necessary. * * \returns false if object not in layer, bone not found, or other error */ diff --git a/source/blender/editors/object/object_warp.c b/source/blender/editors/object/object_warp.c index b36a8543d67..8f5a60ace2e 100644 --- a/source/blender/editors/object/object_warp.c +++ b/source/blender/editors/object/object_warp.c @@ -75,7 +75,7 @@ static void object_warp_transverts_minmax_x(TransVertStore *tvs, for (int i = 0; i < tvs->transverts_tot; i++, tv++) { float val; - /* convert objectspace->viewspace */ + /* Convert object-space to view-space. */ val = dot_m4_v3_row_x(mat_view, tv->loc); min = min_ff(min, val); @@ -123,7 +123,7 @@ static void object_warp_transverts(TransVertStore *tvs, float co[3], co_add[2]; float val, phi; - /* convert objectspace->viewspace */ + /* Convert object-space to view-space. */ mul_v3_m4v3(co, mat_view, tv->loc); sub_v2_v2(co, center_view); @@ -158,7 +158,7 @@ static void object_warp_transverts(TransVertStore *tvs, add_v2_v2(co, co_add); - /* convert viewspace->objectspace */ + /* Convert view-space to object-space. */ add_v2_v2(co, center_view); mul_v3_m4v3(tv->loc, imat_view, co); } @@ -187,7 +187,7 @@ static int object_warp_verts_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* get viewmatrix */ + /* Get view-matrix. */ { PropertyRNA *prop_viewmat = RNA_struct_find_property(op->ptr, "viewmat"); if (RNA_property_is_set(op->ptr, prop_viewmat)) { diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 3a6201fd418..d7e30f2b65c 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -2905,7 +2905,7 @@ static void remove_tagged_keys(Depsgraph *depsgraph, Object *ob, ParticleSystem } } -/************************ subdivide opertor *********************/ +/************************ subdivide operator *********************/ /* works like normal edit mode subdivide, inserts keys between neighboring selected keys */ static void subdivide_particle(PEData *data, int pa_index) @@ -3029,7 +3029,7 @@ void PARTICLE_OT_subdivide(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -/************************ remove doubles opertor *********************/ +/************************ remove doubles operator *********************/ static int remove_doubles_exec(bContext *C, wmOperator *op) { @@ -4565,7 +4565,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) mval[0] = mouse[0]; mval[1] = mouse[1]; - /* disable locking temporatily for disconnected hair */ + /* Disable locking temporarily for disconnected hair. */ if (edit->psys && edit->psys->flag & PSYS_GLOBAL_HAIR) { pset->flag &= ~PE_LOCK_FIRST; } @@ -5003,7 +5003,7 @@ static int shape_cut_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_CANCELLED; } - /* disable locking temporatily for disconnected hair */ + /* Disable locking temporarily for disconnected hair. */ if (edit->psys && edit->psys->flag & PSYS_GLOBAL_HAIR) { pset->flag &= ~PE_LOCK_FIRST; } diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 10cf4131584..4b84894c23d 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -1098,7 +1098,7 @@ void RENDER_OT_render(wmOperatorType *ot) ot->cancel = screen_render_cancel; ot->exec = screen_render_exec; - /* this isn't needed, causes failer in background mode */ + /* This isn't needed, causes failure in background mode. */ #if 0 ot->poll = ED_operator_screenactive; #endif diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index e30149fde73..4e766841c24 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -1184,7 +1184,7 @@ static void icon_copy_rect(ImBuf *ibuf, uint w, uint h, uint *rect) return; } - /* waste of cpu cyles... but the imbuf API has no other way to scale fast (ton) */ + /* Waste of cpu cycles... but the imbuf API has no other way to scale fast (ton). */ ima = IMB_dupImBuf(ibuf); if (!ima) { diff --git a/source/blender/editors/screen/screen_draw.c b/source/blender/editors/screen/screen_draw.c index 6432bdac1b1..1ea64c542f5 100644 --- a/source/blender/editors/screen/screen_draw.c +++ b/source/blender/editors/screen/screen_draw.c @@ -478,7 +478,7 @@ void ED_screen_draw_split_preview(ScrArea *area, const int dir, const float fac) uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); - /* splitpoint */ + /* Split-point. */ GPU_blend(GPU_BLEND_ALPHA); immUniformColor4ub(255, 255, 255, 100); diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 0868d5a5fe9..c25b572d200 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1024,7 +1024,7 @@ void screen_change_update(bContext *C, wmWindow *win, bScreen *screen) WM_event_add_notifier(C, NC_WINDOW, NULL); WM_event_add_notifier(C, NC_SCREEN | ND_LAYOUTSET, layout); - /* makes button hilites work */ + /* Makes button highlights work. */ WM_event_add_mousemove(win); } @@ -1221,7 +1221,7 @@ void ED_screen_full_restore(bContext *C, ScrArea *area) } /** - * \param toggle_area: If this is set, its space data will be swapped with the one of the new emtpy + * \param toggle_area: If this is set, its space data will be swapped with the one of the new empty * area, when toggling back it can be swapped back again. * \return The newly created screen with the non-normal area. */ diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h index a03e65d8a9d..c51ff559786 100644 --- a/source/blender/editors/screen/screen_intern.h +++ b/source/blender/editors/screen/screen_intern.h @@ -29,10 +29,10 @@ struct bContextDataResult; /* internal exports only */ -#define AZONESPOTW UI_HEADER_OFFSET /* width of corner azone - max */ -#define AZONESPOTH (0.6f * U.widget_unit) /* height of corner azone */ -#define AZONEFADEIN (5.0f * U.widget_unit) /* when azone is totally visible */ -#define AZONEFADEOUT (6.5f * U.widget_unit) /* when we start seeing the azone */ +#define AZONESPOTW UI_HEADER_OFFSET /* width of corner #AZone - max */ +#define AZONESPOTH (0.6f * U.widget_unit) /* height of corner #AZone */ +#define AZONEFADEIN (5.0f * U.widget_unit) /* when #AZone is totally visible */ +#define AZONEFADEOUT (6.5f * U.widget_unit) /* when we start seeing the #AZone */ #define AREAJOINTOLERANCE (1.0f * U.widget_unit) /* Edges must be close to allow joining. */ diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index ca1c75be0a1..244d8c10e4e 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -1637,7 +1637,7 @@ static int area_snap_calc_location(const bScreen *screen, /* Thirds. */ 1.0f / 3.0f, 2.0f / 3.0f, - /* Quaters. */ + /* Quarters. */ 1.0f / 4.0f, 3.0f / 4.0f, /* Eighth. */ diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 550913fc8af..7eb08cbabac 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -1755,7 +1755,7 @@ static void paint_cursor_cursor_draw_3d_view_brush_cursor_active(PaintCursorCont else if (brush->cloth_force_falloff_type == BRUSH_CLOTH_FORCE_FALLOFF_RADIAL && brush->cloth_simulation_area_type == BRUSH_CLOTH_SIMULATION_AREA_LOCAL) { /* Display the simulation limits if sculpting outside them. */ - /* This does not makes much sense of plane falloff as the falloff is infinte or global. */ + /* This does not makes much sense of plane falloff as the falloff is infinite or global. */ if (len_v3v3(ss->cache->true_location, ss->cache->true_initial_location) > ss->cache->radius * (1.0f + brush->cloth_sim_limit)) { diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 27726b8370e..5330e85c732 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -138,7 +138,7 @@ BLI_INLINE uchar f_to_char(const float val) #ifndef PROJ_DEBUG_NOSEAMBLEED /* projectFaceSeamFlags options */ -//#define PROJ_FACE_IGNORE (1<<0) /* When the face is hidden, backfacing or occluded */ +//#define PROJ_FACE_IGNORE (1<<0) /* When the face is hidden, back-facing or occluded. */ //#define PROJ_FACE_INIT (1<<1) /* When we have initialized the faces data */ /* If this face has a seam on any of its edges. */ @@ -150,7 +150,7 @@ BLI_INLINE uchar f_to_char(const float val) # define PROJ_FACE_NOSEAM1 (1 << 5) # define PROJ_FACE_NOSEAM2 (1 << 6) -/* If the seam is completely initialized, including adjecent seams. */ +/* If the seam is completely initialized, including adjacent seams. */ # define PROJ_FACE_SEAM_INIT0 (1 << 8) # define PROJ_FACE_SEAM_INIT1 (1 << 9) # define PROJ_FACE_SEAM_INIT2 (1 << 10) @@ -294,7 +294,7 @@ typedef struct ProjPaintState { /** verts projected into floating point screen space. */ float (*screenCoords)[4]; - /** 2D bounds for mesh verts on the screen's plane (screenspace). */ + /** 2D bounds for mesh verts on the screen's plane (screen-space). */ float screenMin[2]; float screenMax[2]; /** Calculated from screenMin & screenMax. */ @@ -310,10 +310,10 @@ typedef struct ProjPaintState { bool do_stencil_brush; bool do_material_slots; - /** Use raytraced occlusion? - ortherwise will paint right through to the back. */ + /** Use ray-traced occlusion? - otherwise will paint right through to the back. */ bool do_occlude; /** ignore faces with normals pointing away, - * skips a lot of raycasts if your normals are correctly flipped. */ + * skips a lot of ray-casts if your normals are correctly flipped. */ bool do_backfacecull; /** mask out pixels based on their normals. */ bool do_mask_normal; @@ -579,7 +579,7 @@ static Image *project_paint_face_clone_image(const ProjPaintState *ps, int tri_i /* fast projection bucket array lookup, use the safe version for bound checking */ static int project_bucket_offset(const ProjPaintState *ps, const float projCoSS[2]) { - /* If we were not dealing with screenspace 2D coords we could simple do... + /* If we were not dealing with screen-space 2D coords we could simple do... * ps->bucketRect[x + (y*ps->buckets_y)] */ /* please explain? @@ -887,8 +887,8 @@ static int project_paint_occlude_ptv_clip(const float pt[3], return -1; } -/* Check if a screenspace location is occluded by any other faces - * check, pixelScreenCo must be in screenspace, its Z-Depth only needs to be used for comparison +/* Check if a screen-space location is occluded by any other faces + * check, pixelScreenCo must be in screen-space, its Z-Depth only needs to be used for comparison * and doesn't need to be correct in relation to X and Y coords * (this is the case in perspective view) */ static bool project_bucket_point_occluded(const ProjPaintState *ps, @@ -1514,10 +1514,10 @@ static void project_face_seams_init(const ProjPaintState *ps, } #endif // PROJ_DEBUG_NOSEAMBLEED -/* Converts a UV location to a 3D screenspace location +/* Converts a UV location to a 3D screen-space location * Takes a 'uv' and 3 UV coords, and sets the values of pixelScreenCo * - * This is used for finding a pixels location in screenspace for painting */ + * This is used for finding a pixels location in screen-space for painting */ static void screen_px_from_ortho(const float uv[2], const float v1co[3], const float v2co[3], @@ -1537,7 +1537,7 @@ static void screen_px_from_ortho(const float uv[2], static void screen_px_from_persp(const float uv[2], const float v1co[4], const float v2co[4], - const float v3co[4], /* screenspace coords */ + const float v3co[4], /* screen-space coords */ const float uv1co[2], const float uv2co[2], const float uv3co[2], @@ -1923,7 +1923,7 @@ static ProjPixel *project_paint_uvpixel_init(const ProjPaintState *ps, projPixel->newColor.uint = 0; } - /* screenspace unclamped, we could keep its z and w values but don't need them at the moment */ + /* Screen-space unclamped, we could keep its z and w values but don't need them at the moment. */ if (ps->brush->mtex.brush_map_mode == MTEX_MAP_MODE_3D) { copy_v3_v3(projPixel->worldCoSS, world_spaceCo); } @@ -2304,14 +2304,14 @@ static bool project_bucket_isect_circle(const float cent[2], return false; } -/* Note for rect_to_uvspace_ortho() and rect_to_uvspace_persp() +/* Note for #rect_to_uvspace_ortho() and #rect_to_uvspace_persp() * in ortho view this function gives good results when bucket_bounds are outside the triangle * however in some cases, perspective view will mess up with faces - * that have minimal screenspace area (viewed from the side). + * that have minimal screen-space area (viewed from the side). * * for this reason its not reliable in this case so we'll use the Simple Barycentric' - * funcs that only account for points inside the triangle. - * however switching back to this for ortho is always an option */ + * functions that only account for points inside the triangle. + * however switching back to this for ortho is always an option. */ static void rect_to_uvspace_ortho(const rctf *bucket_bounds, const float *v1coSS, @@ -2517,8 +2517,8 @@ static void project_bucket_clip_face(const bool is_ortho, flip = (((line_point_side_v2(v1coSS, v2coSS, v3coSS) > 0.0f) != is_flip_object) != (line_point_side_v2(uv1co, uv2co, uv3co) > 0.0f)); - /* all screenspace points are inside the bucket bounding box, - * this means we don't need to clip and can simply return the UVs */ + /* All screen-space points are inside the bucket bounding box, + * this means we don't need to clip and can simply return the UVs. */ if (flip) { /* facing the back? */ copy_v2_v2(bucket_bounds_uv[0], uv3co); copy_v2_v2(bucket_bounds_uv[1], uv2co); @@ -2635,7 +2635,7 @@ static void project_bucket_clip_face(const bool is_ortho, (line_point_side_v2(uv1co, uv2co, uv3co) > 0.0f)); if (inside_face_flag == ISECT_ALL4) { - /* bucket is totally inside the screenspace face, we can safely use weights */ + /* Bucket is totally inside the screen-space face, we can safely use weights. */ if (is_ortho) { rect_to_uvspace_ortho( @@ -2656,7 +2656,7 @@ static void project_bucket_clip_face(const bool is_ortho, * The 2 cases above are where the face is inside the bucket * or the bucket is inside the face. * - * we need to make a convex polyline from the intersection between the screenspace face + * we need to make a convex poly-line from the intersection between the screen-space face * and the bucket bounds. * * There are a number of ways this could be done, currently it just collects all @@ -2997,7 +2997,7 @@ static void project_paint_face_init(const ProjPaintState *ps, /* vert co screen-space, these will be assigned to lt_vtri[0-2] */ const float *v1coSS, *v2coSS, *v3coSS; - /* vertex screenspace coords */ + /* Vertex screen-space coords. */ const float *vCo[3]; float w[3], wco[3]; @@ -3007,9 +3007,9 @@ static void project_paint_face_init(const ProjPaintState *ps, float pixelScreenCo[4]; bool do_3d_mapping = ps->brush->mtex.brush_map_mode == MTEX_MAP_MODE_3D; - /* ispace bounds */ + /* Image-space bounds. */ rcti bounds_px; - /* vars for getting uvspace bounds */ + /* Variables for getting UV-space bounds. */ /* bucket bounds in UV space so we can init pixels only for this face, */ float lt_uv_pxoffset[3][2]; @@ -3207,10 +3207,10 @@ static void project_paint_face_init(const ProjPaintState *ps, /* inset face coords. NOTE!!! ScreenSace for ortho, Worldspace in perspective view */ float insetCos[3][3]; - /* vertex screenspace coords */ + /* Vertex screen-space coords. */ const float *vCoSS[3]; - /* Store the screenspace coords of the face, + /* Store the screen-space coords of the face, * clipped by the bucket's screen aligned rectangle. */ float bucket_clip_edges[2][2]; float edge_verts_inset_clip[2][3]; @@ -3419,7 +3419,7 @@ static void project_paint_face_init(const ProjPaintState *ps, } /** - * Takes floating point screenspace min/max and + * Takes floating point screen-space min/max and * returns int min/max to be used as indices for ps->bucketRect, ps->bucketFlags */ static void project_paint_bucket_bounds(const ProjPaintState *ps, @@ -3888,7 +3888,7 @@ static void proj_paint_state_cavity_init(ProjPaintState *ps) float no[3]; mul_v3_fl(edges[a], 1.0f / counter[a]); normal_short_to_float_v3(no, mv->no); - /* augment the diffe*/ + /* Augment the difference. */ cavities[a] = saacos(10.0f * dot_v3v3(no, edges[a])) * (float)M_1_PI; } else { @@ -4308,7 +4308,7 @@ static void project_paint_prepare_all_faces(ProjPaintState *ps, slot_last = slot; } - /* don't allow using the same inage for painting and stencilling */ + /* Don't allow using the same image for painting and stenciling. */ if (slot->ima == ps->stencil_ima) { /* Delay continuing the loop until after loop_uvs and bleed faces are initialized. * While this shouldn't be used, face-winding reads all polys. diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c index 8eb2ebd0f19..8fd5759d695 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c @@ -168,8 +168,11 @@ void PAINT_OT_weight_from_bones(wmOperatorType *ot) /** \name Sample Weight Operator * \{ */ -/* sets wp->weight to the closest weight value to vertex */ -/* note: we cant sample frontbuf, weight colors are interpolated too unpredictable */ +/** + * Sets wp->weight to the closest weight value to vertex. + * + * \note we can't sample front-buffer, weight colors are interpolated too unpredictable. + */ static int weight_sample_invoke(bContext *C, wmOperator *op, const wmEvent *event) { Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); @@ -201,7 +204,7 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, const wmEvent *even } else if (ED_mesh_pick_face( C, vc.obact, event->mval, ED_MESH_PICK_DEFAULT_FACE_DIST, &index)) { - /* this relies on knowning the internal worksings of ED_mesh_pick_face_vert() */ + /* This relies on knowing the internal workings of #ED_mesh_pick_face_vert() */ BKE_report( op->reports, RPT_WARNING, "The modifier used does not support deformed locations"); } @@ -604,7 +607,7 @@ static void gradientVert_update(WPGradient_userData *grad_data, int index) Mesh *me = grad_data->me; WPGradient_vertStore *vs = &grad_data->vert_cache->elem[index]; - /* Optionally restrict to assigned verices only. */ + /* Optionally restrict to assigned vertices only. */ if (grad_data->use_vgroup_restrict && ((vs->flag & VGRAD_STORE_DW_EXIST) == 0)) { return; } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 410b83217b4..a53c2efed06 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -8993,7 +8993,7 @@ void SCULPT_fake_neighbors_ensure(Sculpt *sd, Object *ob, const float max_dist) for (int i = 0; i < totvert; i++) { const int from_v = i; - /* This vertex does not have a fake neighbor yet, seach one for it. */ + /* This vertex does not have a fake neighbor yet, search one for it. */ if (ss->fake_neighbors.fake_neighbor_index[from_v] == FAKE_NEIGHBOR_NONE) { const int to_v = SCULPT_fake_neighbor_search(sd, ob, from_v, max_dist); if (to_v != -1) { diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.c b/source/blender/editors/sculpt_paint/sculpt_face_set.c index 1fba958d695..20d8e136d12 100644 --- a/source/blender/editors/sculpt_paint/sculpt_face_set.c +++ b/source/blender/editors/sculpt_paint/sculpt_face_set.c @@ -205,7 +205,7 @@ static void do_relax_face_sets_brush_task_cb_ex(void *__restrict userdata, ss, &test, data->brush->falloff_shape); const bool relax_face_sets = !(ss->cache->iteration_count % 3 == 0); - /* This operations needs a stregth tweak as the relax deformation is too weak by default. */ + /* This operations needs a strength tweak as the relax deformation is too weak by default. */ if (relax_face_sets) { bstrength *= 2.0f; } @@ -313,7 +313,7 @@ static int sculpt_face_set_create_exec(bContext *C, wmOperator *op) const int mode = RNA_enum_get(op->ptr, "mode"); - /* Dyntopo not suported. */ + /* Dyntopo not supported. */ if (BKE_pbvh_type(ss->pbvh) == PBVH_BMESH) { return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c index e11894a8c01..3cf6a8cc561 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c @@ -553,7 +553,7 @@ static void mesh_filter_sharpen_init(SculptSession *ss, filter_cache->sharpen_factor[i] = 1.0f - pow2f(1.0f - filter_cache->sharpen_factor[i]); } - /* Smooth the calculated factors and directions to remove high frecuency detail. */ + /* Smooth the calculated factors and directions to remove high frequency detail. */ for (int smooth_iterations = 0; smooth_iterations < filter_cache->sharpen_curvature_smooth_iterations; smooth_iterations++) { diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index d1e17c7e59b..f90cf366ed9 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -511,7 +511,7 @@ void SCULPT_boundary_edges_preview_draw(const uint gpuattr, const float outline_alpha); void SCULPT_boundary_pivot_line_preview_draw(const uint gpuattr, struct SculptSession *ss); -/* Multiplane Scrape Brush. */ +/* Multi-plane Scrape Brush. */ void SCULPT_do_multiplane_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode); void SCULPT_multiplane_scrape_preview_draw(const uint gpuattr, Brush *brush, diff --git a/source/blender/editors/sculpt_paint/sculpt_pose.c b/source/blender/editors/sculpt_paint/sculpt_pose.c index 1bf9ba60073..f9ccbbb849c 100644 --- a/source/blender/editors/sculpt_paint/sculpt_pose.c +++ b/source/blender/editors/sculpt_paint/sculpt_pose.c @@ -738,7 +738,7 @@ static SculptPoseIKChain *pose_ik_chain_init_topology(Sculpt *sd, * iteration an the current iteration. */ for (int j = 0; j < totvert; j++) { ik_chain->segments[i].weights[j] = pose_factor_grow[j] - pose_factor_grow_prev[j]; - /* Store the current grow factor status for the next interation. */ + /* Store the current grow factor status for the next iteration. */ pose_factor_grow_prev[j] = pose_factor_grow[j]; } } diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 34617804888..391bc5dab45 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -877,7 +877,7 @@ static void SOUND_OT_unpack(wmOperatorType *ot) /* properties */ RNA_def_enum( ot->srna, "method", rna_enum_unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack"); - /* XXX, weark!, will fail with library, name collisions */ + /* XXX: weak!, will fail with library, name collisions */ RNA_def_string( ot->srna, "id", NULL, MAX_ID_NAME - 2, "Sound Name", "Sound data-block name to unpack"); } diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index f731fe23b7c..f8389d40831 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -73,7 +73,7 @@ /* ************************************************************************** */ /* POSE MARKERS STUFF */ -/* *************************** Localise Markers ***************************** */ +/* *************************** Localize Markers ***************************** */ /* ensure that there is: * 1) an active action editor @@ -322,7 +322,7 @@ static bool actkeys_channels_get_selected_extents(bAnimContext *ac, float *min, bAnimListElem *ale; int filter; - /* NOTE: not bool, since we want prioritise individual channels over expanders */ + /* NOTE: not bool, since we want prioritize individual channels over expanders. */ short found = 0; /* get all items - we need to do it this way */ @@ -346,7 +346,7 @@ static bool actkeys_channels_get_selected_extents(bAnimContext *ac, float *min, found = acf->channel_role; /* only stop our search when we've found an actual channel - * - datablock expanders get less priority so that we don't abort prematurely + * - data-block expanders get less priority so that we don't abort prematurely */ if (found == ACHANNEL_ROLE_CHANNEL) { break; diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c index 01e57eab7c2..817760615df 100644 --- a/source/blender/editors/space_api/spacetypes.c +++ b/source/blender/editors/space_api/spacetypes.c @@ -287,7 +287,7 @@ static void xxx_free(SpaceLink *UNUSED(sl)) { } -/* spacetype; init callback for usage, should be redoable */ +/* spacetype; init callback for usage, should be re-doable. */ static void xxx_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) { diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index 77f1111624d..05595e0b393 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -18,7 +18,7 @@ * \ingroup spconsole */ -#include <ctype.h> /* ispunct */ +#include <ctype.h> /* #ispunct */ #include <stdlib.h> #include <string.h> #include <sys/stat.h> @@ -749,7 +749,7 @@ static int console_clear_exec(bContext *C, wmOperator *op) /*ConsoleLine *ci = */ console_history_verify(C); - if (scrollback) { /* last item in mistory */ + if (scrollback) { /* Last item in history. */ while (sc->scrollback.first) { console_scrollback_free(sc, sc->scrollback.first); } diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c index 6265cbdd920..790ea379e54 100644 --- a/source/blender/editors/space_console/space_console.c +++ b/source/blender/editors/space_console/space_console.c @@ -216,7 +216,7 @@ static void console_main_region_draw(const bContext *C, ARegion *region) /* clear and setup matrix */ UI_ThemeClearColor(TH_BACK); - /* worlks best with no view2d matrix set */ + /* Works best with no view2d matrix set. */ UI_view2d_view_ortho(v2d); /* data... */ diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index a12c9633798..537d8849372 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -473,7 +473,7 @@ static void file_draw_preview(uiBlock *block, but = uiDefBut(block, UI_BTYPE_LABEL, 0, "", xco, yco, ex, ey, NULL, 0.0, 0.0, 0, 0, NULL); - /* dragregion */ + /* Drag-region. */ if (drag) { ID *id; diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 6b74b344375..6e5791cad52 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -460,7 +460,7 @@ bool ED_fileselect_is_asset_browser(const SpaceFile *sfile) void ED_fileselect_window_params_get(const wmWindow *win, int win_size[2], bool *is_maximized) { - /* Get DPI/pixelsize independent size to be stored in preferences. */ + /* Get DPI/pixel-size independent size to be stored in preferences. */ WM_window_set_dpi(win); /* Ensure the DPI is taken from the right window. */ win_size[0] = WM_window_pixels_x(win) / UI_DPI_FAC; diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index fac38ef7b91..31f606e515d 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -178,7 +178,7 @@ static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode) x = (float)CFRA; } - /* Normalise units of cursor's value. */ + /* Normalize units of cursor's value. */ if (sipo) { y = (sipo->cursorVal / unit_scale) - offset; } @@ -2263,7 +2263,7 @@ static void snap_graph_keys(bAnimContext *ac, short mode) for (ale = anim_data.first; ale; ale = ale->next) { AnimData *adt = ANIM_nla_mapping_get(ac, ale); - /* Normalise cursor value (for normalised F-Curves display). */ + /* Normalize cursor value (for normalized F-Curves display). */ if (mode == GRAPHKEYS_SNAP_VALUE) { short mapping_flag = ANIM_get_normalization_flags(ac); float offset; diff --git a/source/blender/editors/space_graph/graph_slider_ops.c b/source/blender/editors/space_graph/graph_slider_ops.c index 0818ebe9c0a..3e52dc7377b 100644 --- a/source/blender/editors/space_graph/graph_slider_ops.c +++ b/source/blender/editors/space_graph/graph_slider_ops.c @@ -380,7 +380,7 @@ static int graphkeys_decimate_modal(bContext *C, wmOperator *op, const wmEvent * break; } - /* Unhandled event - maybe it was some view manip? */ + /* Unhandled event - maybe it was some view manipulation? */ /* Allow to pass through. */ return OPERATOR_RUNNING_MODAL | OPERATOR_PASS_THROUGH; } diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 63e5ae64a8c..67d5055ec65 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -466,7 +466,7 @@ static void sima_draw_zbuf_pixels( { const float red[4] = {1.0f, 0.0f, 0.0f, 0.0f}; - /* Slowwww */ + /* Very slow! */ float *rectf = MEM_mallocN(rectx * recty * sizeof(float), "temp"); for (int a = rectx * recty - 1; a >= 0; a--) { /* zbuffer values are signed, so we need to shift color range */ @@ -874,7 +874,7 @@ void draw_image_main(const bContext *C, ARegion *region) if (show_stereo3d) { if (show_multilayer) { - /* update multiindex and pass for the current eye */ + /* Update multi-index and pass for the current eye. */ BKE_image_multilayer_index(ima->rr, &sima->iuser); } else { diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 097e304c893..30614a5bf88 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -2747,7 +2747,7 @@ static int image_invert_exec(bContext *C, wmOperator *op) ED_image_undo_push_end(); - /* force GPU reupload, all image is invalid */ + /* Force GPU re-upload, all image is invalid. */ BKE_image_free_gputextures(ima); WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, ima); @@ -2838,7 +2838,7 @@ static int image_scale_exec(bContext *C, wmOperator *op) ED_image_undo_push_end(); - /* force GPU reupload, all image is invalid */ + /* Force GPU re-upload, all image is invalid. */ BKE_image_free_gputextures(ima); DEG_id_tag_update(&ima->id, 0); diff --git a/source/blender/editors/space_info/info_draw.c b/source/blender/editors/space_info/info_draw.c index 414bce29502..dc926587367 100644 --- a/source/blender/editors/space_info/info_draw.c +++ b/source/blender/editors/space_info/info_draw.c @@ -56,7 +56,7 @@ static enum eTextViewContext_LineFlag report_line_data(TextViewContext *tvc, int shade = (tvc->iter_tmp % 2) ? 4 : -4; UI_GetThemeColorShade4ubv(bg_id, shade, bg); - /* Icon color and backgound depend of report type. */ + /* Icon color and background depend of report type. */ int icon_fg_id; int icon_bg_id; diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c index 5e44db4c791..e2ab139aa07 100644 --- a/source/blender/editors/space_info/space_info.c +++ b/source/blender/editors/space_info/space_info.c @@ -150,7 +150,7 @@ static void info_main_region_draw(const bContext *C, ARegion *region) info_textview_update_rect(C, region); - /* worlks best with no view2d matrix set */ + /* Works best with no view2d matrix set. */ UI_view2d_view_ortho(v2d); info_textview_main(sinfo, region, CTX_wm_reports(C)); diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index d7bf6c324ac..031cf7c6376 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -215,7 +215,7 @@ bool nlaedit_disable_tweakmode(bAnimContext *ac, bool do_solo) return false; } - /* for each AnimData block with NLA-data, try exitting tweak-mode */ + /* For each AnimData block with NLA-data, try exiting tweak-mode. */ for (ale = anim_data.first; ale; ale = ale->next) { AnimData *adt = ale->data; @@ -418,7 +418,7 @@ static bool nla_channels_get_selected_extents(bAnimContext *ac, float *min, floa int filter; SpaceNla *snla = (SpaceNla *)ac->sl; - /* NOTE: not bool, since we want prioritise individual channels over expanders */ + /* NOTE: not bool, since we want prioritize individual channels over expanders. */ short found = 0; /* get all items - we need to do it this way */ @@ -442,7 +442,7 @@ static bool nla_channels_get_selected_extents(bAnimContext *ac, float *min, floa found = acf->channel_role; /* only stop our search when we've found an actual channel - * - datablock expanders get less priority so that we don't abort prematurely + * - data-block expanders get less priority so that we don't abort prematurely */ if (found == ACHANNEL_ROLE_CHANNEL) { break; @@ -1532,11 +1532,11 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op) const bool is_liboverride = ID_IS_OVERRIDE_LIBRARY(ale->id); if (BKE_nlatrack_is_nonlocal_in_liboverride(ale->id, nlt)) { - /* No re-ordering of strips whithin non-local tracks of override data. */ + /* No re-ordering of strips within non-local tracks of override data. */ continue; } - /* make temporary metastrips so that entire islands of selections can be moved around */ + /* Make temporary meta-strips so that entire islands of selections can be moved around. */ BKE_nlastrips_make_metas(&nlt->strips, 1); /* special case: if there is only 1 island diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 1d66119d569..d7edb1ecbed 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -190,7 +190,7 @@ static void node_buts_curvecol(uiLayout *layout, bContext *UNUSED(C), PointerRNA cumap->flag &= ~CUMA_DRAW_SAMPLE; } - /* "Tone" (Standard/Filmlike) only used in the Compositor. */ + /* "Tone" (Standard/Film-like) only used in the Compositor. */ bNodeTree *ntree = (bNodeTree *)ptr->owner_id; uiTemplateCurveMapping( layout, ptr, "mapping", 'c', false, false, false, (ntree->type == NTREE_COMPOSIT)); @@ -559,7 +559,7 @@ static void node_draw_reroute(const bContext *C, if (node->flag & SELECT) { GPU_blend(GPU_BLEND_ALPHA); GPU_line_smooth(true); - /* using different shades of TH_TEXT_HI for the empasis, like triangle */ + /* Using different shades of #TH_TEXT_HI for the emphasis, like triangle. */ if (node->flag & NODE_ACTIVE) { UI_GetThemeColorShadeAlpha4fv(TH_TEXT_HI, 0, -40, debug_color); } diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 037587809b0..4dd945c4cf1 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -1871,7 +1871,7 @@ void node_draw_space(const bContext *C, ARegion *region) if (snode->treepath.last) { if (snode->flag & SNODE_SHOW_GPENCIL) { - /* draw grease-pencil (screen strokes, and also paintbuffer) */ + /* Draw grease-pencil (screen strokes, and also paint-buffer). */ ED_annotation_draw_view2d(C, false); } } diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index ced81401874..c006889f0f7 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -770,7 +770,7 @@ void ED_node_post_apply_transform(bContext *UNUSED(C), bNodeTree *UNUSED(ntree)) * which only exists during actual drawing. Can we rely on valid totr rects? */ /* make sure nodes have correct bounding boxes after transform */ - /* node_update_nodetree(C, ntree, 0.0f, 0.0f); */ + // node_update_nodetree(C, ntree, 0.0f, 0.0f); } /* ***************** generic operator functions for nodes ***************** */ @@ -1199,7 +1199,7 @@ static int node_duplicate_exec(bContext *C, wmOperator *op) if (node->flag & SELECT) { BKE_node_copy_store_new_pointers(ntree, node, LIB_ID_COPY_DEFAULT); - /* to ensure redraws or rerenders happen */ + /* To ensure redraws or re-renders happen. */ ED_node_tag_update_id(snode->id); } diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c index f2abe272f48..7f530408ec7 100644 --- a/source/blender/editors/space_node/node_group.c +++ b/source/blender/editors/space_node/node_group.c @@ -1039,7 +1039,7 @@ static int node_group_make_exec(bContext *C, wmOperator *op) snode_notify(C, snode); snode_dag_update(C, snode); - /* We broke relations in node tree, need to rebuild them in the grahes. */ + /* We broke relations in node tree, need to rebuild them in the graphs. */ DEG_relations_tag_update(bmain); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index 1754f84c374..f3ce60bbcd9 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -736,7 +736,7 @@ static void node_link_find_socket(bContext *C, wmOperator *op, float cursor[2]) } } -/* loop that adds a nodelink, called by function below */ +/* Loop that adds a node-link, called by function below. */ /* in_out = starting socket */ static int node_link_modal(bContext *C, wmOperator *op, const wmEvent *event) { @@ -1543,7 +1543,7 @@ void ED_node_link_intersect_test(ScrArea *area, int test) /* loop over link coords to find shortest dist to * upper left node edge of a intersected line segment */ for (int i = 0; i < NODE_LINK_RESOL; i++) { - /* check if the node rect intersetcts the line from this point to next one */ + /* Check if the node rectangle intersects the line from this point to next one. */ if (BLI_rctf_isect_segment(&select->totr, coord_array[i], coord_array[i + 1])) { /* store the shortest distance to the upper left edge * of all intersections found so far */ diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c index 467802d181b..70aeef76234 100644 --- a/source/blender/editors/space_outliner/outliner_dragdrop.c +++ b/source/blender/editors/space_outliner/outliner_dragdrop.c @@ -140,7 +140,7 @@ static TreeElement *outliner_drop_insert_find(bContext *C, TreeElement *te_hovered; float view_mval[2]; - /* Emtpy tree, e.g. while filtered. */ + /* Empty tree, e.g. while filtered. */ if (BLI_listbase_is_empty(&space_outliner->tree)) { return NULL; } diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index d424bb2319a..35756ea5ac7 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -3059,7 +3059,7 @@ static void outliner_draw_tree_element(bContext *C, } else { active = tree_element_type_active(C, tvc, space_outliner, te, tselem, OL_SETSEL_NONE, false); - /* active collection*/ + /* Active collection. */ } /* active circle */ @@ -3079,7 +3079,7 @@ static void outliner_draw_tree_element(bContext *C, } else if (te->subtree.first || (tselem->type == 0 && te->idcode == ID_SCE) || (te->flag & TE_LAZY_CLOSED)) { - /* open/close icon, only when sublevels, except for scene */ + /* Open/close icon, only when sub-levels, except for scene. */ int icon_x = startx; /* Icons a bit higher. */ @@ -3517,7 +3517,7 @@ static void outliner_draw_tree(bContext *C, GPU_scissor(0, 0, mask_x, region->winy); } - /* Draw hierarhcy lines for collections and object children. */ + /* Draw hierarchy lines for collections and object children. */ starty = (int)region->v2d.tot.ymax - OL_Y_OFFSET; startx = mode_column_offset + UI_UNIT_X / 2 - (U.pixelsize + 1) / 2; outliner_draw_hierarchy_lines(space_outliner, &space_outliner->tree, startx, &starty); diff --git a/source/blender/editors/space_outliner/outliner_sync.c b/source/blender/editors/space_outliner/outliner_sync.c index 0b2d1ce34ec..81b8974fba4 100644 --- a/source/blender/editors/space_outliner/outliner_sync.c +++ b/source/blender/editors/space_outliner/outliner_sync.c @@ -378,7 +378,7 @@ void ED_outliner_select_sync_from_outliner(bContext *C, SpaceOutliner *space_out selected_items_free(&selected_items); - /* Tag for updates and clear dirty flag toprevent a sync to the outliner on draw */ + /* Tag for updates and clear dirty flag to prevent a sync to the outliner on draw. */ if (sync_types.object) { space_outliner->sync_select_dirty &= ~WM_OUTLINER_SYNC_SELECT_FROM_OBJECT; DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); @@ -545,7 +545,7 @@ static void get_sync_select_active_data(const bContext *C, SyncSelectActiveData active_data->sequence = SEQ_select_active_get(scene); } -/* If outliner is dirty sync selection from view layer and sequwncer */ +/* If outliner is dirty sync selection from view layer and sequencer. */ void outliner_sync_selection(const bContext *C, SpaceOutliner *space_outliner) { /* Set which types of data to sync from sync dirty flag and outliner display mode */ diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index fa485dc6b4b..8b522d41af8 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -794,7 +794,7 @@ static void id_override_library_create_fn(bContext *C, id_root->tag |= LIB_TAG_DOIT; - /* For now, remapp all local usages of linked ID to local override one here. */ + /* For now, remap all local usages of linked ID to local override one here. */ ID *id_iter; FOREACH_MAIN_ID_BEGIN (bmain, id_iter) { if (ID_IS_LINKED(id_iter)) { diff --git a/source/blender/editors/space_outliner/outliner_utils.c b/source/blender/editors/space_outliner/outliner_utils.c index e0d63dfcf81..92178cfdfc9 100644 --- a/source/blender/editors/space_outliner/outliner_utils.c +++ b/source/blender/editors/space_outliner/outliner_utils.c @@ -169,7 +169,7 @@ TreeElement *outliner_find_item_at_x_in_row(const SpaceOutliner *space_outliner, return te; } -/* Find specific item from the treestore */ +/* Find specific item from the trees-tore. */ TreeElement *outliner_find_tree_element(ListBase *lb, const TreeStoreElem *store_elem) { LISTBASE_FOREACH (TreeElement *, te, lb) { diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 51c2d3ebdf1..d7937725705 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -954,7 +954,7 @@ void ED_spacetype_sequencer(void) art->listener = sequencer_main_region_listener; BLI_addhead(&st->regiontypes, art); - /* Hud. */ + /* HUD. */ art = ED_area_type_hud(st->spaceid); BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index b38f92402b3..883556948e2 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -722,7 +722,7 @@ static void text_update_drawcache(SpaceText *st, ARegion *region) void text_drawcache_tag_update(SpaceText *st, int full) { - /* this happens if text editor ops are caled from python */ + /* This happens if text editor ops are called from Python. */ if (st == NULL) { return; } diff --git a/source/blender/editors/space_text/text_format.c b/source/blender/editors/space_text/text_format.c index d099f2a20d8..66765206fa6 100644 --- a/source/blender/editors/space_text/text_format.c +++ b/source/blender/editors/space_text/text_format.c @@ -237,7 +237,7 @@ bool ED_text_is_syntax_highlight_supported(Text *text) const char *text_ext = BLI_path_extension(text->id.name + 2); if (text_ext == NULL) { - /* Extensionless datablocks are considered highlightable as Python. */ + /* Extensionless data-blocks are considered highlightable as Python. */ return true; } text_ext++; /* skip the '.' */ diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 932bacfb8a0..526285c076a 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -3832,7 +3832,7 @@ static int text_resolve_conflict_invoke(bContext *C, wmOperator *op, const wmEve switch (BKE_text_file_modified_check(text)) { case 1: if (text->flags & TXT_ISDIRTY) { - /* modified locally and externally, ahhh. offer more possibilities. */ + /* Modified locally and externally, ah. offer more possibilities. */ pup = UI_popup_menu_begin( C, IFACE_("File Modified Outside and Inside Blender"), ICON_NONE); layout = UI_popup_menu_layout(pup); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 3c970781448..aa4922372c8 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -165,7 +165,7 @@ void ED_view3d_update_viewmat(Depsgraph *depsgraph, rv3d->viewcamtexcofac[2] = rv3d->viewcamtexcofac[3] = 0.0f; } - /* calculate pixelsize factor once, is used for lights and obcenters */ + /* Calculate pixel-size factor once, this is used for lights and object-centers. */ { /* note: '1.0f / len_v3(v1)' replaced 'len_v3(rv3d->viewmat[0])' * because of float point precision problems at large values T23908. */ @@ -2335,7 +2335,7 @@ void ED_view3d_depth_update(ARegion *region) } } -/* Utility function to find the closest Z value, use for autodepth. */ +/* Utility function to find the closest Z value, use for auto-depth. */ float view3d_depth_near(ViewDepths *d) { /* Convert to float for comparisons. */ diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index ab4e7be88fe..aba4eb1eefe 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -2888,7 +2888,7 @@ static void view3d_from_minmax(bContext *C, }); } - /* smooth view does viewlock RV3D_BOXVIEW copy */ + /* Smooth-view does view-lock #RV3D_BOXVIEW copy. */ } /** @@ -3282,7 +3282,7 @@ static int viewcenter_cursor_exec(bContext *C, wmOperator *op) ED_view3d_smooth_view( C, v3d, region, smooth_viewtx, &(const V3D_SmoothParams){.ofs = new_ofs}); - /* smooth view does viewlock RV3D_BOXVIEW copy */ + /* Smooth view does view-lock #RV3D_BOXVIEW copy. */ } return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index 6824c526888..2d499cf85c7 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -48,7 +48,7 @@ #include "ED_screen.h" #include "ED_space_api.h" -#include "PIL_time.h" /* smoothview */ +#include "PIL_time.h" /* Smooth-view. */ #include "UI_interface.h" #include "UI_resources.h" @@ -84,7 +84,7 @@ enum { FLY_MODAL_PRECISION_DISABLE, FLY_MODAL_FREELOOK_ENABLE, FLY_MODAL_FREELOOK_DISABLE, - FLY_MODAL_SPEED, /* mousepan typically */ + FLY_MODAL_SPEED, /* mouse-pan typically. */ }; /* relative view axis locking - xlock, zlock */ @@ -537,7 +537,7 @@ static void flyEvent(FlyInfo *fly, const wmEvent *event) fly->state = FLY_CONFIRM; break; - /* speed adjusting with mousepan (trackpad) */ + /* Speed adjusting with mouse-pan (track-pad). */ case FLY_MODAL_SPEED: { float fac = 0.02f * (event->prevy - event->y); @@ -768,7 +768,7 @@ static int flyApply(bContext *C, FlyInfo *fly, bool is_confirm) /* this is the direction that's added to the view offset per redraw */ float dvec[3] = {0, 0, 0}; - /* Camera Uprighting variables */ + /* Camera Up-righting variables. */ float moffset[2]; /* mouse offset from the views center */ float tmp_quat[4]; /* used for rotating the view */ @@ -950,7 +950,7 @@ static int flyApply(bContext *C, FlyInfo *fly, bool is_confirm) } } - /* only apply xcorrect when mouse isn't applying x rot */ + /* Only apply X-axis correction when mouse isn't applying x rotation. */ if (fly->xlock == FLY_AXISLOCK_STATE_ACTIVE && moffset[1] == 0) { float upvec[3]; copy_v3_fl3(upvec, 0.0f, 0.0f, 1.0f); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 9ee6e44f825..0605ea30806 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -596,7 +596,7 @@ static bool do_lasso_select_objects(ViewContext *vc, } for (base = vc->view_layer->object_bases.first; base; base = base->next) { - if (BASE_SELECTABLE(v3d, base)) { /* use this to avoid un-needed lasso lookups */ + if (BASE_SELECTABLE(v3d, base)) { /* Use this to avoid unnecessary lasso look-ups. */ const bool is_select = base->flag & BASE_SELECTED; const bool is_inside = ((ED_view3d_project_base(vc->region, base) == V3D_PROJ_RET_OK) && BLI_lasso_is_point_inside( @@ -1447,7 +1447,7 @@ static const EnumPropertyItem *object_select_menu_enum_itemf(bContext *C, int totitem = 0; int i = 0; - /* don't need context but avoid docgen using this */ + /* Don't need context but avoid API doc-generation using this. */ if (C == NULL || object_mouse_select_menu_data[i].idname[0] == '\0') { return DummyRNA_NULL_items; } @@ -2494,7 +2494,7 @@ static int view3d_select_exec(bContext *C, wmOperator *op) } /* Pass-through allows tweaks - * FINISHED to signal one operator worked. */ + * FINISHED to signal one operator worked */ if (retval) { WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); return OPERATOR_PASS_THROUGH | OPERATOR_FINISHED; diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 9d947384bf0..5c0ca1582a6 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -142,7 +142,7 @@ void ED_view3d_smooth_view_ex( /* initialize sms */ view3d_smooth_view_state_backup(&sms.dst, v3d, rv3d); view3d_smooth_view_state_backup(&sms.src, v3d, rv3d); - /* if smoothview runs multiple times... */ + /* If smooth-view runs multiple times. */ if (rv3d->sms == NULL) { view3d_smooth_view_state_backup(&sms.org, v3d, rv3d); } @@ -396,7 +396,7 @@ static void view3d_smoothview_apply(bContext *C, View3D *v3d, ARegion *region, b /* note: this doesn't work right because the v3d->lens is now used in ortho mode r51636, * when switching camera in quad-view the other ortho views would zoom & reset. * - * For now only redraw all regions when smoothview finishes. + * For now only redraw all regions when smooth-view finishes. */ if (step >= 1.0f) { WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); @@ -423,7 +423,7 @@ static int view3d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), const w } /** - * Apply the smoothview immediately, use when we need to start a new view operation. + * Apply the smooth-view immediately, use when we need to start a new view operation. * (so we don't end up half-applying a view operation when pressing keys quickly). */ void ED_view3d_smooth_view_force_finish(bContext *C, View3D *v3d, ARegion *region) diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index 5b42f221c80..cbd65e3175d 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -48,7 +48,7 @@ #include "ED_space_api.h" #include "ED_transform_snap_object_context.h" -#include "PIL_time.h" /* smoothview */ +#include "PIL_time.h" /* Smooth-view. */ #include "UI_interface.h" #include "UI_resources.h" @@ -872,7 +872,7 @@ static void walkEvent(bContext *C, WalkInfo *walk, const wmEvent *event) /* delta time */ t = (float)(PIL_check_seconds_timer() - walk->teleport.initial_time); - /* reduce the veolocity, if JUMP wasn't hold for long enough */ + /* Reduce the velocity, if JUMP wasn't hold for long enough. */ t = min_ff(t, JUMP_TIME_MAX); walk->speed_jump = JUMP_SPEED_MIN + t * (JUMP_SPEED_MAX - JUMP_SPEED_MIN) / JUMP_TIME_MAX; diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 2a7c247ff2b..86a35949d1d 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -135,7 +135,7 @@ void setTransformViewAspect(TransInfo *t, float r_aspect[3]) } } else if (t->spacetype == SPACE_GRAPH) { - /* depemds on context of usage */ + /* Depends on context of usage. */ } } @@ -471,7 +471,7 @@ static void viewRedrawForce(const bContext *C, TransInfo *t) } else if (t->spacetype == SPACE_SEQ) { WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, NULL); - /* Keyframes on strips has been moved, so make sure related editos are informed. */ + /* Key-frames on strips has been moved, so make sure related editors are informed. */ WM_event_add_notifier(C, NC_ANIMATION, NULL); } else if (t->spacetype == SPACE_IMAGE) { @@ -1249,7 +1249,7 @@ bool calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], floa createTransData(C, t); /* make TransData structs from selection */ - t->around = centerMode; /* override userdefined mode */ + t->around = centerMode; /* override user-defined mode. */ if (t->data_len_all == 0) { success = false; diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c index fb365da6b43..96a9690d891 100644 --- a/source/blender/editors/transform/transform_convert.c +++ b/source/blender/editors/transform/transform_convert.c @@ -1047,7 +1047,7 @@ void createTransData(bContext *C, TransInfo *t) else if (t->spacetype == SPACE_SEQ) { t->flag |= T_POINTS | T_2D_EDIT; t->obedit_type = -1; - t->num.flag |= NUM_NO_FRACTION; /* sequencer has no use for floating point trasnform */ + t->num.flag |= NUM_NO_FRACTION; /* sequencer has no use for floating point transform. */ convert_type = TC_SEQ_DATA; } else if (t->spacetype == SPACE_GRAPH) { diff --git a/source/blender/editors/transform/transform_convert_armature.c b/source/blender/editors/transform/transform_convert_armature.c index e9b2273b343..7994d97581f 100644 --- a/source/blender/editors/transform/transform_convert_armature.c +++ b/source/blender/editors/transform/transform_convert_armature.c @@ -444,7 +444,7 @@ static short pose_grab_with_ik(Main *bmain, Object *ob) for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { if (pchan->bone->layer & arm->layer) { if (pchan->bone->flag & (BONE_SELECTED | BONE_TRANSFORM_MIRROR)) { - /* Rule: no IK for solitatry (unconnected) bones */ + /* Rule: no IK for solitary (unconnected) bones. */ for (bonec = pchan->bone->childbase.first; bonec; bonec = bonec->next) { if (bonec->flag & BONE_CONNECTED) { break; @@ -1354,7 +1354,7 @@ static void pose_transform_mirror_update(TransInfo *t, TransDataContainer *tc, O } mul_v3_m4v3(data->grabtarget, flip_mtx, td->loc); if (pid) { - /* TODO(germano): Realitve Mirror support */ + /* TODO(germano): Relative Mirror support. */ } data->flag |= CONSTRAINT_IK_AUTO; /* Add a temporary auto IK constraint here, as we will only temporarily active this diff --git a/source/blender/editors/transform/transform_convert_curve.c b/source/blender/editors/transform/transform_convert_curve.c index 445253d5446..3c01c716123 100644 --- a/source/blender/editors/transform/transform_convert_curve.c +++ b/source/blender/editors/transform/transform_convert_curve.c @@ -298,7 +298,7 @@ void createTransCurveVerts(TransInfo *t) } if ((bezt_tx & SEL_F1) == 0 && (bezt_tx & SEL_F3) == 0) { - /* If the middle is selected but the sides arnt, this is needed */ + /* If the middle is selected but the sides aren't, this is needed. */ if (hdata == NULL) { /* if the handle was not saved by the previous handle */ hdata = initTransDataCurveHandles(td, bezt); diff --git a/source/blender/editors/transform/transform_convert_nla.c b/source/blender/editors/transform/transform_convert_nla.c index 51802a1e769..5eb3f68787a 100644 --- a/source/blender/editors/transform/transform_convert_nla.c +++ b/source/blender/editors/transform/transform_convert_nla.c @@ -574,7 +574,7 @@ void special_aftertrans_update__nla(bContext *C, TransInfo *UNUSED(t)) /* free temp memory */ ANIM_animdata_freelist(&anim_data); - /* perform after-transfrom validation */ + /* Perform after-transform validation. */ ED_nla_postop_refresh(&ac); } } diff --git a/source/blender/editors/transform/transform_convert_tracking.c b/source/blender/editors/transform/transform_convert_tracking.c index b25af709981..5f5f06e388f 100644 --- a/source/blender/editors/transform/transform_convert_tracking.c +++ b/source/blender/editors/transform/transform_convert_tracking.c @@ -358,7 +358,7 @@ static void createTransTrackingTracksData(bContext *C, TransInfo *t) init_context.t = t; init_context.tc = tc; - /* Count required tranformation data. */ + /* Count required transformation data. */ tc->data_len = 0; diff --git a/source/blender/editors/transform/transform_data.h b/source/blender/editors/transform/transform_data.h index b59197fcd39..5b01433c96b 100644 --- a/source/blender/editors/transform/transform_data.h +++ b/source/blender/editors/transform/transform_data.h @@ -122,11 +122,11 @@ typedef struct TransDataCurveHandleFlags { typedef struct TransData { TRANSDATABASIC; - /** Distance needed to affect element (for Proportionnal Editing). */ + /** Distance needed to affect element (for Proportional Editing). */ float dist; - /** Distance to the nearest element (for Proportionnal Editing). */ + /** Distance to the nearest element (for Proportional Editing). */ float rdist; - /** Factor of the transformation (for Proportionnal Editing). */ + /** Factor of the transformation (for Proportional Editing). */ float factor; /** Value pointer for special transforms. */ float *val; @@ -141,11 +141,11 @@ typedef struct TransData { struct Object *ob; /** For objects/bones, the first constraint in its constraint stack. */ struct bConstraint *con; - /** For objects, poses. 1 single malloc per TransInfo! */ + /** For objects, poses. 1 single allocation per #TransInfo! */ TransDataExtension *ext; /** for curves, stores handle flags for modification/cancel. */ TransDataCurveHandleFlags *hdata; - /** If set, copy of Object or PoseChannel protection. */ + /** If set, copy of Object or #bPoseChannel protection. */ short protectflag; } TransData; diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index b092b3e3e0b..e181593d28a 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1193,7 +1193,7 @@ void calculateCenter(TransInfo *t) calculateCenter2D(t); - /* for panning from cameraview */ + /* For panning from the camera-view. */ if ((t->flag & T_OBJECT) && (t->flag & T_OVERRIDE_CENTER) == 0) { if (t->spacetype == SPACE_VIEW3D && t->region && t->region->regiontype == RGN_TYPE_WINDOW) { @@ -1416,7 +1416,7 @@ void transform_data_ext_rotate(TransData *td, float mat[3][3], bool use_drot) if (td->ext->rotOrder == ROT_MODE_QUAT) { float quat[4]; - /* calculate the total rotatation */ + /* Calculate the total rotation. */ quat_to_mat3(obmat, td->ext->iquat); if (use_drot) { mul_m3_m3m3(obmat, dmat, obmat); @@ -1437,7 +1437,7 @@ void transform_data_ext_rotate(TransData *td, float mat[3][3], bool use_drot) else if (td->ext->rotOrder == ROT_MODE_AXISANGLE) { float axis[3], angle; - /* calculate the total rotatation */ + /* Calculate the total rotation. */ axis_angle_to_mat3(obmat, td->ext->irotAxis, td->ext->irotAngle); if (use_drot) { mul_m3_m3m3(obmat, dmat, obmat); @@ -1459,7 +1459,7 @@ void transform_data_ext_rotate(TransData *td, float mat[3][3], bool use_drot) else { float eul[3]; - /* calculate the total rotatation */ + /* Calculate the total rotation. */ eulO_to_mat3(obmat, td->ext->irot, td->ext->rotOrder); if (use_drot) { mul_m3_m3m3(obmat, dmat, obmat); diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c index eec0ce42f3c..27df29afd8d 100644 --- a/source/blender/editors/transform/transform_gizmo_3d.c +++ b/source/blender/editors/transform/transform_gizmo_3d.c @@ -532,7 +532,7 @@ static void protectflag_to_drawflags_ebone(RegionView3D *rv3d, const EditBone *e /* could move into BLI_math however this is only useful for display/editing purposes */ static void axis_angle_to_gimbal_axis(float gmat[3][3], const float axis[3], const float angle) { - /* X/Y are arbitrary axies, most importantly Z is the axis of rotation */ + /* X/Y are arbitrary axes, most importantly Z is the axis of rotation. */ float cross_vec[3]; float quat[4]; diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c index 70ef5fcde7a..ec84eab27a9 100644 --- a/source/blender/editors/transform/transform_input.c +++ b/source/blender/editors/transform/transform_input.c @@ -508,7 +508,7 @@ eRedrawFlag handleMouseInput(TransInfo *t, MouseInput *mi, const wmEvent *event) case EVT_RIGHTSHIFTKEY: if (event->val == KM_PRESS) { t->modifiers |= MOD_PRECISION; - /* shift is modifier for higher precision transforn */ + /* Shift is modifier for higher precision transform. */ mi->precision = 1; redraw = TREDRAW_HARD; } diff --git a/source/blender/editors/transform/transform_mode.c b/source/blender/editors/transform/transform_mode.c index a4d999b868d..be4f3daa3d2 100644 --- a/source/blender/editors/transform/transform_mode.c +++ b/source/blender/editors/transform/transform_mode.c @@ -513,7 +513,7 @@ void constraintSizeLim(TransInfo *t, TransData *td) return; } - /* extrace scale from matrix and apply back sign */ + /* Extract scale from matrix and apply back sign. */ mat4_to_size(td->ext->size, cob.matrix); mul_v3_v3(td->ext->size, size_sign); } @@ -705,7 +705,7 @@ void ElementRotation_ex(TransInfo *t, mul_m3_m3m3(totmat, mat, td->ext->r_mtx); mul_m3_m3m3(smat, td->ext->r_smtx, totmat); - /* calculate the total rotatation in eulers */ + /* Calculate the total rotation in eulers. */ copy_v3_v3(eul, td->ext->irot); eulO_to_mat3(eulmat, eul, td->ext->rotOrder); @@ -778,7 +778,7 @@ void ElementRotation_ex(TransInfo *t, mul_m3_m3m3(totmat, mat, td->mtx); mul_m3_m3m3(smat, td->smtx, totmat); - /* calculate the total rotatation in eulers */ + /* Calculate the total rotation in eulers. */ add_v3_v3v3(eul, td->ext->irot, td->ext->drot); /* correct for delta rot */ eulO_to_mat3(obmat, eul, td->ext->rotOrder); /* mat = transform, obmat = object rotation */ @@ -902,7 +902,7 @@ static void TransMat3ToSize(const float mat[3][3], const float smat[3][3], float mat3_to_rot_size(rmat, size, mat); - /* first tried with dotproduct... but the sign flip is crucial */ + /* First tried with dot-product... but the sign flip is crucial. */ if (dot_v3v3(rmat[0], smat[0]) < 0.0f) { size[0] = -size[0]; } diff --git a/source/blender/editors/transform/transform_mode_edge_seq_slide.c b/source/blender/editors/transform/transform_mode_edge_seq_slide.c index dd212af7caf..b21f00eed98 100644 --- a/source/blender/editors/transform/transform_mode_edge_seq_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_seq_slide.c @@ -51,7 +51,7 @@ static eRedrawFlag seq_slide_handleEvent(struct TransInfo *t, const wmEvent *eve BLI_assert(t->mode == TFM_SEQ_SLIDE); const wmKeyMapItem *kmi = t->custom.mode.data; if (kmi && event->type == kmi->type && event->val == kmi->val) { - /* Allows the 'Expand to fit' effect to be enabled as a toogle. */ + /* Allows the "Expand to Fit" effect to be enabled as a toggle. */ t->flag ^= T_ALT_TRANSFORM; return TREDRAW_HARD; } diff --git a/source/blender/editors/transform/transform_mode_edge_slide.c b/source/blender/editors/transform/transform_mode_edge_slide.c index dae3fe6f7b4..dff9ded6b29 100644 --- a/source/blender/editors/transform/transform_mode_edge_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_slide.c @@ -143,7 +143,7 @@ static BMEdge *get_other_edge(BMVert *v, BMEdge *e) return NULL; } -/* interpoaltes along a line made up of 2 segments (used for edge slide) */ +/* Interpolates along a line made up of 2 segments (used for edge slide). */ static void interp_line_v3_v3v3v3( float p[3], const float v1[3], const float v2[3], const float v3[3], float t) { diff --git a/source/blender/editors/transform/transform_mode_resize.c b/source/blender/editors/transform/transform_mode_resize.c index 62a4fbd6f04..4d0bb7fbe9c 100644 --- a/source/blender/editors/transform/transform_mode_resize.c +++ b/source/blender/editors/transform/transform_mode_resize.c @@ -132,7 +132,7 @@ static void applyResize(TransInfo *t, const int UNUSED(mval[2])) } } - /* evil hack - redo resize if cliping needed */ + /* Evil hack - redo resize if clipping needed. */ if (t->flag & T_CLIP_UV && clipUVTransform(t, t->values_final, 1)) { size_to_mat3(mat, t->values_final); diff --git a/source/blender/editors/transform/transform_mode_shrink_fatten.c b/source/blender/editors/transform/transform_mode_shrink_fatten.c index bccf4db66af..dd89f4fd983 100644 --- a/source/blender/editors/transform/transform_mode_shrink_fatten.c +++ b/source/blender/editors/transform/transform_mode_shrink_fatten.c @@ -51,7 +51,7 @@ static eRedrawFlag shrinkfatten_handleEvent(struct TransInfo *t, const wmEvent * BLI_assert(t->mode == TFM_SHRINKFATTEN); const wmKeyMapItem *kmi = t->custom.mode.data; if (kmi && event->type == kmi->type && event->val == kmi->val) { - /* Allows the 'Even Thickness' effect to be enabled as a toogle. */ + /* Allows the "Even Thickness" effect to be enabled as a toggle. */ t->flag ^= T_ALT_TRANSFORM; return TREDRAW_HARD; } diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 15c215c426d..5b366e7f5fd 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -432,7 +432,7 @@ static int transform_modal(bContext *C, wmOperator *op, const wmEvent *event) * since we're not reading from 'td->center' in this case. see: T40241 */ if (t->tsnap.target == SCE_SNAP_TARGET_ACTIVE) { /* In camera view, tsnap callback is not set - * (see initSnappingMode() in transfrom_snap.c, and T40348). */ + * (see #initSnappingMode() in transform_snap.c, and T40348). */ if (t->tsnap.targetSnap && ((t->tsnap.status & TARGET_INIT) == 0)) { t->tsnap.targetSnap(t); } @@ -444,7 +444,7 @@ static int transform_modal(bContext *C, wmOperator *op, const wmEvent *event) if ((exit_code & OPERATOR_RUNNING_MODAL) == 0) { transformops_exit(C, op); - exit_code &= ~OPERATOR_PASS_THROUGH; /* preventively remove passthrough */ + exit_code &= ~OPERATOR_PASS_THROUGH; /* Preventively remove pass-through. */ } else { if (mode_prev != t->mode) { diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 508189c5d77..575c736cf51 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -235,7 +235,7 @@ void drawSnapping(const struct bContext *C, TransInfo *t) } else if (t->spacetype == SPACE_IMAGE) { if (validSnap(t)) { - /* This will not draw, and Im nor sure why - campbell */ + /* This will not draw, and I'm nor sure why - campbell */ /* TODO: see 2.7x for non-working code */ } } @@ -383,7 +383,7 @@ void applyProject(TransInfo *t) } } -#if 0 /* TODO: sipport this? */ +#if 0 /* TODO: support this? */ constraintTransLim(t, td); #endif } diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index b610369f82d..58198f21ba2 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -1959,7 +1959,7 @@ static short snapCurve(SnapData *snapdata, int clip_plane_len = snapdata->clip_plane_len; if (snapdata->has_occlusion_plane) { - /* We snap to vertices even if coccluded. */ + /* We snap to vertices even if occluded. */ clip_planes++; clip_plane_len--; } diff --git a/source/blender/editors/util/ed_transverts.c b/source/blender/editors/util/ed_transverts.c index 1075f256a09..d0234dee856 100644 --- a/source/blender/editors/util/ed_transverts.c +++ b/source/blender/editors/util/ed_transverts.c @@ -495,8 +495,8 @@ void ED_transverts_create_from_obedit(TransVertStore *tvs, Object *obedit, const } if (!tvs->transverts_tot && tvs->transverts) { - /* prevent memory leak. happens for curves/latticies due to */ - /* difficult condition of adding points to trans data */ + /* Prevent memory leak. happens for curves/lattices due to + * difficult condition of adding points to trans data. */ MEM_freeN(tvs->transverts); tvs->transverts = NULL; } diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c index ba22bcca0e1..91ec8546225 100644 --- a/source/blender/editors/util/numinput.c +++ b/source/blender/editors/util/numinput.c @@ -508,7 +508,7 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event) #endif case EVT_CKEY: if (event->ctrl) { - /* Copy current str to the copypaste buffer. */ + /* Copy current `str` to the copy/paste buffer. */ WM_clipboard_text_set(n->str, 0); updated = true; } diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index ed9e5053f10..e94aaa49839 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -978,7 +978,7 @@ static int p_connect_pairs(PHandle *handle, PBool topology_from_uvs) PChart *chart = handle->construction_chart; int ncharts = 0; - /* connect pairs, count edges, set vertex-edge pointer to a pairless edge */ + /* Connect pairs, count edges, set vertex-edge pointer to a pair-less edge. */ for (first = chart->faces; first; first = first->nextlink) { if (first->flag & PFACE_CONNECTED) { continue; @@ -1974,7 +1974,7 @@ static PBool p_collapse_allowed_geometric(PEdge *edge, PEdge *pair) b[1] = p_vec_angle(v2->co, v1->co, keepv->co); b[2] = M_PI - b[0] - b[1]; - /* abf criterion 1: avoid sharp and obtuse angles */ + /* ABF criterion 1: avoid sharp and obtuse angles. */ minangle = 15.0f * M_PI / 180.0f; maxangle = M_PI - minangle; @@ -1991,7 +1991,7 @@ static PBool p_collapse_allowed_geometric(PEdge *edge, PEdge *pair) } while (e && (e != oldv->edge)); if (p_vert_interior(oldv)) { - /* hlscm criterion: angular defect smaller than threshold */ + /* HLSCM criterion: angular defect smaller than threshold. */ if (fabsf(angulardefect) > (float)(M_PI * 30.0 / 180.0)) { return P_FALSE; } @@ -2000,12 +2000,12 @@ static PBool p_collapse_allowed_geometric(PEdge *edge, PEdge *pair) PVert *v1 = p_boundary_edge_next(oldv->edge)->vert; PVert *v2 = p_boundary_edge_prev(oldv->edge)->vert; - /* abf++ criterion 2: avoid collapsing verts inwards */ + /* ABF++ criterion 2: avoid collapsing verts inwards. */ if (p_vert_interior(keepv)) { return P_FALSE; } - /* don't collapse significant boundary changes */ + /* Don't collapse significant boundary changes. */ angle = p_vec_angle(v1->co, oldv->co, v2->co); if (angle < (M_PI * 160.0 / 180.0)) { return P_FALSE; @@ -3837,7 +3837,7 @@ static void p_chart_rotate_fit_aabb(PChart *chart) /* Area Smoothing */ -/* 2d bsp tree for inverse mapping - that's a bit silly */ +/* 2d BSP tree for inverse mapping - that's a bit silly. */ typedef struct SmoothTriangle { float co1[2], co2[2], co3[2]; @@ -4288,7 +4288,7 @@ static void p_smooth(PChart *chart) MEM_freeN(hedges); MEM_freeN(vedges); - /* create bsp */ + /* Create BSP. */ t = triangles = MEM_mallocN(sizeof(SmoothTriangle) * esize * 2, "PSmoothTris"); trip = tri = MEM_mallocN(sizeof(SmoothTriangle *) * esize * 2, "PSmoothTriP"); diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 7b27bb570cc..5c4dc90f112 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -224,13 +224,13 @@ enum StitchModes { STITCH_EDGE, }; -/* UvElement identification. */ +/** #UvElement identification. */ typedef struct UvElementID { int faceIndex; int elementIndex; } UvElementID; -/* StitchState initializition. */ +/** #StitchState initialization. */ typedef struct StitchStateInit { int uv_selected_count; UvElementID *to_select; @@ -2050,7 +2050,7 @@ static StitchState *stitch_init(bContext *C, BLI_ghash_free(edge_hash, NULL, NULL); - /* refill an edge hash to create edge connnectivity data */ + /* Refill an edge hash to create edge connectivity data. */ state->edge_hash = edge_hash = BLI_ghash_new(uv_edge_hash, uv_edge_compare, "stitch_edge_hash"); for (i = 0; i < total_edges; i++) { BLI_ghash_insert(edge_hash, edges + i, edges + i); |