From aec9e0e1b61a10e62612522bf3f86e0afd7294a3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 29 Mar 2020 16:33:51 +1100 Subject: Cleanup: spelling, comments --- source/blender/blenkernel/BKE_armature.h | 2 +- source/blender/blenkernel/BKE_colorband.h | 2 +- source/blender/blenkernel/BKE_subdiv.h | 2 +- source/blender/blenkernel/BKE_texture.h | 2 +- source/blender/blenkernel/intern/constraint.c | 8 ++++---- source/blender/blenkernel/intern/displist_tangent.c | 2 +- source/blender/blenkernel/intern/gpencil_geom.c | 2 +- source/blender/blenkernel/intern/key.c | 2 +- .../blender/blenkernel/intern/multires_reshape_vertcos.c | 3 +-- source/blender/blenkernel/intern/seqeffects.c | 15 +++++++-------- source/blender/draw/engines/overlay/overlay_image.c | 2 +- source/blender/editors/armature/armature_add.c | 6 +++--- source/blender/editors/armature/armature_relations.c | 2 +- source/blender/editors/armature/armature_select.c | 2 +- source/blender/editors/armature/armature_utils.c | 6 +++--- source/blender/editors/armature/pose_select.c | 2 +- source/blender/editors/gpencil/gpencil_edit.c | 4 ++-- source/blender/editors/mesh/editface.c | 6 ++++-- source/blender/editors/sculpt_paint/sculpt_pose.c | 2 +- source/blender/editors/space_image/image_undo.c | 2 +- .../blender/io/usd/intern/abstract_hierarchy_iterator.h | 2 +- source/blender/makesrna/intern/rna_modifier.c | 2 +- source/blender/modifiers/intern/MOD_surfacedeform.c | 2 +- source/blender/windowmanager/intern/wm_files.c | 8 ++++---- source/blender/windowmanager/intern/wm_xr.c | 4 ++-- 25 files changed, 46 insertions(+), 46 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index cd4733a4e62..6c383ae5011 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -61,7 +61,7 @@ typedef struct PoseTree { int stretch; /* disable stretching */ } PoseTree; -/* Core armature functionality */ +/* Core armature functionality. */ struct bArmature *BKE_armature_add(struct Main *bmain, const char *name); struct bArmature *BKE_armature_from_object(struct Object *ob); diff --git a/source/blender/blenkernel/BKE_colorband.h b/source/blender/blenkernel/BKE_colorband.h index 6e03f4db3d2..355682671fe 100644 --- a/source/blender/blenkernel/BKE_colorband.h +++ b/source/blender/blenkernel/BKE_colorband.h @@ -29,7 +29,7 @@ extern "C" { struct ColorBand; -/* in ColorBand struct */ +/** #ColorBand.data length. */ #define MAXCOLORBAND 32 void BKE_colorband_init(struct ColorBand *coba, bool rangetype); diff --git a/source/blender/blenkernel/BKE_subdiv.h b/source/blender/blenkernel/BKE_subdiv.h index 3b342402ecb..0333d52a464 100644 --- a/source/blender/blenkernel/BKE_subdiv.h +++ b/source/blender/blenkernel/BKE_subdiv.h @@ -66,7 +66,7 @@ typedef struct SubdivSettings { /* This refers to an adaptive isolation when creating patches for the subdivided surface. * - * When is set to to false (aka uniform subdivision) fixed depth of isolation is used, which + * When is set to false (aka uniform subdivision) fixed depth of isolation is used, which * allows to iteratively add more subdivisions (uniform subdivision level 2 = uniform subdivision * level 1 + uniform subdivision level 1). Uniform subdivisions will progressively go to a limit * surface. diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h index 0f852bdc64d..fb925565735 100644 --- a/source/blender/blenkernel/BKE_texture.h +++ b/source/blender/blenkernel/BKE_texture.h @@ -39,7 +39,7 @@ struct Tex; struct TexMapping; struct TexResult; -/* in ColorBand struct */ +/** #ColorBand.data length. */ #define MAXCOLORBAND 32 void BKE_texture_default(struct Tex *tex); diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 45e2ff10ba4..04adb642fc0 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -472,9 +472,9 @@ static void contarget_get_mesh_mat(Object *ob, const char *substring, float mat[ /* derive the rotation from the average normal: * - code taken from transform_gizmo.c, - * calc_gizmo_stats, V3D_ORIENT_NORMAL case - */ - /* we need the transpose of the inverse for a normal... */ + * calc_gizmo_stats, V3D_ORIENT_NORMAL case */ + + /* We need the transpose of the inverse for a normal. */ copy_m3_m4(imat, ob->obmat); invert_m3_m3(tmat, imat); @@ -577,7 +577,7 @@ static void constraint_target_to_mat4(Object *ob, copy_m4_m4(mat, ob->obmat); BKE_constraint_mat_convertspace(ob, NULL, mat, from, to, false); } - /* Case VERTEXGROUP */ + /* Case VERTEXGROUP */ /* Current method just takes the average location of all the points in the * VertexGroup, and uses that as the location value of the targets. Where * possible, the orientation will also be calculated, by calculating an diff --git a/source/blender/blenkernel/intern/displist_tangent.c b/source/blender/blenkernel/intern/displist_tangent.c index 4ac8d47feba..88fef1a4cfd 100644 --- a/source/blender/blenkernel/intern/displist_tangent.c +++ b/source/blender/blenkernel/intern/displist_tangent.c @@ -144,7 +144,7 @@ static int face_to_vert_index(SGLSLDisplistToTangent *dlt, v += 1; } - /* Cyclic correction. */ + /* Cyclic correction. */ u = u % dlt->dl->nr; v = v % dlt->dl->parts; diff --git a/source/blender/blenkernel/intern/gpencil_geom.c b/source/blender/blenkernel/intern/gpencil_geom.c index c4acc871752..6bdcc9cfbcb 100644 --- a/source/blender/blenkernel/intern/gpencil_geom.c +++ b/source/blender/blenkernel/intern/gpencil_geom.c @@ -430,7 +430,7 @@ bool BKE_gpencil_stroke_sample(bGPDstroke *gps, const float dist, const bool sel stroke_interpolate_deform_weights(gps, 0, 0, 0, &new_dv[0]); } - /* the rest */ + /* The rest. */ while ((next_point_index = stroke_march_next_point(gps, next_point_index, last_coord, diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index a6708413f70..e5567a43cd7 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -952,7 +952,7 @@ static void do_key(const int start, k3 = key_block_get_data(key, actkb, k[2], &freek3); k4 = key_block_get_data(key, actkb, k[3], &freek4); - /* test for more or less points (per key!) */ + /* Test for more or less points (per key!) */ if (tot != k[0]->totelem) { k1tot = 0.0; flagflo |= 1; diff --git a/source/blender/blenkernel/intern/multires_reshape_vertcos.c b/source/blender/blenkernel/intern/multires_reshape_vertcos.c index 5aff0b3caa2..1ece7344f37 100644 --- a/source/blender/blenkernel/intern/multires_reshape_vertcos.c +++ b/source/blender/blenkernel/intern/multires_reshape_vertcos.c @@ -182,8 +182,7 @@ static void multires_reshape_vertcos_foreach_vertex_every_edge( multires_reshape_vertcos_foreach_vertex(foreach_context, &ptex_coord, subdiv_vertex_index); } -/* Set displacement grids values at a reshape level to a object coordinates of the the given - * source. */ +/* Set displacement grids values at a reshape level to a object coordinates of the given source. */ bool multires_reshape_assign_final_coords_from_vertcos( const MultiresReshapeContext *reshape_context, const float (*vert_coords)[3], diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index 70f92c6d6bd..7c34b676e69 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -2499,15 +2499,14 @@ static ImBuf *do_transform_effect(const SeqRenderData *context, /*********************** Glow *************************/ static void RVBlurBitmap2_float(float *map, int width, int height, float blur, int quality) -/* MUUUCCH better than the previous blur. */ -/* We do the blurring in two passes which is a whole lot faster. */ -/* I changed the math around to implement an actual Gaussian */ -/* distribution. */ -/* */ -/* Watch out though, it tends to misbehaven with large blur values on */ -/* a small bitmap. Avoid avoid avoid. */ -/*=============================== */ { + /* Much better than the previous blur! + * We do the blurring in two passes which is a whole lot faster. + * I changed the math around to implement an actual Gaussian distribution. + * + * Watch out though, it tends to misbehave with large blur values on + * a small bitmap. Avoid avoid! */ + float *temp = NULL, *swap; float *filter = NULL; int x, y, i, fx, fy; diff --git a/source/blender/draw/engines/overlay/overlay_image.c b/source/blender/draw/engines/overlay/overlay_image.c index f81c51f0883..057ab4990dd 100644 --- a/source/blender/draw/engines/overlay/overlay_image.c +++ b/source/blender/draw/engines/overlay/overlay_image.c @@ -244,7 +244,7 @@ static void image_camera_background_matrix_get(const Camera *cam, unit_m4(scale); unit_m4(translate); - /* Normalized Object space camera frame corners. */ + /* Normalized Object space camera frame corners. */ float cam_corners[4][3]; BKE_camera_view_frame(draw_ctx->scene, cam, cam_corners); float cam_width = fabsf(cam_corners[0][0] - cam_corners[3][0]); diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index e87040279af..1105633f47e 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -742,7 +742,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op) } } - /* Find the selected bones and duplicate them as needed, with mirrored name */ + /* Find the selected bones and duplicate them as needed, with mirrored name. */ for (ebone_iter = arm->edbo->first; ebone_iter && ebone_iter != ebone_first_dupe; ebone_iter = ebone_iter->next) { if (EBONE_VISIBLE(arm, ebone_iter) && (ebone_iter->flag & BONE_SELECTED) && @@ -765,7 +765,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op) } } - /* Run through the list and fix the pointers */ + /* Run through the list and fix the pointers. */ for (ebone_iter = arm->edbo->first; ebone_iter && ebone_iter != ebone_first_dupe; ebone_iter = ebone_iter->next) { if (ebone_iter->temp.ebone) { @@ -1116,7 +1116,7 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op) ED_armature_edit_deselect_all(obedit); - /* Create a bone */ + /* Create a bone. */ bone = ED_armature_ebone_add(obedit->data, name); copy_v3_v3(bone->head, curs); diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c index 2c2bf3cd283..4580d2c30ae 100644 --- a/source/blender/editors/armature/armature_relations.c +++ b/source/blender/editors/armature/armature_relations.c @@ -280,7 +280,7 @@ int join_armature_exec(bContext *C, wmOperator *op) float mat[4][4], oimat[4][4]; bool ok = false; - /* Ensure we're not in editmode and that the active object is an armature*/ + /* Ensure we're not in edit-mode and that the active object is an armature. */ if (!ob_active || ob_active->type != OB_ARMATURE) { return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c index 21eccd2ca1f..4b66203da01 100644 --- a/source/blender/editors/armature/armature_select.c +++ b/source/blender/editors/armature/armature_select.c @@ -1003,7 +1003,7 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op) CTX_DATA_END; } - /* Set the flags */ + /* Set the flags. */ CTX_DATA_BEGIN (C, EditBone *, ebone, visible_bones) { /* ignore bone if selection can't change */ switch (action) { diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index 76361f6785b..58ceef5b7db 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -562,7 +562,7 @@ static EditBone *make_boneList_rec(ListBase *edbo, BLI_addtail(edbo, eBone); - /* Add children if necessary */ + /* Add children if necessary. */ if (curBone->childbase.first) { eBoneTest = make_boneList_rec(edbo, &curBone->childbase, eBone, actBone); if (eBoneTest) { @@ -721,7 +721,7 @@ void ED_armature_from_edit(Main *bmain, bArmature *arm) } } - /* Copy the bones from the editData into the armature */ + /* Copy the bones from the edit-data into the armature. */ for (eBone = arm->edbo->first; eBone; eBone = eBone->next) { newBone = MEM_callocN(sizeof(Bone), "bone"); eBone->temp.bone = newBone; /* Associate the real Bones with the EditBones */ @@ -819,7 +819,7 @@ void ED_armature_edit_free(struct bArmature *arm) { EditBone *eBone; - /* Clear the editbones list */ + /* Clear the edit-bones list. */ if (arm->edbo) { if (arm->edbo->first) { for (eBone = arm->edbo->first; eBone; eBone = eBone->next) { diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c index 07be2baf1ae..475640fa37c 100644 --- a/source/blender/editors/armature/pose_select.c +++ b/source/blender/editors/armature/pose_select.c @@ -497,7 +497,7 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op) Object *ob_prev = NULL; - /* Set the flags */ + /* Set the flags. */ CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, visible_pose_bones, Object *, ob) { bArmature *arm = ob->data; pose_do_bone_select(pchan, action); diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 858e07b1cce..dc7bbfb99fa 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -4249,7 +4249,7 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op) if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) { continue; } - /* separate selected strokes */ + /* Separate selected strokes. */ if (gps->flag & GP_STROKE_SELECT) { /* add layer if not created before */ if (gpl_dst == NULL) { @@ -4422,7 +4422,7 @@ static int gp_stroke_split_exec(bContext *C, wmOperator *UNUSED(op)) if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) { continue; } - /* split selected strokes */ + /* Split selected strokes. */ if (gps->flag & GP_STROKE_SELECT) { /* make copy of source stroke */ bGPDstroke *gps_dst = BKE_gpencil_stroke_duplicate(gps, true); diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index 987447c3663..3d20b58b905 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -493,8 +493,10 @@ void paintvert_tag_select_update(struct bContext *C, struct Object *ob) WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data); } -/* note: if the caller passes false to flush_flags, - * then they will need to run paintvert_flush_flags(ob) themselves */ +/** + * \note if the caller passes false to flush_flags, + * then they will need to run #paintvert_flush_flags(ob) themselves. + */ bool paintvert_deselect_all_visible(Object *ob, int action, bool flush_flags) { Mesh *me; diff --git a/source/blender/editors/sculpt_paint/sculpt_pose.c b/source/blender/editors/sculpt_paint/sculpt_pose.c index 52cdc876b32..fde4a9d1d23 100644 --- a/source/blender/editors/sculpt_paint/sculpt_pose.c +++ b/source/blender/editors/sculpt_paint/sculpt_pose.c @@ -460,7 +460,7 @@ static bool pose_face_sets_floodfill_cb( if (symmetry_check && !SCULPT_vertex_has_unique_face_set(ss, index)) { - /* We only add coordiates for calculating the origin when it is possible to go from this + /* We only add coordinates for calculating the origin when it is possible to go from this * vertex to another vertex in a valid face set for the next iteration. */ bool count_as_boundary = false; diff --git a/source/blender/editors/space_image/image_undo.c b/source/blender/editors/space_image/image_undo.c index 1394c05d7bc..8f9f4189c8a 100644 --- a/source/blender/editors/space_image/image_undo.c +++ b/source/blender/editors/space_image/image_undo.c @@ -714,7 +714,7 @@ static UndoImageBuf *ubuf_lookup_from_reference(ImageUndoStep *us_prev, int tile_number, const UndoImageBuf *ubuf) { - /* Use name lookup because because the pointer is cleared for previous steps. */ + /* Use name lookup because the pointer is cleared for previous steps. */ UndoImageHandle *uh_prev = uhandle_lookup_by_name(&us_prev->handles, image, tile_number); if (uh_prev != NULL) { UndoImageBuf *ubuf_reference = uhandle_lookup_ubuf(uh_prev, image, ubuf->ibuf_name); diff --git a/source/blender/io/usd/intern/abstract_hierarchy_iterator.h b/source/blender/io/usd/intern/abstract_hierarchy_iterator.h index f7ba1a76bac..08b50e2560d 100644 --- a/source/blender/io/usd/intern/abstract_hierarchy_iterator.h +++ b/source/blender/io/usd/intern/abstract_hierarchy_iterator.h @@ -69,7 +69,7 @@ struct HierarchyContext { * have weak_export=true, this object (and by recursive reasoning all its descendants) will be * excluded from the export. * - * The export hierarchy is kept as close to the the hierarchy in Blender as possible. As such, an + * The export hierarchy is kept as close to the hierarchy in Blender as possible. As such, an * object that serves as a parent for another object, but which should NOT be exported itself, is * exported only as transform (i.e. as empty). This happens with objects that are part of a * holdout collection (which prevents them from being exported) but also parent of an exported diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 0de745f5892..45c4ad75995 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -93,7 +93,7 @@ const EnumPropertyItem rna_enum_object_modifier_type_items[] = { "UV_WARP", ICON_MOD_UVPROJECT, "UV Warp", - "Transform the UV map using the the difference between two objects"}, + "Transform the UV map using the difference between two objects"}, {eModifierType_WeightVGEdit, "VERTEX_WEIGHT_EDIT", ICON_MOD_VERTEX_WEIGHT, diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c index d4fa2ea1f82..4ef1f32462a 100644 --- a/source/blender/modifiers/intern/MOD_surfacedeform.c +++ b/source/blender/modifiers/intern/MOD_surfacedeform.c @@ -1144,7 +1144,7 @@ static void deformVert(void *__restrict userdata, const float weight = (data->weights != NULL) ? data->weights[index] : 1.0f; /* Check if this vertex will be deformed. If it is not deformed we return and avoid - * unneccessary calculations. */ + * unnecessary calculations. */ if (weight == 0.0f) { return; } diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 3f4d082f9f7..fa59bad7a6b 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -1047,8 +1047,8 @@ void wm_homefile_read(bContext *C, } if (use_userdef) { - /* Clear keymaps because the current default keymap may have been initialized - * from user preferences, which have been reset. */ + /* Clear keymaps because the current default keymap may have been initialized + * from user preferences, which have been reset. */ for (wmWindowManager *wm = bmain->wm.first; wm; wm = wm->id.next) { if (wm->defaultconf) { wm->defaultconf->flag &= ~KEYCONF_INIT_DEFAULT; @@ -1532,7 +1532,7 @@ void wm_autosave_timer(Main *bmain, wmWindowManager *wm, wmTimer *UNUSED(wt)) } } else { - /* save as regular blend file */ + /* Save as regular blend file. */ int fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_HISTORY); ED_editors_flush_edits(bmain); @@ -1665,7 +1665,7 @@ static int wm_homefile_write_exec(bContext *C, wmOperator *op) ED_editors_flush_edits(bmain); - /* force save as regular blend file */ + /* Force save as regular blend file. */ fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_HISTORY); if (BLO_write_file(bmain, filepath, fileflags, op->reports, NULL) == 0) { diff --git a/source/blender/windowmanager/intern/wm_xr.c b/source/blender/windowmanager/intern/wm_xr.c index 7422fc97f04..18c3b70ed01 100644 --- a/source/blender/windowmanager/intern/wm_xr.c +++ b/source/blender/windowmanager/intern/wm_xr.c @@ -754,8 +754,8 @@ void wm_xr_draw_view(const GHOST_XrDrawViewInfo *draw_view, void *customdata) * viewport buffers composited together and potentially color managed for display on screen. * It needs a bound frame-buffer to draw into, for which we simply reuse the GPUOffscreen one. * - * In a next step, Ghost-XR will use the the currently bound frame-buffer to retrieve the image - * to be submitted to the OpenXR swap-chain. So do not un-bind the offscreen yet! */ + * In a next step, Ghost-XR will use the currently bound frame-buffer to retrieve the image + * to be submitted to the OpenXR swap-chain. So do not un-bind the off-screen yet! */ GPU_offscreen_bind(surface_data->offscreen, false); -- cgit v1.2.3