diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-26 14:35:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-26 14:50:48 +0300 |
commit | f1e49038543cf75766f4a220f62cdc6cdbc0e27d (patch) | |
tree | 0cec2c64739a6a4ca246fe26bed6fe629ea315cb /source/blender/editors | |
parent | fae5a907d4d1380f087f1226ebbd65d9d0718cc6 (diff) |
Cleanup: full sentences in comments, improve comment formatting
Diffstat (limited to 'source/blender/editors')
94 files changed, 243 insertions, 242 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index d5c7ff07274..745b869228a 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -413,7 +413,7 @@ static float normalization_factor_get(Scene *scene, FCurve *fcu, short flag, flo else { /* Calculate min/max using full fcurve evaluation. * [slower than bezier forward differencing but evaluates Back/Elastic interpolation - * as well].*/ + * as well]. */ float step_size = (bezt->vec[1][0] - prev_bezt->vec[1][0]) / resol; for (int j = 0; j <= resol; j++) { float eval_time = prev_bezt->vec[1][0] + step_size * j; diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index a03f19d0111..1cdd879a8f9 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -3132,7 +3132,7 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, Base *base, int filter_m /* check selection and object type filters */ if ((ads->filterflag & ADS_FILTER_ONLYSEL) && - !((base->flag & BASE_SELECTED) /*|| (base == sce->basact)*/)) { + !((base->flag & BASE_SELECTED) /*|| (base == sce->basact) */)) { /* only selected should be shown */ return false; } diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index ecc1b4b4523..dae2138e481 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -1253,7 +1253,7 @@ static int copy_driver_button_exec(bContext *C, wmOperator *op) } } - /* since we're just copying, we don't really need to do anything else...*/ + /* Since we're just copying, we don't really need to do anything else. */ return (changed) ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } @@ -1303,7 +1303,7 @@ static int paste_driver_button_exec(bContext *C, wmOperator *op) } } - /* since we're just copying, we don't really need to do anything else...*/ + /* Since we're just copying, we don't really need to do anything else. */ return (changed) ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index e1ae6526347..aeddd03f3c1 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -693,7 +693,7 @@ typedef struct tAnimCopybufItem { int totvert; /* number of keyframes stored for this channel */ BezTriple *bezt; /* keyframes in buffer */ - short id_type; /* Result of GS(id->name)*/ + short id_type; /* Result of `GS(id->name)`. */ bool is_bone; /* special flag for armature bones */ } tAnimCopybufItem; diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index e795d6fb774..506b126d01e 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -2244,7 +2244,7 @@ static int clear_anim_v3d_exec(bContext *C, wmOperator *UNUSED(op)) bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, bone_name); MEM_freeN(bone_name); - /* delete if bone is selected*/ + /* Delete if bone is selected. */ if ((pchan) && (pchan->bone)) { if (pchan->bone->flag & BONE_SELECTED) { can_delete = true; diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index fda7b600c1c..0206aabd359 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -529,7 +529,7 @@ void ANIM_OT_keying_set_active_set(wmOperatorType *ot) /* Keying Set Type Info declarations */ static ListBase keyingset_type_infos = {NULL, NULL}; -/* Built-In Keying Sets (referencing type infos)*/ +/* Built-In Keying Sets (referencing type information). */ ListBase builtin_keyingsets = {NULL, NULL}; /* --------------- */ diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index 1d4936bdf5e..0ee11a6ef55 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -1558,7 +1558,7 @@ void ARMATURE_OT_extrude(wmOperatorType *ot) /* ********************** Bone Add *************************************/ -/*op makes a new bone and returns it with its tip selected */ +/* Op makes a new bone and returns it with its tip selected. */ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op) { diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c index 912aafbd6e3..67d6dd94190 100644 --- a/source/blender/editors/armature/armature_edit.c +++ b/source/blender/editors/armature/armature_edit.c @@ -1030,7 +1030,7 @@ void ARMATURE_OT_switch_direction(wmOperatorType *ot) /** \name Align Operator * \{ */ -/* helper to fix a ebone position if its parent has moved due to alignment*/ +/* Helper to fix a ebone position if its parent has moved due to alignment. */ static void fix_connected_bone(EditBone *ebone) { float diff[3]; @@ -1073,9 +1073,9 @@ static void bone_align_to_bone(ListBase *edbo, EditBone *selbone, EditBone *actb add_v3_v3v3(selbone->tail, selbone->head, actboneaxis); selbone->roll = actbone->roll; - /* if the bone being aligned has connected descendants they must be moved + /* If the bone being aligned has connected descendants they must be moved * according to their parent new position, otherwise they would be left - * in an inconsistent state: connected but away from the parent*/ + * in an inconsistent state: connected but away from the parent. */ fix_editbone_connected_children(edbo, selbone); } diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index ffcdb99c5a3..bc6d0687654 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -847,7 +847,7 @@ void ED_armature_to_edit(bArmature *arm) } /* *************************************************************** */ -/* Used by Undo for Armature EditMode*/ +/* Used by Undo for Armature EditMode. */ /* free's bones and their properties */ diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index f63334b25ba..df3550d5db6 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -516,7 +516,7 @@ static int poselib_add_exec(bContext *C, wmOperator *op) /* use Keying Set to determine what to store for the pose */ - /* this includes custom props :)*/ + /* This includes custom props :). */ ks = ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_WHOLE_CHARACTER_SELECTED_ID); ANIM_apply_keyingset(C, NULL, act, ks, MODIFYKEY_MODE_INSERT, (float)frame); @@ -1462,7 +1462,7 @@ static int poselib_preview_handle_event(bContext *UNUSED(C), wmOperator *op, con pld->state = PL_PREVIEW_CONFIRM; break; - /* toggle between original pose and poselib pose*/ + /* Toggle between original pose and poselib pose. */ case EVT_TABKEY: pld->flag |= PL_PREVIEW_SHOWORIGINAL; pld->redraw = PL_PREVIEW_REDRAWALL; diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index 4e8c969f705..9b1de742332 100644 --- a/source/blender/editors/armature/pose_slide.c +++ b/source/blender/editors/armature/pose_slide.c @@ -444,7 +444,7 @@ static void pose_slide_draw_2d_slider(const struct bContext *UNUSED(C), ARegion color_line); /* Draw triangles at the ends of the line in overshoot mode to indicate direction of 0-100% - * range.*/ + * range. */ if (pso->overshoot) { if (pso->factor > 1 + OVERSHOOT_RANGE_DELTA + 0.5) { draw_overshoot_triangle(color_line, false, main_line_rect.xmin, line_y); @@ -1468,7 +1468,7 @@ static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event) /* Reset transforms back to original state. */ pose_slide_reset(pso); - /* Depsgraph updates + redraws.*/ + /* Depsgraph updates + redraws. */ pose_slide_refresh(C, pso); /* Clean up temp data. */ diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 751f8333aaa..2160aaf705f 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -323,7 +323,7 @@ static void gpencil_draw_strokes(tGPDdraw *tgpw) MaterialGPencilStyle *gp_style = (ma) ? ma->gp_style : NULL; if ((gp_style == NULL) || (gp_style->flag & GP_MATERIAL_HIDE) || - /* if onion and ghost flag do not draw*/ + /* If onion and ghost flag do not draw. */ (tgpw->onion && (gp_style->flag & GP_MATERIAL_HIDE_ONIONSKIN))) { continue; } diff --git a/source/blender/editors/gpencil/gpencil_armature.c b/source/blender/editors/gpencil/gpencil_armature.c index 6d6f4bc4b40..24fb0873a86 100644 --- a/source/blender/editors/gpencil/gpencil_armature.c +++ b/source/blender/editors/gpencil/gpencil_armature.c @@ -425,7 +425,7 @@ static void gpencil_add_verts_to_dgroups( } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/gpencil/gpencil_bake_animation.c b/source/blender/editors/gpencil/gpencil_bake_animation.c index 30ebc9189c5..1a5e2950e09 100644 --- a/source/blender/editors/gpencil/gpencil_bake_animation.c +++ b/source/blender/editors/gpencil/gpencil_bake_animation.c @@ -185,7 +185,7 @@ static void gpencil_bake_ob_list(bContext *C, Depsgraph *depsgraph, Scene *scene if (ob == obact) { continue; } - /* Add selected objects.*/ + /* Add selected objects. */ if (ob->type == OB_GPENCIL) { elem = MEM_callocN(sizeof(GpBakeOb), __func__); elem->ob = ob; diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c index 8ab413e907c..9bea1868895 100644 --- a/source/blender/editors/gpencil/gpencil_convert.c +++ b/source/blender/editors/gpencil/gpencil_convert.c @@ -168,7 +168,7 @@ static void gpencil_strokepoint_convertcoords(bContext *C, ARegion *region = CTX_wm_region(C); /* TODO(sergey): This function might be called from a loop, but no tagging is happening in it, * so it's not that expensive to ensure evaluated depsgraph here. However, ideally all the - * parameters are to wrapped into a context style struct and queried from Context once.*/ + * parameters are to wrapped into a context style struct and queried from Context once. */ Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); Object *obact = CTX_data_active_object(C); bGPDspoint mypt, *pt; @@ -219,7 +219,7 @@ typedef struct tGpTimingData { int frame_range; /* Number of frames evaluated for path animation */ int start_frame, end_frame; bool realtime; /* Will overwrite end_frame in case of Original or CustomGap timing... */ - float gap_duration, gap_randomness; /* To be used with CustomGap mode*/ + float gap_duration, gap_randomness; /* To be used with CustomGap mode. */ int seed; /* Data set from points, used to compute final timing FCurve */ diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index b4afeb4ed8a..47bb153cf46 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -828,7 +828,7 @@ static int gpencil_frame_clean_loose_exec(bContext *C, wmOperator *op) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -1572,7 +1572,7 @@ static int gpencil_stroke_arrange_exec(bContext *C, wmOperator *op) continue; } bool gpf_lock = false; - /* some stroke is already at front*/ + /* Some stroke is already at front. */ if (ELEM(direction, GP_STROKE_MOVE_TOP, GP_STROKE_MOVE_UP)) { if (gps == gpf->strokes.last) { gpf_lock = true; @@ -1664,7 +1664,7 @@ static int gpencil_stroke_arrange_exec(bContext *C, wmOperator *op) BLI_freelistN(&selected); } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -1772,7 +1772,7 @@ static int gpencil_stroke_change_color_exec(bContext *C, wmOperator *op) } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -3356,7 +3356,7 @@ static int gpencil_material_unlock_all_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_CANCELLED; } - /* make all layers editable again*/ + /* Make all layers editable again. */ MaterialGPencilStyle *gp_style = NULL; for (short i = 0; i < *totcol; i++) { @@ -3410,7 +3410,7 @@ static int gpencil_material_select_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* read all strokes and select*/ + /* Read all strokes and select. */ CTX_DATA_BEGIN (C, bGPDlayer *, gpl, editable_gpencil_layers) { bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe; @@ -3452,7 +3452,7 @@ static int gpencil_material_select_exec(bContext *C, wmOperator *op) } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index b1c0060981a..8d1f841da6c 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -3285,7 +3285,7 @@ static int gpencil_stroke_cyclical_set_exec(bContext *C, wmOperator *op) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -4478,7 +4478,7 @@ static int gpencil_stroke_trim_exec(bContext *C, wmOperator *op) } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -4681,7 +4681,7 @@ static int gpencil_stroke_separate_exec(bContext *C, wmOperator *op) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -4860,7 +4860,7 @@ static int gpencil_stroke_split_exec(bContext *C, wmOperator *op) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -5087,7 +5087,7 @@ static int gpencil_cutter_lasso_select(bContext *C, BKE_gpencil_stroke_select_index_reset(gps); } } - /* if not multiedit, exit loop. */ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -5151,7 +5151,7 @@ static int gpencil_cutter_lasso_select(bContext *C, } } } - /* if not multiedit, exit loop. */ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -5170,7 +5170,7 @@ static int gpencil_cutter_lasso_select(bContext *C, gpencil_cutter_dissolve(gpd, gpl, gps, flat_caps); } } - /* if not multiedit, exit loop. */ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -5478,7 +5478,7 @@ static int gpencil_stroke_normalize_exec(bContext *C, wmOperator *op) BKE_gpencil_stroke_geometry_update(gpd, gps); } } - /* If not multiedit, exit loop. */ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index 6e6ecfa583b..4419833a99c 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -810,7 +810,7 @@ static bool is_leak_narrow(ImBuf *ibuf, const int maxpixel, int limit, int index } } else { - /* edge of image*/ + /* Edge of image. */ t_a = true; } /* pixels on bottom */ @@ -822,7 +822,7 @@ static bool is_leak_narrow(ImBuf *ibuf, const int maxpixel, int limit, int index } } else { - /* edge of image*/ + /* Edge of image. */ t_b = true; } } @@ -846,7 +846,7 @@ static bool is_leak_narrow(ImBuf *ibuf, const int maxpixel, int limit, int index } } else { - t_a = true; /* edge of image*/ + t_a = true; /* Edge of image. */ } /* pixels to left */ pt = index + extreme; @@ -1869,7 +1869,7 @@ static int gpencil_fill_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE DEG_id_tag_update(&tgpf->gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL); - /* add a modal handler for this operator*/ + /* Add a modal handler for this operator. */ WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; @@ -2123,7 +2123,7 @@ static int gpencil_fill_modal(bContext *C, wmOperator *op, const wmEvent *event) gpencil_stroke_convertcoords_tpoint( tgpf->scene, tgpf->region, tgpf->ob, &point2D, NULL, &pt->x); - /* Hash of selected frames.*/ + /* Hash of selected frames. */ GHash *frame_list = BLI_ghash_int_new_ex(__func__, 64); /* If not multiframe and there is no frame in CFRA for the active layer, create diff --git a/source/blender/editors/gpencil/gpencil_mesh.c b/source/blender/editors/gpencil/gpencil_mesh.c index 55468dffab0..1882285a230 100644 --- a/source/blender/editors/gpencil/gpencil_mesh.c +++ b/source/blender/editors/gpencil/gpencil_mesh.c @@ -159,7 +159,7 @@ static bool gpencil_bake_ob_list(bContext *C, Depsgraph *depsgraph, Scene *scene if (ob == obact) { continue; } - /* Add selected meshes.*/ + /* Add selected meshes. */ if (ob->type == OB_MESH) { elem = MEM_callocN(sizeof(GpBakeOb), __func__); elem->ob = ob; diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 7e0ec9b957c..d0c0933c5be 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1433,7 +1433,7 @@ static void gpencil_stroke_soft_refine(bGPDstroke *gps) bGPDspoint *pt2 = NULL; int i; - /* check if enough points*/ + /* Check if enough points. */ if (gps->totpoints < 3) { return; } @@ -1792,7 +1792,7 @@ static void gpencil_stroke_doeraser(tGPsdata *p) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index 55521ac4d15..c33b43247fd 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -1374,7 +1374,7 @@ static bool gpencil_do_curve_circle_sel(bContext *C, const bool handles_visible = (v3d->overlay.handle_display != CURVE_HANDLE_NONE) && (!only_selected || BEZT_ISSEL_ANY(bezt)); - /* if the handles are not visible only check ctrl point (vec[1])*/ + /* If the handles are not visible only check control point (vec[1]). */ int from = (!handles_visible) ? 1 : 0; int to = (!handles_visible) ? 2 : 3; @@ -1719,7 +1719,7 @@ static bool gpencil_generic_curve_select(bContext *C, } } } - /* if the handles are not visible only check ctrl point (vec[1])*/ + /* If the handles are not visible only check ctrl point (vec[1]). */ else { const bool is_select = bezt->f2; bool is_inside = is_inside_fn(region, gps_iter.diff_mat, bezt->vec[1], user_data); @@ -2153,7 +2153,7 @@ static void gpencil_select_curve_point(bContext *C, const bool handles_visible = (v3d->overlay.handle_display != CURVE_HANDLE_NONE) && (!only_selected || BEZT_ISSEL_ANY(bezt)); - /* if the handles are not visible only check ctrl point (vec[1])*/ + /* If the handles are not visible only check control point (vec[1]). */ int from = (!handles_visible) ? 1 : 0; int to = (!handles_visible) ? 2 : 3; diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 31f5972fdf8..15ada6e0891 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -565,7 +565,7 @@ bool ED_gpencil_layer_has_selected_stroke(const bGPDlayer *gpl, const bool is_mu return true; } } - /* If not multiedit, exit loop. */ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -1640,7 +1640,7 @@ void ED_gpencil_vgroup_assign(bContext *C, Object *ob, float weight) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -1693,7 +1693,7 @@ void ED_gpencil_vgroup_remove(bContext *C, Object *ob) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -1748,7 +1748,7 @@ void ED_gpencil_vgroup_select(bContext *C, Object *ob) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -1798,7 +1798,7 @@ void ED_gpencil_vgroup_deselect(bContext *C, Object *ob) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/gpencil/gpencil_vertex_ops.c b/source/blender/editors/gpencil/gpencil_vertex_ops.c index bf46fa2544f..402bccce2f7 100644 --- a/source/blender/editors/gpencil/gpencil_vertex_ops.c +++ b/source/blender/editors/gpencil/gpencil_vertex_ops.c @@ -99,7 +99,7 @@ static bool is_any_stroke_selected(bContext *C, const bool is_multiedit, const b } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -204,7 +204,7 @@ static int gpencil_vertexpaint_brightness_contrast_exec(bContext *C, wmOperator } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -325,7 +325,7 @@ static int gpencil_vertexpaint_hsv_exec(bContext *C, wmOperator *op) } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -419,7 +419,7 @@ static int gpencil_vertexpaint_invert_exec(bContext *C, wmOperator *op) } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -510,7 +510,7 @@ static int gpencil_vertexpaint_levels_exec(bContext *C, wmOperator *op) } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -605,7 +605,7 @@ static int gpencil_vertexpaint_set_exec(bContext *C, wmOperator *op) } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -1113,7 +1113,7 @@ static int gpencil_stroke_reset_vertex_color_exec(bContext *C, wmOperator *op) changed = true; } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/gpencil/gpencil_vertex_paint.c b/source/blender/editors/gpencil/gpencil_vertex_paint.c index 3d99b314f7e..7ec64b2afd6 100644 --- a/source/blender/editors/gpencil/gpencil_vertex_paint.c +++ b/source/blender/editors/gpencil/gpencil_vertex_paint.c @@ -1107,7 +1107,7 @@ static bool gpencil_vertexpaint_brush_do_frame(bContext *C, break; } } - /* Clear the selected array, but keep the memory allocation.*/ + /* Clear the selected array, but keep the memory allocation. */ gso->pbuffer = gpencil_select_buffer_ensure( gso->pbuffer, &gso->pbuffer_size, &gso->pbuffer_used, true); diff --git a/source/blender/editors/gpencil/gpencil_weight_paint.c b/source/blender/editors/gpencil/gpencil_weight_paint.c index 6fb98b4a8ac..56eed187d87 100644 --- a/source/blender/editors/gpencil/gpencil_weight_paint.c +++ b/source/blender/editors/gpencil/gpencil_weight_paint.c @@ -555,7 +555,7 @@ static bool gpencil_weightpaint_brush_do_frame(bContext *C, break; } } - /* Clear the selected array, but keep the memory allocation.*/ + /* Clear the selected array, but keep the memory allocation. */ gso->pbuffer = gpencil_select_buffer_ensure( gso->pbuffer, &gso->pbuffer_size, &gso->pbuffer_used, true); diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 0e2be5eb568..7fcae2349db 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -91,7 +91,7 @@ void EDBM_mesh_load(struct Main *bmain, struct Object *ob); /* flushes based on the current select mode. if in vertex select mode, * verts select/deselect edges and faces, if in edge select mode, * edges select/deselect faces and vertices, and in face select mode faces select/deselect - * edges and vertices.*/ + * edges and vertices. */ void EDBM_select_more(struct BMEditMesh *em, const bool use_face_step); void EDBM_select_less(struct BMEditMesh *em, const bool use_face_step); @@ -481,9 +481,8 @@ int ED_mesh_mirror_spatial_table_lookup(struct Object *ob, void ED_mesh_mirror_topo_table_begin(struct Object *ob, struct Mesh *me_eval); void ED_mesh_mirror_topo_table_end(struct Object *ob); -/* retrieves mirrored cache vert, or NULL if there isn't one. - * note: calling this without ensuring the mirror cache state - * is bad.*/ +/* Retrieves mirrored cache vert, or NULL if there isn't one. + * NOTE: calling this without ensuring the mirror cache state is bad. */ int mesh_get_x_mirror_vert(struct Object *ob, struct Mesh *me_eval, int index, diff --git a/source/blender/editors/include/ED_undo.h b/source/blender/editors/include/ED_undo.h index ed1ec96a13f..059277e1466 100644 --- a/source/blender/editors/include/ED_undo.h +++ b/source/blender/editors/include/ED_undo.h @@ -53,7 +53,7 @@ void ED_OT_undo_redo(struct wmOperatorType *ot); void ED_OT_undo_history(struct wmOperatorType *ot); int ED_undo_operator_repeat(struct bContext *C, struct wmOperator *op); -/* convenience since UI callbacks use this mostly*/ +/* Convenience since UI callbacks use this mostly. */ void ED_undo_operator_repeat_cb(struct bContext *C, void *arg_op, void *arg_unused); void ED_undo_operator_repeat_cb_evt(struct bContext *C, void *arg_op, int arg_unused); diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 7553a2d373e..b8443b952a8 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -318,8 +318,8 @@ typedef enum { UI_BUT_POIN_SHORT = 64, UI_BUT_POIN_INT = 96, UI_BUT_POIN_FLOAT = 128, - /* UI_BUT_POIN_FUNCTION = 192, */ /*UNUSED*/ - UI_BUT_POIN_BIT = 256, /* OR'd with a bit index*/ + // UI_BUT_POIN_FUNCTION = 192, /* UNUSED */ + UI_BUT_POIN_BIT = 256, /* OR'd with a bit index. */ } eButPointerType; /* requires (but->poin != NULL) */ diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 063dd88c01d..9e5e1a33564 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -3244,8 +3244,8 @@ void ui_but_range_set_soft(uiBut *but) RNA_property_int_ui_range(&but->rnapoin, but->rnaprop, &imin, &imax, &istep); softmin = (imin == INT_MIN) ? -1e4 : imin; softmax = (imin == INT_MAX) ? 1e4 : imax; - /*step = istep;*/ /*UNUSED*/ - /*precision = 1;*/ /*UNUSED*/ + // step = istep; /* UNUSED */ + // precision = 1; /* UNUSED */ if (is_array) { int value_range[2]; @@ -3264,8 +3264,8 @@ void ui_but_range_set_soft(uiBut *but) RNA_property_float_ui_range(&but->rnapoin, but->rnaprop, &fmin, &fmax, &fstep, &fprecision); softmin = (fmin == -FLT_MAX) ? (float)-1e4 : fmin; softmax = (fmax == FLT_MAX) ? (float)1e4 : fmax; - /*step = fstep;*/ /*UNUSED*/ - /*precision = fprecision;*/ /*UNUSED*/ + // step = fstep; /* UNUSED */ + // precision = fprecision; /* UNUSED */ /* Use shared min/max for array values, except for color alpha. */ if (is_array && !(subtype == PROP_COLOR && but->rnaindex == 3)) { @@ -4595,7 +4595,7 @@ static uiBut *ui_def_but_rna(uiBlock *block, if (proptype == PROP_POINTER) { /* If the button shows an ID, automatically set it as focused in context so operators can - * access it.*/ + * access it. */ const PointerRNA pptr = RNA_property_pointer_get(ptr, prop); if (pptr.data && RNA_struct_is_ID(pptr.type)) { but->context = CTX_store_add(&block->contexts, "id", &pptr); diff --git a/source/blender/editors/interface/interface_eyedropper_gpencil_color.c b/source/blender/editors/interface/interface_eyedropper_gpencil_color.c index f2899fc0098..417807afff1 100644 --- a/source/blender/editors/interface/interface_eyedropper_gpencil_color.c +++ b/source/blender/editors/interface/interface_eyedropper_gpencil_color.c @@ -255,7 +255,7 @@ static void eyedropper_gpencil_color_set(bContext *C, const wmEvent *event, Eyed copy_v3_v3(col_conv, eye->color); } - /* Add material or Palette color*/ + /* Add material or Palette color. */ if (eye->mode == 0) { eyedropper_add_material(C, col_conv, only_stroke, only_fill, both); } diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 7d866ec17d2..f255507ddaf 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -4770,7 +4770,7 @@ static float ui_numedit_apply_snapf( UnitSettings *unit = but->block->unit; const int unit_type = UI_but_unit_type_get(but); if ((unit_type == PROP_UNIT_ROTATION) && (unit->system_rotation != USER_UNIT_ROT_RADIANS)) { - /* pass (degrees)*/ + /* Pass (degrees). */ } else { softrange = 20.0f; @@ -8219,8 +8219,8 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s data->hold_action_timer = NULL; } - /* add a blocking ui handler at the window handler for blocking, modal states - * but not for popups, because we already have a window level handler*/ + /* Add a blocking ui handler at the window handler for blocking, modal states + * but not for popups, because we already have a window level handler. */ if (!(but->block->handle && but->block->handle->popup)) { if (button_modal_state(state)) { if (!button_modal_state(data->state)) { @@ -10018,7 +10018,7 @@ static int ui_handle_menu_event(bContext *C, } if (!but) { - /* wrap button or no active button*/ + /* Wrap button or no active button. */ uiBut *but_wrap = NULL; if (ELEM(scrolltype, MENU_SCROLL_UP, MENU_SCROLL_BOTTOM)) { but_wrap = ui_but_last(block); @@ -10362,7 +10362,7 @@ static int ui_handle_menu_event(bContext *C, * anymore why it was there? but it meant enter didn't work * for example when mouse was not over submenu */ if ((event->type == TIMER) || - (/*inside &&*/ (!menu->menuretval || (menu->menuretval & UI_RETURN_UPDATE)) && + (/* inside && */ (!menu->menuretval || (menu->menuretval & UI_RETURN_UPDATE)) && retval == WM_UI_HANDLER_CONTINUE)) { retval = ui_handle_menu_button(C, event, menu); } diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index ad0c523a594..88ab6a377d0 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -245,7 +245,7 @@ void UI_fontstyle_draw_rotated(const uiFontStyle *fs, /* ignore UI_STYLE, always aligned to top */ - /* rotate counter-clockwise for now (assumes left-to-right language)*/ + /* Rotate counter-clockwise for now (assumes left-to-right language). */ xofs += height; yofs = BLF_width(fs->uifont_id, str, BLF_DRAW_STR_DUMMY_MAX) + 5; angle = M_PI_2; diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index fc3af525d45..122a43513b1 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -3050,7 +3050,7 @@ static void colorband_flip_cb(bContext *C, ColorBand *coba) coba->data[a] = data_tmp[a]; } - /* may as well flip the cur*/ + /* May as well flip the `cur`. */ coba->cur = coba->tot - (coba->cur + 1); ED_undo_push(C, "Flip Color Ramp"); diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c index e03390780f9..907881a44f3 100644 --- a/source/blender/editors/mesh/editmesh_extrude.c +++ b/source/blender/editors/mesh/editmesh_extrude.c @@ -509,7 +509,7 @@ static int edbm_extrude_context_exec(bContext *C, wmOperator *op) edbm_extrude_mesh(obedit, em, op); /* This normally happens when pushing undo but modal operators - * like this one don't push undo data until after modal mode is done.*/ + * like this one don't push undo data until after modal mode is done. */ EDBM_update(obedit->data, &(const struct EDBMUpdate_Params){ .calc_looptri = true, diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index af4ce0abe5f..0e2dd492e06 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -937,7 +937,7 @@ static KnifeVert *knife_split_edge(KnifeTool_OpData *kcd, static void knife_start_cut(KnifeTool_OpData *kcd) { kcd->prev = kcd->curr; - kcd->curr.is_space = 0; /*TODO: why do we do this? */ + kcd->curr.is_space = 0; /* TODO: why do we do this? */ if (kcd->prev.vert == NULL && kcd->prev.edge == NULL) { float origin[3], origin_ofs[3]; @@ -952,7 +952,7 @@ static void knife_start_cut(KnifeTool_OpData *kcd) zero_v3(kcd->prev.cage); } - copy_v3_v3(kcd->prev.co, kcd->prev.cage); /*TODO: do we need this? */ + copy_v3_v3(kcd->prev.co, kcd->prev.cage); /* TODO: do we need this? */ copy_v3_v3(kcd->curr.cage, kcd->prev.cage); copy_v3_v3(kcd->curr.co, kcd->prev.co); } diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index fc32a2d9bab..4a87266f1c9 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1805,7 +1805,7 @@ static bool mouse_mesh_loop( V3D_PROJ_RET_OK) { tdist = len_squared_v2v2(mvalf, co); if (tdist < best_dist) { - /* printf("Best face: %p (%f)\n", f, tdist);*/ + // printf("Best face: %p (%f)\n", f, tdist); best_dist = tdist; efa = f; } diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index ee520753478..fe9656d277e 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2309,8 +2309,8 @@ static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op) } } - /* ok, we don't have two adjacent faces, but we do have two selected ones. - * that's an error condition.*/ + /* OK, we don't have two adjacent faces, but we do have two selected ones. + * that's an error condition. */ if (tot == 0) { continue; } @@ -3639,7 +3639,7 @@ void MESH_OT_remove_doubles(wmOperatorType *ot) /** \name Shape Key Propagate Operator * \{ */ -/* BMESH_TODO this should be properly encapsulated in a bmop. but later.*/ +/* BMESH_TODO this should be properly encapsulated in a bmop. but later. */ static bool shape_propagate(BMEditMesh *em) { BMIter iter; @@ -3732,7 +3732,7 @@ void MESH_OT_shape_propagate_to_all(wmOperatorType *ot) /** \name Blend from Shape Operator * \{ */ -/* BMESH_TODO this should be properly encapsulated in a bmop. but later.*/ +/* BMESH_TODO this should be properly encapsulated in a bmop. but later. */ static int edbm_blend_from_shape_exec(bContext *C, wmOperator *op) { Object *obedit_ref = CTX_data_edit_object(C); @@ -4139,9 +4139,9 @@ static float bm_edge_seg_isect(const float sco_a[2], yi = (b1 * m2 - m1 * b2) / (m2 - m1); } - /* Intersect inside bounding box of edge?*/ + /* Intersect inside bounding box of edge? */ if ((xi >= x2min) && (xi <= x2max) && (yi <= y2max) && (yi >= y2min)) { - /* test for vertex intersect that may be 'close enough'*/ + /* Test for vertex intersect that may be 'close enough'. */ if (mode != KNIFE_MULTICUT) { if (xi <= (x21 + threshold) && xi >= (x21 - threshold)) { if (yi <= (y21 + threshold) && yi >= (y21 - threshold)) { @@ -4244,7 +4244,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* store percentage of edge cut for KNIFE_EXACT here.*/ + /* Store percentage of edge cut for KNIFE_EXACT here. */ BMOpSlot *slot_edge_percents = BMO_slot_get(bmop.slots_in, "edge_percents"); BM_ITER_MESH (be, &iter, bm, BM_EDGES_OF_MESH) { bool is_cut = false; @@ -6958,9 +6958,9 @@ static void sort_bmelem_flag(bContext *C, } } - /* printf("%d vertices: %d to be affected...\n", totelem[0], affected[0]);*/ - /* printf("%d edges: %d to be affected...\n", totelem[1], affected[1]);*/ - /* printf("%d faces: %d to be affected...\n", totelem[2], affected[2]);*/ + // printf("%d vertices: %d to be affected...\n", totelem[0], affected[0]); + // printf("%d edges: %d to be affected...\n", totelem[1], affected[1]); + // printf("%d faces: %d to be affected...\n", totelem[2], affected[2]); if (affected[0] == 0 && affected[1] == 0 && affected[2] == 0) { for (j = 3; j--;) { if (pblock[j]) { @@ -7221,7 +7221,7 @@ static int edbm_bridge_tag_boundary_edges(BMesh *bm) /* check if its only used by selected faces */ BM_ITER_ELEM (f, &fiter, e, BM_FACES_OF_EDGE) { if (BM_elem_flag_test(f, BM_ELEM_SELECT)) { - /* tag face for removal*/ + /* Tag face for removal. */ if (!BM_elem_flag_test(f, BM_ELEM_TAG)) { BM_elem_flag_enable(f, BM_ELEM_TAG); totface_del++; diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 54a7b0dd22e..141b69f0465 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -1011,7 +1011,7 @@ BMFace *EDBM_uv_active_face_get(BMEditMesh *em, const bool sloppy, const bool se return NULL; } -/* can we edit UV's for this mesh?*/ +/* Can we edit UV's for this mesh? */ bool EDBM_uv_check(BMEditMesh *em) { /* some of these checks could be a touch overkill */ @@ -1689,8 +1689,8 @@ bool BMBVH_EdgeVisible(struct BMBVHTree *tree, scale_point(co1, co2, 0.99); scale_point(co3, co2, 0.99); - /* ok, idea is to generate rays going from the camera origin to the - * three points on the edge (v1, mid, v2)*/ + /* OK, idea is to generate rays going from the camera origin to the + * three points on the edge (v1, mid, v2). */ sub_v3_v3v3(dir1, origin, co1); sub_v3_v3v3(dir2, origin, co2); sub_v3_v3v3(dir3, origin, co3); @@ -1699,8 +1699,8 @@ bool BMBVH_EdgeVisible(struct BMBVHTree *tree, normalize_v3_length(dir2, epsilon); normalize_v3_length(dir3, epsilon); - /* offset coordinates slightly along view vectors, to avoid - * hitting the faces that own the edge.*/ + /* Offset coordinates slightly along view vectors, + * to avoid hitting the faces that own the edge. */ add_v3_v3v3(co1, co1, dir1); add_v3_v3v3(co2, co2, dir2); add_v3_v3v3(co3, co3, dir3); diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 222476e6971..7c6dc6516ed 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -166,7 +166,7 @@ static void mesh_uv_reset_array(float **fuv, const int len) fuv[3][0] = 0.0; fuv[3][1] = 1.0; - /*make sure we ignore 2-sided faces*/ + /* Make sure we ignore 2-sided faces. */ } else if (len > 2) { float fac = 0.0f, dfac = 1.0f / (float)len; diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index 9e2e2786347..f25317e8e85 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -51,7 +51,7 @@ bool EDBM_op_call_and_selectf(struct BMEditMesh *em, const bool select_replace, const char *fmt, ...); -/* Same as above, but doesn't report errors.*/ +/* Same as above, but doesn't report errors. */ bool EDBM_op_call_silentf(struct BMEditMesh *em, const char *fmt, ...); /* these next two functions are the split version of EDBM_op_callf, so you can diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index 7f26d44a4ed..e941b27879b 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -1374,7 +1374,7 @@ static int bake(const BakeAPIRender *bkr, * the cage is supposed to have interpolated normals * between the faces unless the geometry is physically * split. So we create a copy of the low poly mesh without - * the eventual edge split.*/ + * the eventual edge split. */ if (md->type == eModifierType_EdgeSplit) { BLI_remlink(&ob_low_eval->modifiers, md); diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c index 22c9d669ff3..7b7970fbfe5 100644 --- a/source/blender/editors/object/object_data_transfer.c +++ b/source/blender/editors/object/object_data_transfer.c @@ -611,23 +611,23 @@ void OBJECT_OT_data_transfer(wmOperatorType *ot) { PropertyRNA *prop; - /* Identifiers.*/ + /* Identifiers. */ ot->name = "Transfer Mesh Data"; ot->idname = "OBJECT_OT_data_transfer"; ot->description = "Transfer data layer(s) (weights, edge sharp, etc.) from active to selected meshes"; - /* API callbacks.*/ + /* API callbacks. */ ot->poll = data_transfer_poll; ot->poll_property = data_transfer_poll_property; ot->invoke = WM_menu_invoke; ot->exec = data_transfer_exec; ot->check = data_transfer_check; - /* Flags.*/ + /* Flags. */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - /* Properties.*/ + /* Properties. */ prop = RNA_def_boolean(ot->srna, "use_reverse_transfer", false, @@ -886,7 +886,7 @@ void OBJECT_OT_datalayout_transfer(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - /* Properties.*/ + /* Properties. */ edit_modifier_properties(ot); /* Data type to transfer. */ diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 9c2a4fb1880..36c51bcda7c 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -105,7 +105,7 @@ #include "CLG_log.h" -/* for menu/popup icons etc etc*/ +/* For menu/popup icons etc etc. */ #include "UI_interface.h" #include "UI_resources.h" @@ -1990,7 +1990,7 @@ static int move_to_collection_invoke(bContext *C, wmOperator *op, const wmEvent * Technically we could use #wmOperator.customdata. However there is no free callback * called to an operator that exit with OPERATOR_INTERFACE to launch a menu. * - * So we are left with a memory that will necessarily leak. It's a small leak though.*/ + * So we are left with a memory that will necessarily leak. It's a small leak though. */ if (master_collection_menu == NULL) { master_collection_menu = MEM_callocN(sizeof(MoveToCollectionData), "MoveToCollectionData menu - expected eventual memleak"); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index cdf12bcb5df..e2b7a079775 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1931,7 +1931,7 @@ static void single_object_users( } /* not an especially efficient function, only added so the single user - * button can be functional.*/ + * button can be functional. */ void ED_object_single_user(Main *bmain, Scene *scene, Object *ob) { FOREACH_SCENE_OBJECT_BEGIN (scene, ob_iter) { diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 9160190764c..2fcf432bf18 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -579,7 +579,7 @@ static bool object_select_all_by_particle(bContext *C, Object *ob) CTX_DATA_BEGIN (C, Base *, base, visible_bases) { if (((base->flag & BASE_SELECTED) == 0) && ((base->flag & BASE_SELECTABLE) != 0)) { - /* loop through other particles*/ + /* Loop through other particles. */ ParticleSystem *psys; for (psys = base->object->particlesystem.first; psys; psys = psys->next) { diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 94b2f3fd566..28c7ba0a774 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -1255,16 +1255,16 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) } } else if (ob->type == OB_FONT) { - /* get from bb */ + /* Det from bounding-box. */ Curve *cu = ob->data; if (ob->runtime.bb == NULL && (centermode != ORIGIN_TO_CURSOR)) { - /* do nothing*/ + /* Do nothing. */ } else { if (centermode == ORIGIN_TO_CURSOR) { - /* done */ + /* Done. */ } else { /* extra 0.5 is the height o above line */ diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index ae6ccf8d6a7..51a9a3676e7 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -4068,7 +4068,7 @@ static int vgroup_do_remap(Object *ob, const char *name_array, wmOperator *op) bDeformGroup *def; int defbase_tot = BLI_listbase_count(&ob->defbase); - /* needs a dummy index at the start*/ + /* Needs a dummy index at the start. */ int *sort_map_update = MEM_mallocN(sizeof(int) * (defbase_tot + 1), "sort vgroups"); int *sort_map = sort_map_update + 1; @@ -4111,7 +4111,7 @@ static int vgroup_do_remap(Object *ob, const char *name_array, wmOperator *op) BKE_object_defgroup_array_get(ob->data, &dvert, &dvert_tot); - /*create as necessary*/ + /* Create as necessary. */ if (dvert) { while (dvert_tot--) { if (dvert->totweight) { @@ -4186,10 +4186,10 @@ static int vertex_group_sort_exec(bContext *C, wmOperator *op) int ret; int sort_type = RNA_enum_get(op->ptr, "sort_type"); - /*init remapping*/ + /* Init remapping. */ name_array = vgroup_init_remap(ob); - /*sort vgroup names*/ + /* Sort vgroup names. */ switch (sort_type) { case SORT_TYPE_NAME: BLI_listbase_sort(&ob->defbase, vgroup_sort_name); @@ -4199,7 +4199,7 @@ static int vertex_group_sort_exec(bContext *C, wmOperator *op) break; } - /*remap vgroup data to map to correct names*/ + /* Remap vgroup data to map to correct names. */ ret = vgroup_do_remap(ob, name_array, op); if (ret != OPERATOR_CANCELLED) { diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index accb9d9ef14..3f15d572cdd 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1456,7 +1456,7 @@ void recalc_emitter_field(Depsgraph *UNUSED(depsgraph), Object *UNUSED(ob), Part BLI_kdtree_3d_free(edit->emitter_field); totface = mesh->totface; - /*totvert=dm->getNumVerts(dm);*/ /*UNUSED*/ + // totvert = dm->getNumVerts(dm); /* UNUSED */ edit->emitter_cosnos = MEM_callocN(sizeof(float[6]) * totface, "emitter cosnos"); @@ -1564,7 +1564,7 @@ void update_world_cos(Object *ob, PTCacheEdit *edit) } static void update_velocities(PTCacheEdit *edit) { - /*TODO: get frs_sec properly */ + /* TODO: get frs_sec properly. */ float vec1[3], vec2[3], frs_sec, dfra; POINT_P; KEY_K; @@ -3003,7 +3003,7 @@ static void remove_tagged_keys(Depsgraph *depsgraph, Object *ob, ParticleSystem LOOP_TAGGED_KEYS { new_totkey--; } - /* we can't have elements with less than two keys*/ + /* We can't have elements with less than two keys. */ if (new_totkey < 2) { point->flag |= PEP_TAG; } @@ -3142,7 +3142,7 @@ static void subdivide_particle(PEData *data, int pa_index) nkey++; } } - /*tip still not copied*/ + /* Tip still not copied. */ memcpy(nkey, key, sizeof(HairKey)); memcpy(nekey, ekey, sizeof(PTCacheEditKey)); diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h index 4dc3ded9bd7..ef07d73826a 100644 --- a/source/blender/editors/physics/physics_intern.h +++ b/source/blender/editors/physics/physics_intern.h @@ -147,7 +147,7 @@ void RIGIDBODY_OT_mass_calculate(struct wmOperatorType *ot); void RIGIDBODY_OT_constraint_add(struct wmOperatorType *ot); void RIGIDBODY_OT_constraint_remove(struct wmOperatorType *ot); -/*rigidbody_world.c */ +/* rigidbody_world.c */ void RIGIDBODY_OT_world_add(struct wmOperatorType *ot); void RIGIDBODY_OT_world_remove(struct wmOperatorType *ot); void RIGIDBODY_OT_world_export(struct wmOperatorType *ot); diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index aa1a2a6b867..17aaa5aa79d 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -141,7 +141,9 @@ typedef struct OGLRender { wmWindowManager *wm; wmWindow *win; - wmTimer *timer; /* use to check if running modal or not (invoke'd or exec'd)*/ + /** Use to check if running modal or not (invoke'd or exec'd). */ + wmTimer *timer; + void **movie_ctx_arr; TaskPool *task_pool; @@ -461,7 +463,7 @@ static void screen_opengl_render_write(OGLRender *oglrender) static void UNUSED_FUNCTION(addAlphaOverFloat)(float dest[4], const float source[4]) { - /* d = s + (1-alpha_s)d*/ + /* `d = s + (1-alpha_s)d` */ float mul; mul = 1.0f - source[3]; @@ -544,7 +546,7 @@ static void gather_frames_to_render_for_adt(const OGLRender *oglrender, const An continue; } - bool found = false; /* Not interesting, we just want a starting point for the for-loop.*/ + bool found = false; /* Not interesting, we just want a starting point for the for-loop. */ int key_index = BKE_fcurve_bezt_binarysearch_index( fcu->bezt, frame_start, fcu->totvert, &found); for (; key_index < fcu->totvert; key_index++) { diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index b4cac58db1f..36492359d5c 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -227,7 +227,7 @@ static int material_slot_remove_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* Removing material slots in edit mode screws things up, see bug T21822.*/ + /* Removing material slots in edit mode screws things up, see bug T21822. */ if (ob == CTX_data_edit_object(C)) { BKE_report(op->reports, RPT_ERROR, "Unable to remove material slot in edit mode"); return OPERATOR_CANCELLED; diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 299201d3042..175efc5387b 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1461,7 +1461,7 @@ static void region_rect_recursive( } } else if (ELEM(alignment, RGN_ALIGN_VSPLIT, RGN_ALIGN_HSPLIT)) { - /* percentage subdiv*/ + /* Percentage subdiv. */ region->winrct = *remainder; if (alignment == RGN_ALIGN_HSPLIT) { diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 627a67358f2..45cf1775ccb 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -874,7 +874,7 @@ static eContextResult screen_ctx_editable_gpencil_strokes(const bContext *C, } } } - /* if not multiedit out of loop */ + /* If not multi-edit out of loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/screen/screen_draw.c b/source/blender/editors/screen/screen_draw.c index 2c45524ef94..dca464bbf22 100644 --- a/source/blender/editors/screen/screen_draw.c +++ b/source/blender/editors/screen/screen_draw.c @@ -244,7 +244,7 @@ void screen_draw_join_highlight(ScrArea *sa1, ScrArea *sa2) return; } - /* Rect of the combined areas.*/ + /* Rect of the combined areas. */ const bool vertical = SCREEN_DIR_IS_VERTICAL(dir); const rctf combined = { .xmin = vertical ? MAX2(sa1->totrct.xmin, sa2->totrct.xmin) : diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index f0e12ca60e9..159b649ec71 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2117,16 +2117,16 @@ static ScrEdge *area_findsharededge(bScreen *screen, ScrArea *area, ScrArea *sb) ScrVert *sbv3 = sb->v3; ScrVert *sbv4 = sb->v4; - if (sav1 == sbv4 && sav2 == sbv3) { /* area to right of sb = W */ + if (sav1 == sbv4 && sav2 == sbv3) { /* Area to right of sb = W. */ return BKE_screen_find_edge(screen, sav1, sav2); } - if (sav2 == sbv1 && sav3 == sbv4) { /* area to bottom of sb = N */ + if (sav2 == sbv1 && sav3 == sbv4) { /* Area to bottom of sb = N. */ return BKE_screen_find_edge(screen, sav2, sav3); } - if (sav3 == sbv2 && sav4 == sbv1) { /* area to left of sb = E */ + if (sav3 == sbv2 && sav4 == sbv1) { /* Area to left of sb = E. */ return BKE_screen_find_edge(screen, sav3, sav4); } - if (sav1 == sbv2 && sav4 == sbv3) { /* area on top of sb = S*/ + if (sav1 == sbv2 && sav4 == sbv3) { /* Area on top of sb = S. */ return BKE_screen_find_edge(screen, sav1, sav4); } @@ -5598,13 +5598,13 @@ static void SCREEN_OT_workspace_cycle(wmOperatorType *ot) /* called in spacetypes.c */ void ED_operatortypes_screen(void) { - /* generic UI stuff */ + /* Generic UI stuff. */ WM_operatortype_append(SCREEN_OT_actionzone); WM_operatortype_append(SCREEN_OT_repeat_last); WM_operatortype_append(SCREEN_OT_repeat_history); WM_operatortype_append(SCREEN_OT_redo_last); - /* screen tools */ + /* Screen tools. */ WM_operatortype_append(SCREEN_OT_area_move); WM_operatortype_append(SCREEN_OT_area_split); WM_operatortype_append(SCREEN_OT_area_join); @@ -5631,7 +5631,7 @@ void ED_operatortypes_screen(void) WM_operatortype_append(SCREEN_OT_space_context_cycle); WM_operatortype_append(SCREEN_OT_workspace_cycle); - /*frame changes*/ + /* Frame changes. */ WM_operatortype_append(SCREEN_OT_frame_offset); WM_operatortype_append(SCREEN_OT_frame_jump); WM_operatortype_append(SCREEN_OT_keyframe_jump); @@ -5641,7 +5641,7 @@ void ED_operatortypes_screen(void) WM_operatortype_append(SCREEN_OT_animation_play); WM_operatortype_append(SCREEN_OT_animation_cancel); - /* new/delete */ + /* New/delete. */ WM_operatortype_append(SCREEN_OT_new); WM_operatortype_append(SCREEN_OT_delete); } diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index fc08b7cd1b4..88140460f5b 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -391,7 +391,7 @@ typedef struct ProjPaintState { float *cavities; #ifndef PROJ_DEBUG_NOSEAMBLEED - /** store info about faces, if they are initialized etc*/ + /** Store info about faces, if they are initialized etc. */ ushort *faceSeamFlags; /** save the winding of the face in uv space, * helps as an extra validation step for seam detection. */ @@ -1073,7 +1073,7 @@ static bool pixel_bounds_uv(const float uv_quad[4][2], bounds_px->xmax = (int)(ibuf_x * max_uv[0]) + 1; bounds_px->ymax = (int)(ibuf_y * max_uv[1]) + 1; - /*printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]);*/ + // printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]); /* face uses no UV area when quantized to pixels? */ return (bounds_px->xmin == bounds_px->xmax || bounds_px->ymin == bounds_px->ymax) ? false : true; @@ -1103,7 +1103,7 @@ static bool pixel_bounds_array( bounds_px->xmax = (int)(ibuf_x * max_uv[0]) + 1; bounds_px->ymax = (int)(ibuf_y * max_uv[1]) + 1; - /*printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]);*/ + // printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]); /* face uses no UV area when quantized to pixels? */ return (bounds_px->xmin == bounds_px->xmax || bounds_px->ymin == bounds_px->ymax) ? false : true; @@ -1774,7 +1774,7 @@ static float project_paint_uvpixel_mask(const ProjPaintState *ps, } if (angle_cos <= ps->normal_angle__cos) { - /* outsize the normal limit*/ + /* Outsize the normal limit. */ return 0.0f; } if (angle_cos < ps->normal_angle_inner__cos) { @@ -1878,7 +1878,7 @@ static ProjPixel *project_paint_uvpixel_init(const ProjPaintState *ps, int x_tile, y_tile; int x_round, y_round; int tile_offset; - /* volatile is important here to ensure pending check is not optimized away by compiler*/ + /* Volatile is important here to ensure pending check is not optimized away by compiler. */ volatile int tile_index; ProjPaintImage *projima = tinf->pjima; @@ -2063,7 +2063,7 @@ static bool line_clip_rect2f(const rctf *cliprect, return false; } - /* this is a single point (or close to)*/ + /* This is a single point (or close to). */ if (fabsf(l1[0] - l2[0]) < PROJ_PIXEL_TOLERANCE) { if (BLI_rctf_isect_pt_v(rect, l1)) { copy_v2_v2(l1_clip, l1); @@ -2090,7 +2090,7 @@ static bool line_clip_rect2f(const rctf *cliprect, return false; } - /* this is a single point (or close to)*/ + /* This is a single point (or close to). */ if (fabsf(l1[1] - l2[1]) < PROJ_PIXEL_TOLERANCE) { if (BLI_rctf_isect_pt_v(rect, l1)) { copy_v2_v2(l1_clip, l1); @@ -2678,7 +2678,7 @@ static void project_bucket_clip_face(const bool is_ortho, /* calc center */ float cent[2] = {0.0f, 0.0f}; - /*float up[2] = {0.0f, 1.0f};*/ + // float up[2] = {0.0f, 1.0f}; bool doubles; (*tot) = 0; @@ -3065,7 +3065,7 @@ static void project_paint_face_init(const ProjPaintState *ps, v2coSS = ps->screenCoords[lt_vtri[1]]; v3coSS = ps->screenCoords[lt_vtri[2]]; - /* This function gives is a concave polyline in UV space from the clipped tri*/ + /* This function gives is a concave polyline in UV space from the clipped tri. */ project_bucket_clip_face(is_ortho, is_flip_object, clip_rect, @@ -4430,7 +4430,7 @@ static void project_paint_prepare_all_faces(ProjPaintState *ps, } } - /* build an array of images we use*/ + /* Build an array of images we use. */ if (ps->is_shared_user == false) { project_paint_build_proj_ima(ps, arena, &used_images); } @@ -4770,7 +4770,7 @@ static bool project_bucket_iter_next(ProjPaintState *ps, BLI_assert(bucket_y >= ps->bucketMin[1] && bucket_y < ps->bucketMax[1]); if (bucket_x >= ps->bucketMin[0] && bucket_x < ps->bucketMax[0]) { - /* use bucket_bounds for project_bucket_isect_circle and project_bucket_init*/ + /* Use bucket_bounds for #project_bucket_isect_circle and #project_bucket_init. */ project_bucket_bounds(ps, bucket_x, bucket_y, bucket_bounds); if ((ps->source != PROJ_SRC_VIEW) || @@ -5356,7 +5356,7 @@ static void do_projectpaint_thread(TaskPool *__restrict UNUSED(pool), void *ph_v dist_sq = len_squared_v2v2(projPixel->projCoSS, pos); - /*if (dist < radius) {*/ /* correct but uses a sqrtf */ + /* Faster alternative to `dist < radius` without a #sqrtf. */ if (dist_sq <= brush_radius_sq) { dist = sqrtf(dist_sq); @@ -5814,7 +5814,7 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps, int ps->is_maskbrush = (brush->mask_mtex.tex) ? true : false; } else { - /* brush may be NULL*/ + /* Brush may be NULL. */ ps->do_masking = false; ps->is_texbrush = false; ps->is_maskbrush = false; diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index fed89e02e8f..e2b21145c2d 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -62,7 +62,7 @@ /* Brush operators */ static int brush_add_exec(bContext *C, wmOperator *UNUSED(op)) { - /*int type = RNA_enum_get(op->ptr, "type");*/ + // int type = RNA_enum_get(op->ptr, "type"); Paint *paint = BKE_paint_get_active_from_context(C); Brush *br = BKE_paint_brush(paint); Main *bmain = CTX_data_main(C); @@ -97,7 +97,7 @@ static void BRUSH_OT_add(wmOperatorType *ot) static int brush_add_gpencil_exec(bContext *C, wmOperator *UNUSED(op)) { - /*int type = RNA_enum_get(op->ptr, "type");*/ + // int type = RNA_enum_get(op->ptr, "type"); ToolSettings *ts = CTX_data_tool_settings(C); Paint *paint = &ts->gp_paint->paint; Brush *br = BKE_paint_brush(paint); @@ -1385,7 +1385,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf) keymap = WM_keymap_ensure(keyconf, "Weight Paint", 0, 0); keymap->poll = weight_paint_mode_poll; - /*Weight paint's Vertex Selection Mode */ + /* Weight paint's Vertex Selection Mode. */ keymap = WM_keymap_ensure(keyconf, "Paint Vertex Selection (Weight, Vertex)", 0, 0); keymap->poll = vert_paint_poll; diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 0a5f1975361..fe36d62b832 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2750,11 +2750,11 @@ static bool vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const f * if not we can skip face map trickiness */ if (vertex_paint_use_fast_update_check(ob)) { vpd->use_fast_update = true; - /* printf("Fast update!\n");*/ + // printf("Fast update!\n"); } else { vpd->use_fast_update = false; - /* printf("No fast update!\n");*/ + // printf("No fast update!\n"); } /* to keep tracked of modified loops for shared vertex color blending */ diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index b39fbe5ba1a..43704c73faf 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -623,7 +623,7 @@ typedef struct SculptUndoNode { SculptUndoType type; - char idname[MAX_ID_NAME]; /* name instead of pointer*/ + char idname[MAX_ID_NAME]; /* Name instead of pointer. */ void *node; /* only during push, not valid afterwards! */ float (*co)[3]; diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c index 2825639bb3d..771e0e1e47b 100644 --- a/source/blender/editors/sculpt_paint/sculpt_uv.c +++ b/source/blender/editors/sculpt_paint/sculpt_uv.c @@ -92,7 +92,7 @@ typedef struct UVInitialStroke { /* Initial Selection,for grab brushes for instance */ UVInitialStrokeElement *initialSelection; - /* total initially selected UVs*/ + /* Total initially selected UV's. */ int totalInitialSelected; /* initial mouse coordinates */ @@ -505,7 +505,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm bool do_island_optimization = !(ts->uv_sculpt_settings & UV_SCULPT_ALL_ISLANDS); int island_index = 0; - /* Holds, for each UvElement in elementMap, a pointer to its unique uv.*/ + /* Holds, for each UvElement in elementMap, a pointer to its unique UV. */ int *uniqueUv; data->tool = (RNA_enum_get(op->ptr, "mode") == BRUSH_STROKE_SMOOTH) ? UV_SCULPT_TOOL_RELAX : @@ -603,7 +603,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm data->uv[counter].flag = 0; data->uv[counter].uv = luv->uv; } - /* pointer arithmetic to the rescue, as always :)*/ + /* Pointer arithmetic to the rescue, as always :). */ uniqueUv[element - data->elementMap->buf] = counter; } } diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index eea895297f2..ae9d5445e1d 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -163,7 +163,7 @@ void ACTION_OT_markers_make_local(wmOperatorType *ot) /* *************************** Calculate Range ************************** */ -/* Get the min/max keyframes*/ +/* Get the min/max keyframes. */ static bool get_keyframe_extents(bAnimContext *ac, float *min, float *max, const short onlySel) { ListBase anim_data = {NULL, NULL}; diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 2ab109c738d..a51d9086dea 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -1840,7 +1840,7 @@ static int actkeys_clickselect_exec(bContext *C, wmOperator *op) mval[0] = RNA_int_get(op->ptr, "mouse_x"); mval[1] = RNA_int_get(op->ptr, "mouse_y"); - /* select keyframe(s) based upon mouse position*/ + /* Select keyframe(s) based upon mouse position. */ ret_value = mouse_action_keys( &ac, mval, selectmode, deselect_all, column, channel, wait_to_deselect_others); diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 8772af1d98b..222d25b7d75 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -1273,7 +1273,7 @@ ID *buttons_context_id_path(const bContext *C) for (int i = path->len - 1; i >= 0; i--) { PointerRNA *ptr = &path->ptr[i]; - /* pin particle settings instead of system, since only settings are an idblock*/ + /* Pin particle settings instead of system, since only settings are an idblock. */ if (sbuts->mainb == BCONTEXT_PARTICLE && sbuts->flag & SB_PIN_CONTEXT) { if (ptr->type == &RNA_ParticleSystem && ptr->data) { ParticleSystem *psys = ptr->data; @@ -1281,7 +1281,7 @@ ID *buttons_context_id_path(const bContext *C) } } - /* There is no valid image ID panel, Image Empty objects need this workaround.*/ + /* There is no valid image ID panel, Image Empty objects need this workaround. */ if (sbuts->mainb == BCONTEXT_DATA && sbuts->flag & SB_PIN_CONTEXT) { if (ptr->type == &RNA_Image && ptr->data) { continue; diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index 05595e0b393..9b4b020b276 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -747,7 +747,7 @@ static int console_clear_exec(bContext *C, wmOperator *op) const bool scrollback = RNA_boolean_get(op->ptr, "scrollback"); const bool history = RNA_boolean_get(op->ptr, "history"); - /*ConsoleLine *ci = */ console_history_verify(C); + /* ConsoleLine *ci = */ console_history_verify(C); if (scrollback) { /* Last item in history. */ while (sc->scrollback.first) { diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c index afa85d183d8..7032d55b331 100644 --- a/source/blender/editors/space_file/file_panels.c +++ b/source/blender/editors/space_file/file_panels.c @@ -72,7 +72,7 @@ static void file_panel_operator(const bContext *C, Panel *panel) UI_block_func_set(uiLayoutGetBlock(panel->layout), file_draw_check_cb, NULL, NULL); - /* Hack: temporary hide.*/ + /* Hack: temporary hide. */ const char *hide[] = {"filepath", "files", "directory", "filename"}; for (int i = 0; i < ARRAY_SIZE(hide); i++) { PropertyRNA *prop = RNA_struct_find_property(op->ptr, hide[i]); @@ -84,7 +84,7 @@ static void file_panel_operator(const bContext *C, Panel *panel) uiTemplateOperatorPropertyButs( C, panel->layout, op, UI_BUT_LABEL_ALIGN_NONE, UI_TEMPLATE_OP_PROPS_SHOW_EMPTY); - /* Hack: temporary hide.*/ + /* Hack: temporary hide. */ for (int i = 0; i < ARRAY_SIZE(hide); i++) { PropertyRNA *prop = RNA_struct_find_property(op->ptr, hide[i]); if (prop) { diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index dc237c1340a..0d2a436902a 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -1251,7 +1251,7 @@ static void graph_draw_driver_debug(bAnimContext *ac, ID *id, FCurve *fcu) float x = driver->curval; float y = fcu->curval * unitfac; - /* only draw indicators if the point is in range*/ + /* Only draw indicators if the point is in range. */ if (x >= v2d->cur.xmin) { float co[2]; diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index a2e812a4ed1..be577e9ab13 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -3007,7 +3007,7 @@ static int graph_driver_delete_invalid_exec(bContext *C, wmOperator *op) WM_report(RPT_INFO, "No drivers deleted"); } - /* Successful or not?*/ + /* Successful or not? */ if (!ok) { return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_graph/graph_slider_ops.c b/source/blender/editors/space_graph/graph_slider_ops.c index 4174e1c63ae..10629caa8b0 100644 --- a/source/blender/editors/space_graph/graph_slider_ops.c +++ b/source/blender/editors/space_graph/graph_slider_ops.c @@ -50,7 +50,7 @@ /* ******************** GRAPH SLIDER OPERATORS ************************* */ /* This file contains a collection of operators to modify keyframes in the graph editor. All * operators are modal and use a slider that allows the user to define a percentage to modify the - * operator.*/ + * operator. */ /* ******************** Decimate Keyframes Operator ************************* */ @@ -91,7 +91,7 @@ typedef struct tDecimateGraphOp { /** A 0-1 value for determining how much we should decimate. */ PropertyRNA *percentage_prop; - /** The original bezt curve data (used for restoring fcurves).*/ + /** The original bezt curve data (used for restoring fcurves). */ ListBase bezt_arr_list; NumInput num; @@ -318,7 +318,7 @@ static int graphkeys_decimate_modal(bContext *C, wmOperator *op, const wmEvent * /* This assumes that we are in "DECIM_RATIO" mode. This is because the error margin is very hard * and finicky to control with this modal mouse grab method. Therefore, it is expected that the * error margin mode is not adjusted by the modal operator but instead tweaked via the redo - * panel.*/ + * panel. */ tDecimateGraphOp *dgo = op->customdata; const bool has_numinput = hasNumInput(&dgo->num); diff --git a/source/blender/editors/space_graph/graph_view.c b/source/blender/editors/space_graph/graph_view.c index cde0dab3503..ca14f7c5942 100644 --- a/source/blender/editors/space_graph/graph_view.c +++ b/source/blender/editors/space_graph/graph_view.c @@ -137,7 +137,7 @@ void get_graph_keyframe_extents(bAnimContext *ac, } } - /* Ensure that the extents are not too extreme that view implodes...*/ + /* Ensure that the extents are not too extreme that view implodes. */ if (foundBounds) { if ((xmin && xmax) && (fabsf(*xmax - *xmin) < 0.001f)) { *xmin -= 0.0005f; @@ -269,7 +269,7 @@ static int graphkeys_viewall(bContext *C, BLI_rctf_scale(&cur_new, 1.1f); /* Take regions into account, that could block the view. - * Marker region is supposed to be larger than the scroll-bar, so prioritize it.*/ + * Marker region is supposed to be larger than the scroll-bar, so prioritize it. */ float pad_top = UI_TIME_SCRUB_MARGIN_Y; float pad_bottom = BLI_listbase_is_empty(ED_context_get_markers(C)) ? V2D_SCROLL_HANDLE_HEIGHT : UI_MARKER_MARGIN_Y; diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 3ebf58a2119..32496cb8f1f 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -588,7 +588,7 @@ static void graph_listener(const wmSpaceTypeListenerParams *params) ED_area_tag_refresh(area); break; case ND_TRANSFORM: - break; /*do nothing*/ + break; /* Do nothing. */ default: /* just redrawing the view will do */ ED_area_tag_redraw(area); diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 9e2bd1448b2..193c35d10a2 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -3870,7 +3870,7 @@ static void tile_fill_init(PointerRNA *ptr, Image *ima, ImageTile *tile) /* Acquire ibuf to get the default values. * If the specified tile has no ibuf, try acquiring the main tile instead - * (unless the specified tile already was the main tile).*/ + * (unless the specified tile already was the main tile). */ ImBuf *ibuf = BKE_image_acquire_ibuf(ima, &iuser, NULL); if (ibuf == NULL && (tile != NULL) && (tile->tile_number != 1001)) { ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL); diff --git a/source/blender/editors/space_image/image_undo.c b/source/blender/editors/space_image/image_undo.c index 09e30298e79..082f66b57af 100644 --- a/source/blender/editors/space_image/image_undo.c +++ b/source/blender/editors/space_image/image_undo.c @@ -1041,7 +1041,7 @@ ListBase *ED_image_paint_tile_list_get(void) return &us->paint_tiles; } -/* restore painting image to previous state. Used for anchored and drag-dot style brushes*/ +/* Restore painting image to previous state. Used for anchored and drag-dot style brushes. */ void ED_image_undo_restore(UndoStep *us) { ListBase *paint_tiles = &((ImageUndoStep *)us)->paint_tiles; diff --git a/source/blender/editors/space_info/info_report.c b/source/blender/editors/space_info/info_report.c index 7dd8382c8ef..a3da50709df 100644 --- a/source/blender/editors/space_info/info_report.c +++ b/source/blender/editors/space_info/info_report.c @@ -360,7 +360,7 @@ void INFO_OT_report_delete(wmOperatorType *ot) ot->exec = report_delete_exec; /* flags */ - /*ot->flag = OPTYPE_REGISTER;*/ + // ot->flag = OPTYPE_REGISTER; /* properties */ } @@ -404,7 +404,7 @@ void INFO_OT_report_copy(wmOperatorType *ot) ot->exec = report_copy_exec; /* flags */ - /*ot->flag = OPTYPE_REGISTER;*/ + // ot->flag = OPTYPE_REGISTER; /* properties */ } diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc index 72fe786ad83..1c7ee9e622f 100644 --- a/source/blender/editors/space_node/drawnode.cc +++ b/source/blender/editors/space_node/drawnode.cc @@ -217,7 +217,7 @@ static void node_buts_texture(uiLayout *layout, bContext *UNUSED(C), PointerRNA uiItemR(layout, ptr, "texture", DEFAULT_FLAGS, "", ICON_NONE); if (multi) { - /* Number Drawing not optimal here, better have a list*/ + /* Number Drawing not optimal here, better have a list. */ uiItemR(layout, ptr, "node_output", DEFAULT_FLAGS, "", ICON_NONE); } } @@ -1833,9 +1833,11 @@ static void node_composit_buts_chroma_matte(uiLayout *layout, bContext *UNUSED(C uiItemR(col, ptr, "threshold", DEFAULT_FLAGS, nullptr, ICON_NONE); col = uiLayoutColumn(layout, true); - /*uiItemR(col, ptr, "lift", UI_ITEM_R_SLIDER, nullptr, ICON_NONE); Removed for now */ + /* Removed for now. */ + // uiItemR(col, ptr, "lift", UI_ITEM_R_SLIDER, nullptr, ICON_NONE); uiItemR(col, ptr, "gain", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, nullptr, ICON_NONE); - /*uiItemR(col, ptr, "shadow_adjust", UI_ITEM_R_SLIDER, nullptr, ICON_NONE); Removed for now*/ + /* Removed for now. */ + // uiItemR(col, ptr, "shadow_adjust", UI_ITEM_R_SLIDER, nullptr, ICON_NONE); } static void node_composit_buts_color_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) @@ -3528,7 +3530,7 @@ static void std_node_socket_draw( bNode *node = (bNode *)node_ptr->data; bNodeSocket *sock = (bNodeSocket *)ptr->data; int type = sock->typeinfo->type; - /*int subtype = sock->typeinfo->subtype;*/ + // int subtype = sock->typeinfo->subtype; /* XXX not nice, eventually give this node its own socket type ... */ if (node->type == CMP_NODE_OUTPUT_FILE) { diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc index b5ef250f5a9..4bacf319f7c 100644 --- a/source/blender/editors/space_node/node_edit.cc +++ b/source/blender/editors/space_node/node_edit.cc @@ -1130,7 +1130,7 @@ static bool cursor_isect_multi_input_socket(const float cursor[2], const bNodeSo { const float node_socket_height = node_socket_calculate_height(socket); rctf multi_socket_rect; - /*.xmax = socket->locx + NODE_SOCKSIZE * 5.5f + /* `.xmax = socket->locx + NODE_SOCKSIZE * 5.5f` * would be the same behavior as for regular sockets. * But keep it smaller because for multi-input socket you * sometimes want to drag the link to the other side, if you may @@ -2310,7 +2310,7 @@ static int ntree_socket_add_exec(bContext *C, wmOperator *op) sock = ntreeInsertSocketInterface( ntree, in_out, active_sock->idname, active_sock->next, active_sock->name); /* XXX this only works for actual sockets, not interface templates! */ - /*nodeSocketCopyValue(sock, &ntree_ptr, active_sock, &ntree_ptr);*/ + // nodeSocketCopyValue(sock, &ntree_ptr, active_sock, &ntree_ptr); } else { /* XXX TODO define default socket type for a tree! */ diff --git a/source/blender/editors/space_node/node_group.cc b/source/blender/editors/space_node/node_group.cc index 851d386ad0d..d7541d8f512 100644 --- a/source/blender/editors/space_node/node_group.cc +++ b/source/blender/editors/space_node/node_group.cc @@ -926,7 +926,7 @@ static void node_group_make_insert_selected(const bContext *C, bNodeTree *ntree, } } - /* expose all unlinked sockets too but only the visible ones*/ + /* Expose all unlinked sockets too but only the visible ones. */ if (expose_visible) { LISTBASE_FOREACH (bNode *, node, &ngroup->nodes) { if (node_group_make_use_node(node, gnode)) { diff --git a/source/blender/editors/space_outliner/tree/tree_display_libraries.cc b/source/blender/editors/space_outliner/tree/tree_display_libraries.cc index 91b690d35fa..c6b700318dd 100644 --- a/source/blender/editors/space_outliner/tree/tree_display_libraries.cc +++ b/source/blender/editors/space_outliner/tree/tree_display_libraries.cc @@ -138,8 +138,8 @@ TreeElement *TreeDisplayLibraries::add_library_contents(Main &mainvar, } } - /* We always want to create an entry for libraries, even if/when we have no more IDs from - * them. This invalid state is important to show to user as well.*/ + /* We always want to create an entry for libraries, even if/when we have no more IDs from them. + * This invalid state is important to show to user as well. */ if (id != nullptr || is_library) { if (!tenlib) { /* Create library tree element on demand, depending if there are any data-blocks. */ diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c index 4ce0e454df8..897af9ae931 100644 --- a/source/blender/editors/space_script/space_script.c +++ b/source/blender/editors/space_script/space_script.c @@ -81,7 +81,7 @@ static void script_free(SpaceLink *sl) SpaceScript *sscript = (SpaceScript *)sl; #ifdef WITH_PYTHON - /*free buttons references*/ + /* Free buttons references. */ if (sscript->but_refs) { sscript->but_refs = NULL; } diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 17831c95575..1d8bc427212 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -938,7 +938,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *region, rcti *scroll, rcti *b hlstart = barstart + barheight; } else if (lhlend > st->top && lhlstart < st->top && hlstart > barstart) { - /*fill out start */ + /* Fill out start. */ hlstart = barstart; } diff --git a/source/blender/editors/space_text/text_format_pov.c b/source/blender/editors/space_text/text_format_pov.c index a68632c0d56..1200dda7533 100644 --- a/source/blender/editors/space_text/text_format_pov.c +++ b/source/blender/editors/space_text/text_format_pov.c @@ -644,7 +644,7 @@ static int txtfmt_pov_find_specialvar(const char *string) } else if (STR_LITERAL_STARTSWITH(string, "ratio", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "open", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "ior", len)) { i = len; - /* Light Types and options*/ + /* Light Types and options. */ } else if (STR_LITERAL_STARTSWITH(string, "area_light", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "looks_like", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "fade_power", len)) { i = len; @@ -654,7 +654,7 @@ static int txtfmt_pov_find_specialvar(const char *string) } else if (STR_LITERAL_STARTSWITH(string, "point_at", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "falloff", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "radius", len)) { i = len; - /* Camera Types and options*/ + /* Camera Types and options. */ } else if (STR_LITERAL_STARTSWITH(string, "omni_directional_stereo", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "lambert_cylindrical", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "miller_cylindrical", len)) { i = len; diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 9ec759ce4ae..6ca89250cd7 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -2782,8 +2782,7 @@ void TEXT_OT_scroll(wmOperatorType *ot) /* identifiers */ ot->name = "Scroll"; /* don't really see the difference between this and - * scroll_bar. Both do basically the same thing (aside - * from keymaps).*/ + * scroll_bar. Both do basically the same thing (aside from key-maps). */ ot->idname = "TEXT_OT_scroll"; /* api callbacks */ @@ -2889,8 +2888,7 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot) /* identifiers */ ot->name = "Scrollbar"; /* don't really see the difference between this and - * scroll. Both do basically the same thing (aside - * from keymaps).*/ + * scroll. Both do basically the same thing (aside from key-maps). */ ot->idname = "TEXT_OT_scroll_bar"; /* api callbacks */ diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 02ed9f6d791..0e5df3a0cdd 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -1833,7 +1833,7 @@ static bool bone_mouse_select_menu(bContext *C, continue; } /* We can hit a bone multiple times, so make sure we are not adding an already included bone - * to the list.*/ + * to the list. */ const bool is_duplicate_bone = BLI_gset_haskey(added_bones, bone_ptr); if (!is_duplicate_bone) { diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 72c62321e88..6dec3cc818a 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -155,7 +155,7 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op)) /* Get location of grid point in pose space. */ BKE_armature_loc_pose_to_bone(pchan_eval, vec, vec); - /* adjust location on the original pchan*/ + /* Adjust location on the original pchan. */ bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, pchan_eval->name); if ((pchan->protectflag & OB_LOCK_LOCX) == 0) { pchan->loc[0] = vec[0]; diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index e17acd2f9c8..a2d50c43bd2 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -85,7 +85,7 @@ struct SmoothView3DState { }; struct SmoothView3DStore { - /* source*/ + /* Source. */ struct SmoothView3DState src; /* source */ struct SmoothView3DState dst; /* destination */ struct SmoothView3DState org; /* original */ diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 2b26ef3b3e4..2df0d86d02b 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -423,7 +423,7 @@ typedef struct TransCenterData { * (typically in transform_conversion.c). */ typedef struct TransCustomDataContainer { - /** Owned by the mode (grab, scale, bend... ).*/ + /** Owned by the mode (grab, scale, bend... ). */ union { TransCustomData mode, first_elem; }; diff --git a/source/blender/editors/transform/transform_convert_action.c b/source/blender/editors/transform/transform_convert_action.c index 3c302aac954..deb64ca2892 100644 --- a/source/blender/editors/transform/transform_convert_action.c +++ b/source/blender/editors/transform/transform_convert_action.c @@ -191,7 +191,7 @@ static TransData *ActionFCurveToTransData(TransData *td, td->flag |= TD_SELECTED; } - /*set flags to move handles as necessary*/ + /* Set flags to move handles as necessary. */ td->flag |= TD_MOVEHANDLE1 | TD_MOVEHANDLE2; td2d->h1 = bezt->vec[0]; td2d->h2 = bezt->vec[2]; diff --git a/source/blender/editors/transform/transform_convert_gpencil.c b/source/blender/editors/transform/transform_convert_gpencil.c index 4932a5f8d23..f7b78b10868 100644 --- a/source/blender/editors/transform/transform_convert_gpencil.c +++ b/source/blender/editors/transform/transform_convert_gpencil.c @@ -176,7 +176,7 @@ static void createTransGPencil_curves(bContext *C, } } - /* If not multiedit out of loop. */ + /* If not multi-edit out of loop. */ if (!is_multiedit) { break; } @@ -382,7 +382,7 @@ static void createTransGPencil_curves(bContext *C, } } - /* If not multiedit out of loop. */ + /* If not multi-edit out of loop. */ if (!is_multiedit) { break; } @@ -470,7 +470,7 @@ static void createTransGPencil_strokes(bContext *C, } } } - /* If not multiedit out of loop. */ + /* If not multi-edit out of loop. */ if (!is_multiedit) { break; } @@ -674,7 +674,7 @@ static void createTransGPencil_strokes(bContext *C, } } } - /* if not multiedit out of loop */ + /* If not multi-edit out of loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c index 7a780df0def..080a19cce1f 100644 --- a/source/blender/editors/transform/transform_gizmo_3d.c +++ b/source/blender/editors/transform/transform_gizmo_3d.c @@ -521,7 +521,7 @@ static void protectflag_to_drawflags_pchan(RegionView3D *rv3d, } } -/* for editmode*/ +/* For editmode. */ static void protectflag_to_drawflags_ebone(RegionView3D *rv3d, const EditBone *ebo) { if (ebo->flag & BONE_EDITMODE_LOCKED) { diff --git a/source/blender/editors/transform/transform_mode_edge_slide.c b/source/blender/editors/transform/transform_mode_edge_slide.c index 93d58b8dbe4..6134c8a98f5 100644 --- a/source/blender/editors/transform/transform_mode_edge_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_slide.c @@ -375,8 +375,8 @@ static void calcEdgeSlide_mval_range(TransInfo *t, UNUSED_VARS_NDEBUG(sv_table); /* silence warning */ BLI_assert(i == sv_table[BM_elem_index_get(v)]); - /* search cross edges for visible edge to the mouse cursor, - * then use the shared vertex to calculate screen vector*/ + /* Search cross edges for visible edge to the mouse cursor, + * then use the shared vertex to calculate screen vector. */ BM_ITER_ELEM (e, &iter_other, v, BM_EDGES_OF_VERT) { /* screen-space coords */ float sco_a[3], sco_b[3]; @@ -540,7 +540,7 @@ static EdgeSlideData *createEdgeSlideVerts_double_side(TransInfo *t, TransDataCo sld->curr_sv_index = 0; - /*ensure valid selection*/ + /* Ensure valid selection. */ BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) { if (BM_elem_flag_test(v, BM_ELEM_SELECT)) { BMIter iter2; @@ -548,7 +548,7 @@ static EdgeSlideData *createEdgeSlideVerts_double_side(TransInfo *t, TransDataCo BM_ITER_ELEM (e, &iter2, v, BM_EDGES_OF_VERT) { if (BM_elem_flag_test(e, BM_ELEM_SELECT)) { /* BMESH_TODO: this is probably very evil, - * set v->e to a selected edge*/ + * set `v->e` to a selected edge. */ v->e = e; numsel++; @@ -640,10 +640,10 @@ static EdgeSlideData *createEdgeSlideVerts_double_side(TransInfo *t, TransDataCo v_first = v; - /*walk along the edge loop*/ + /* Walk along the edge loop. */ e = v->e; - /*first, rewind*/ + /* First, rewind. */ do { e = get_other_edge(v, e); if (!e) { @@ -709,7 +709,7 @@ static EdgeSlideData *createEdgeSlideVerts_double_side(TransInfo *t, TransDataCo STACK_PUSH_RET_PTR(sv_array)) : \ (&sv_array[sv_table[BM_elem_index_get(v)]])) - /*iterate over the loop*/ + /* Iterate over the loop. */ v_first = v; do { bool l_a_ok_prev; diff --git a/source/blender/editors/util/ed_transverts.c b/source/blender/editors/util/ed_transverts.c index c1d0dcdb095..b4a93eb996c 100644 --- a/source/blender/editors/util/ed_transverts.c +++ b/source/blender/editors/util/ed_transverts.c @@ -182,8 +182,8 @@ static void set_mapped_co(void *vuserdata, if (BM_elem_index_get(eve) != TM_INDEX_SKIP) { tv = &tv[BM_elem_index_get(eve)]; - /* be clever, get the closest vertex to the original, - * behaves most logically when the mirror modifier is used for eg T33051*/ + /* Be clever, get the closest vertex to the original, + * behaves most logically when the mirror modifier is used for eg T33051. */ if ((tv->flag & TX_VERT_USE_MAPLOC) == 0) { /* first time */ copy_v3_v3(tv->maploc, co); diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index e18bbe0d7c2..2f88e50492f 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -608,7 +608,7 @@ static void uv_weld_align(bContext *C, eUVWeldAlign tool) /* Projection of point (x, y) over line (x1, y1, x2, y2) along X axis: * new_y = (y2 - y1) / (x2 - x1) * (x - x1) + y1 * Maybe this should be a BLI func? Or is it already existing? - * Could use interp_v2_v2v2, but not sure it's worth it here...*/ + * Could use interp_v2_v2v2, but not sure it's worth it here. */ if (tool_local == UV_STRAIGHTEN_X) { luv->uv[0] = a * (luv->uv[1] - uv_start[1]) + uv_start[0]; } @@ -1187,15 +1187,15 @@ static bool uv_snap_uvs_to_adjacent_unselected(Scene *scene, Object *obedit) } BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) { - if (BM_elem_flag_test(f, BM_ELEM_TAG)) { /* face: visible */ + if (BM_elem_flag_test(f, BM_ELEM_TAG)) { /* Face: visible. */ BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) { - if (BM_elem_flag_test(l, BM_ELEM_TAG)) { /* loop: selected*/ + if (BM_elem_flag_test(l, BM_ELEM_TAG)) { /* Loop: selected. */ float uv[2] = {0.0f, 0.0f}; int uv_tot = 0; BM_ITER_ELEM (lsub, &lsubiter, l->v, BM_LOOPS_OF_VERT) { - if (BM_elem_flag_test(lsub->f, BM_ELEM_TAG) && /* face: visible. */ - !BM_elem_flag_test(lsub, BM_ELEM_TAG)) /* loop: unselected. */ + if (BM_elem_flag_test(lsub->f, BM_ELEM_TAG) && /* Face: visible. */ + !BM_elem_flag_test(lsub, BM_ELEM_TAG)) /* Loop: unselected. */ { luv = BM_ELEM_CD_GET_VOID_P(lsub, cd_loop_uv_offset); add_v2_v2(uv, luv->uv); diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index 7d82884760c..eb4ca2e13b2 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -82,10 +82,10 @@ typedef struct PVert { struct PVert *nextlink; union PVertUnion { - PHashKey key; /* construct */ - int id; /* abf/lscm matrix index */ - float distortion; /* area smoothing */ - HeapNode *heaplink; /* edge collapsing */ + PHashKey key; /* Construct. */ + int id; /* ABF/LSCM matrix index. */ + float distortion; /* Area smoothing. */ + HeapNode *heaplink; /* Edge collapsing. */ } u; struct PEdge *edge; @@ -99,10 +99,10 @@ typedef struct PEdge { struct PEdge *nextlink; union PEdgeUnion { - PHashKey key; /* construct */ - int id; /* abf matrix index */ - HeapNode *heaplink; /* fill holes */ - struct PEdge *nextcollapse; /* simplification */ + PHashKey key; /* Construct. */ + int id; /* ABF matrix index. */ + HeapNode *heaplink; /* Fill holes. */ + struct PEdge *nextcollapse; /* Simplification. */ } u; struct PVert *vert; @@ -118,10 +118,10 @@ typedef struct PFace { struct PFace *nextlink; union PFaceUnion { - PHashKey key; /* construct */ - int chart; /* construct splitting*/ - float area3d; /* stretch */ - int id; /* abf matrix index */ + PHashKey key; /* Construct. */ + int chart; /* Construct splitting. */ + float area3d; /* Stretch. */ + int id; /* ABF matrix index. */ } u; struct PEdge *edge; diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 0918717e051..71656784947 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -76,7 +76,7 @@ typedef struct StitchPreviewer { float *preview_polys; /* uvs per polygon. */ uint *uvs_per_polygon; - /*number of preview polygons */ + /* Number of preview polygons. */ uint num_polys; /* preview data. These will be either the previewed vertices or edges * depending on stitch mode settings */ @@ -1817,7 +1817,7 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), void /* Closing line */ GPU_vertbuf_attr_set(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index]); - /* j = uvs_per_polygon[i] - 1*/ + /* `j = uvs_per_polygon[i] - 1` */ GPU_vertbuf_attr_set( vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + j * 2]); @@ -1979,7 +1979,7 @@ static StitchState *stitch_init(bContext *C, counter++; state->uvs[counter] = element; } - /* pointer arithmetic to the rescue, as always :)*/ + /* Pointer arithmetic to the rescue, as always :). */ map[element - state->element_map->buf] = counter; } } diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 87ae112a237..ae02097707c 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -498,7 +498,7 @@ static ParamHandle *construct_param_handle_subsurfed(const Scene *scene, /* pointers to modifier data for unwrap control */ ModifierData *md; SubsurfModifierData *smd_real; - /* modifier initialization data, will control what type of subdivision will happen*/ + /* Modifier initialization data, will control what type of subdivision will happen. */ SubsurfModifierData smd = {{NULL}}; /* Used to hold subsurfed Mesh */ DerivedMesh *derivedMesh, *initialDerived; @@ -509,7 +509,7 @@ static ParamHandle *construct_param_handle_subsurfed(const Scene *scene, MEdge *subsurfedEdges; MPoly *subsurfedPolys; MLoop *subsurfedLoops; - /* number of vertices and faces for subsurfed mesh*/ + /* Number of vertices and faces for subsurfed mesh. */ int numOfEdges, numOfFaces; /* holds a map to editfaces for every subsurfed MFace. @@ -1367,7 +1367,7 @@ static void uv_map_rotation_matrix_ex(float result[4][4], rotup[2][2] = cosf(upangle) / radius; rotup[0][0] = 1.0f / radius; - /* calculate transforms*/ + /* Calculate transforms. */ mul_m4_series(result, rotup, rotside, viewmatrix, rotobj); } @@ -2905,7 +2905,7 @@ void ED_uvedit_add_simple_uvs(Main *bmain, const Scene *scene, Object *ob) /* select all uv loops first - pack parameters needs this to make sure charts are registered */ ED_uvedit_select_all(bm); uvedit_unwrap_cube_project(bm, 1.0, false, NULL); - /* set the margin really quickly before the packing operation*/ + /* Set the margin really quickly before the packing operation. */ scene->toolsettings->uvcalc_margin = 0.001f; uvedit_pack_islands(scene, ob, bm); BM_mesh_bm_to_me(bmain, bm, me, (&(struct BMeshToMeshParams){0})); |