From 124bfa4d2d4027cdb2cd2b9375b99c8d98b106de Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 8 Jul 2016 00:48:03 +1000 Subject: Cleanup: spelling, style --- source/blender/blenkernel/intern/curve.c | 2 +- source/blender/blenkernel/intern/dynamicpaint.c | 4 ++-- source/blender/blenkernel/intern/library_query.c | 2 +- source/blender/blenkernel/intern/nla.c | 2 +- source/blender/bmesh/intern/bmesh_mesh.c | 2 +- source/blender/bmesh/intern/bmesh_polygon.c | 2 +- source/blender/editors/interface/interface_widgets.c | 2 +- source/blender/editors/space_file/filesel.c | 2 +- source/blender/editors/space_view3d/view3d_edit.c | 3 +-- source/blender/editors/space_view3d/view3d_view.c | 2 +- source/blender/editors/transform/transform_generics.c | 2 +- source/blender/editors/transform/transform_snap_object.c | 6 +++--- source/blender/editors/uvedit/uvedit_parametrizer.c | 2 +- .../blender/freestyle/intern/view_map/FEdgeXDetector.cpp | 2 +- source/blender/gpu/intern/gpu_material.c | 16 ++++++++++------ source/blender/makesdna/DNA_action_types.h | 2 +- source/blender/makesrna/intern/rna_action.c | 3 ++- source/blender/modifiers/intern/MOD_correctivesmooth.c | 2 +- source/blender/python/bmesh/bmesh_py_types.c | 2 +- 19 files changed, 32 insertions(+), 28 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index face3ae112f..377013bc9e9 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -1397,7 +1397,7 @@ unsigned int BKE_curve_calc_coords_axis_len( } /** - * Calcualte an array for the entire curve (cyclic or non-cyclic). + * Calculate an array for the entire curve (cyclic or non-cyclic). * \note Call for each axis. * * \param use_cyclic_duplicate_endpoint: Duplicate values at the beginning & end of the array. diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 2c596ea68f9..2b097f31c59 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -2249,7 +2249,7 @@ static void dynamic_paint_create_uv_surface_neighbor_cb(void *userdata, const in /* tri index */ /* There is a low possibility of actually having a neighbor point which tri is * already set from another neighbor in a separate thread here. - * Cheking for both tri_index and neighbour_pixel above reduces that probability + * Checking for both tri_index and neighbour_pixel above reduces that probability * but it remains possible. * That atomic op (and its memory fence) ensures tPoint->neighbour_pixel is set * to non--1 *before* its tri_index is set (i.e. that it cannot be used a neighbour). @@ -4797,7 +4797,7 @@ static void dynamic_paint_effect_drip_cb(void *userdata, const int index) /* Sort of spinlock, but only for given ePoint. * Since the odds a same ePoint is modified at the same time by several threads is very low, this is - * much more eficient than a global spin lock. */ + * much more efficient than a global spin lock. */ const unsigned int pointlock_idx = n_trgt / 8; const uint8_t pointlock_bitmask = 1 << (n_trgt & 7); /* 7 == 0b111 */ while (atomic_fetch_and_or_uint8(&point_locks[pointlock_idx], pointlock_bitmask) & pointlock_bitmask); diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c index adde5229a9b..6e2e07eeeca 100644 --- a/source/blender/blenkernel/intern/library_query.c +++ b/source/blender/blenkernel/intern/library_query.c @@ -881,7 +881,7 @@ static int foreach_libblock_check_indirect_usage_callback( } /** - * Check wether given ID is used indirectly (i.e. by another linked ID). + * Check weather given ID is used indirectly (i.e. by another linked ID). */ bool BKE_library_ID_is_indirectly_used(Main *bmain, void *idv) { diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index 0527df67033..992042c8af2 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -1291,7 +1291,7 @@ void BKE_nlastrip_recalculate_bounds(NlaStrip *strip) if (IS_EQF(mapping, 0.0f) == 0) strip->end = (actlen * mapping) + strip->start; - /* make sure we don't overlap our neighbours */ + /* make sure we don't overlap our neighbors */ nlastrip_fix_resize_overlaps(strip); } diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index 32aa80a4e73..57a6d8d2e1a 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -1974,7 +1974,7 @@ void BM_mesh_rebuild( } /** - * Re-allocatges mesh data with/without toolflags. + * Re-allocates mesh data with/without toolflags. */ void BM_mesh_toolflags_set(BMesh *bm, bool use_toolflags) { diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index fff6bea044c..870f8c7fc0d 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -384,7 +384,7 @@ void BM_face_calc_tangent_edge(const BMFace *f, float r_tangent[3]) } /** - * Compute the tanget of the face, using the two longest disconected edges. + * Compute the tanget of the face, using the two longest disconnected edges. * * \param r_tangent: Calculated unit length tangent (return value). */ diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 5098e701638..02981b543f3 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -3042,7 +3042,7 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat if (state & (UI_BUT_DISABLED | UI_BUT_INACTIVE)) { /* Now we reduce alpha of the inner color (i.e. the color shown) - * so that this setting can look greyed out, while retaining + * so that this setting can look grayed out, while retaining * the checkboard (for transparent values). This is needed * here as the effects of ui_widget_color_disabled() are overwritten. */ diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 175d83506c6..8ae2ed62b76 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -618,7 +618,7 @@ int file_select_match(struct SpaceFile *sfile, const char *pattern, char *matche */ for (i = 0; i < n; i++) { file = filelist_file(sfile->files, i); - /* Do not check wether file is a file or dir here! Causes T44243 (we do accept dirs at this stage). */ + /* Do not check weather file is a file or dir here! Causes T44243 (we do accept dirs at this stage). */ if (fnmatch(pattern, file->relpath, 0) == 0) { filelist_entry_select_set(sfile->files, file, FILE_SEL_ADD, FILE_SEL_SELECTED, CHECK_ALL); if (!match) { diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 4d5d03d6c9b..90f79f0ff69 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -3435,8 +3435,7 @@ static int render_border_exec(bContext *C, wmOperator *op) } /* drawing a border outside the camera view switches off border rendering */ - if ((border.xmin == border.xmax || border.ymin == border.ymax)) - { + if ((border.xmin == border.xmax || border.ymin == border.ymax)) { if (rv3d->persp == RV3D_CAMOB) scene->r.mode &= ~R_BORDER; else diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 00fd3cd48e5..bc7a9989c72 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -221,7 +221,7 @@ void ED_view3d_smooth_view_ex( copy_v3_v3(sms.dyn_ofs, sview->dyn_ofs); sms.use_dyn_ofs = true; - /* calcualte the final destination offset */ + /* calculate the final destination offset */ view3d_orbit_apply_dyn_ofs(sms.dst.ofs, sms.src.ofs, sms.src.quat, sms.dst.quat, sms.dyn_ofs); } diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 67740644afe..728b10f5e6f 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -563,7 +563,7 @@ static void recalcData_nla(TransInfo *t) } /* Use RNA to write the values to ensure that constraints on these are obeyed - * (e.g. for transition strips, the values are taken from the neighbours) + * (e.g. for transition strips, the values are taken from the neighbors) * * NOTE: we write these twice to avoid truncation errors which can arise when * moving the strips a large distance using numeric input [#33852] diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index bacd9b61f59..59dfe18139a 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -891,9 +891,9 @@ static bool snapDerivedMesh( hit.dist = local_depth; if (treedata->tree && - BLI_bvhtree_ray_cast( - treedata->tree, ray_start_local, ray_normal_local, 0.0f, - &hit, treedata->raycast_callback, treedata) != -1) + BLI_bvhtree_ray_cast( + treedata->tree, ray_start_local, ray_normal_local, 0.0f, + &hit, treedata->raycast_callback, treedata) != -1) { hit.dist += len_diff; hit.dist /= local_scale; diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index cd368ab32e0..bdfff123aa4 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -743,7 +743,7 @@ static PVert *p_vert_add(PHandle *handle, PHashKey key, const float co[3], PEdge /* Sanity check, a single nan/inf point causes the entire result to be invalid. * Note that values within the calculation may _become_ non-finite, - * so the rest of the code still needs to take this possability into account. */ + * so the rest of the code still needs to take this possibility into account. */ for (int i = 0; i < 3; i++) { if (UNLIKELY(!isfinite(v->co[i]))) { v->co[i] = 0.0f; diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp index 85c6390cb9e..6f2a89e0068 100644 --- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp +++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp @@ -640,7 +640,7 @@ void FEdgeXDetector::postProcessSuggestiveContourFace(WXFace *iFace) normal_vec = wxf->GetVertexNormal(v); // FIXME: what about e1 ^ e2 ? radial_normal_vec = er_vec ^ normal_vec; - // Test wether the radial plan intersects with the edge at the opposite of v. + // Test weather the radial plan intersects with the edge at the opposite of v. res = GeomUtils::intersectRayPlane(opposite_vertex_a->GetVertex(), opposite_edge->GetVec(), radial_normal_vec, -(v_vec * radial_normal_vec), t, 1.0e-06); diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index fd7f205214e..0f95107c018 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -1736,11 +1736,13 @@ void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr) } /* environment lighting */ - if (!(mat->scene->gm.flag & GAME_GLSL_NO_ENV_LIGHTING) && (world->mode & WO_ENV_LIGHT) && (mat->scene->r.mode & R_SHADOW) && - !BKE_scene_use_new_shading_nodes(mat->scene)) + if (!(mat->scene->gm.flag & GAME_GLSL_NO_ENV_LIGHTING) && + (world->mode & WO_ENV_LIGHT) && + (mat->scene->r.mode & R_SHADOW) && + !BKE_scene_use_new_shading_nodes(mat->scene)) { if ((world->ao_env_energy != 0.0f) && (GPU_link_changed(shi->amb) || ma->amb != 0.0f) && - (GPU_link_changed(shi->refl) || ma->ref != 0.0f)) + (GPU_link_changed(shi->refl) || ma->ref != 0.0f)) { if (world->aocolor != WO_AOPLAIN) { if (!(is_zero_v3(&world->horr) & is_zero_v3(&world->zenr))) @@ -1749,8 +1751,10 @@ void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr) GPU_link(mat, "math_multiply", shi->amb, shi->refl, &f); GPU_link(mat, "math_multiply", f, GPU_uniform(&world->ao_env_energy), &f); GPU_link(mat, "shade_mul_value", f, shi->rgb, &fcol); - GPU_link(mat, "env_apply", shr->combined, GPU_dynamic_uniform(GPUWorld.horicol, GPU_DYNAMIC_HORIZON_COLOR, NULL), - GPU_dynamic_uniform(GPUWorld.zencol, GPU_DYNAMIC_ZENITH_COLOR, NULL), fcol, GPU_builtin(GPU_VIEW_MATRIX), shi->vn, &shr->combined); + GPU_link(mat, "env_apply", shr->combined, + GPU_dynamic_uniform(GPUWorld.horicol, GPU_DYNAMIC_HORIZON_COLOR, NULL), + GPU_dynamic_uniform(GPUWorld.zencol, GPU_DYNAMIC_ZENITH_COLOR, NULL), fcol, + GPU_builtin(GPU_VIEW_MATRIX), shi->vn, &shr->combined); } } else { @@ -2585,7 +2589,7 @@ int GPU_lamp_shadow_bind_code(GPULamp *lamp) float *GPU_lamp_dynpersmat(GPULamp *lamp) { - return (float*)lamp->dynpersmat; + return &lamp->dynpersmat[0][0]; } int GPU_lamp_shadow_layer(GPULamp *lamp) diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index ec2a8e2f612..9a19606d6c8 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -330,7 +330,7 @@ typedef enum ePchan_DrawFlag { /* PoseChannel->bboneflag */ typedef enum ePchan_BBoneFlag { - /* Use custom reference bones (for roll and handle alignment), instead of immediate neighbours */ + /* Use custom reference bones (for roll and handle alignment), instead of immediate neighbors */ PCHAN_BBONE_CUSTOM_HANDLES = (1 << 1), /* Evaluate start handle as being "relative" */ PCHAN_BBONE_CUSTOM_START_REL = (1 << 2), diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index 907ee8ba1c7..4876a6132cb 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -713,7 +713,8 @@ static void rna_def_action(BlenderRNA *brna) prop = RNA_def_property(srna, "pose_markers", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "markers", NULL); RNA_def_property_struct_type(prop, "TimelineMarker"); - RNA_def_property_flag(prop, PROP_LIB_EXCEPTION); /* T45689 - so that the list isn't greyed out; adding/removing is still banned though */ + /* Use lib exception so the list isn't grayed out; adding/removing is still banned though, see T45689 */ + RNA_def_property_flag(prop, PROP_LIB_EXCEPTION); RNA_def_property_ui_text(prop, "Pose Markers", "Markers specific to this action, for labeling poses"); rna_def_action_pose_markers(brna, prop); diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c b/source/blender/modifiers/intern/MOD_correctivesmooth.c index 44515bfdf35..77fd84a2948 100644 --- a/source/blender/modifiers/intern/MOD_correctivesmooth.c +++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c @@ -319,7 +319,7 @@ static void smooth_iter__length_weight( /* fast-path */ for (i = 0; i < numVerts; i++) { struct SmoothingData_Weighted *sd = &smooth_data[i]; - /* divide by sum of all neighbour distances (weighted) and amount of neighbours, (mean average) */ + /* divide by sum of all neighbour distances (weighted) and amount of neighbors, (mean average) */ const float div = sd->edge_length_sum * vertex_edge_count[i]; if (div > eps) { #if 0 diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index fe4360d1e3b..1d951bae48b 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -1824,7 +1824,7 @@ static PyObject *bpy_bmface_calc_tangent_edge(BPy_BMFace *self) PyDoc_STRVAR(bpy_bmface_calc_tangent_edge_pair_doc, ".. method:: calc_tangent_edge_pair()\n" "\n" -" Return face tangent based on the two longest disconected edges.\n" +" Return face tangent based on the two longest disconnected edges.\n" "\n" " - Tris: Use the edge pair with the most similar lengths.\n" " - Quads: Use the longest edge pair.\n" -- cgit v1.2.3