diff --git a/intern/bsp/intern/CSG_BooleanOps.cpp b/intern/bsp/intern/CSG_BooleanOps.cpp index 4f71e7992a1..f74dfc3c253 100644 --- a/intern/bsp/intern/CSG_BooleanOps.cpp +++ b/intern/bsp/intern/CSG_BooleanOps.cpp @@ -88,16 +88,16 @@ CSG_PerformBooleanOperation( BoolOpType boolType; - switch( op_type ) { - case e_csg_union: - boolType = BOP_UNION; - break; - case e_csg_difference: - boolType = BOP_DIFFERENCE; - break; - default: - boolType = BOP_INTERSECTION; - break; + switch (op_type) { + case e_csg_union: + boolType = BOP_UNION; + break; + case e_csg_difference: + boolType = BOP_DIFFERENCE; + break; + default: + boolType = BOP_INTERSECTION; + break; } BoolOpState boolOpResult; diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index e4245aaf095..6cf4ada6311 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -1028,8 +1028,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType, if (!validWindow(window)) { return GHOST_kFailure; } - switch(eventType) - { + switch (eventType) { case GHOST_kEventWindowClose: pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowClose, window) ); break; @@ -1086,8 +1085,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType if (!validWindow(window)) { return GHOST_kFailure; } - switch(eventType) - { + switch (eventType) { case GHOST_kEventDraggingEntered: case GHOST_kEventDraggingUpdated: case GHOST_kEventDraggingExited: diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 0f42fca9f12..24b3c36a329 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -111,7 +111,7 @@ int BLI_file_gzip(const char *from, const char *to) return rval; } -/* gzip the file in from_file and write it to memery to_mem, at most size bytes. +/* gzip the file in from_file and write it to memory to_mem, at most size bytes. * return the unziped size */ char *BLI_file_ungzip_to_mem(const char *from_file, int *size_r) @@ -283,7 +283,7 @@ int BLI_move(const char *file, const char *to) { int err; - /* windows doesn't support moveing to a directory + /* windows doesn't support moving to a directory * it has to be 'mv filename filename' and not * 'mv filename destdir' */ diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index e6399ed356e..c0ea817ae4a 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -1662,7 +1662,7 @@ void quat_apply_track(float quat[4], short axis, short upflag) axis = axis - 3; /* there are 2 possible up-axis for each axis used, the 'quat_track' applies so the first - * up axis is used X->Y, Y->X, Z->X, if this first up axis isn used then rotate 90d + * up axis is used X->Y, Y->X, Z->X, if this first up axis isn't used then rotate 90d * the strange bit shift below just find the low axis {X:Y, Y:X, Z:X} */ if (upflag != (2 - axis) >> 1) { float q[4] = {M_SQRT1_2, 0.0, 0.0, 0.0}; /* assign 90d rotation axis */ diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c index c4def539c10..48e7de43a86 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -663,7 +663,7 @@ MINLINE float normalize_v3_v3(float r[3], const float a[3]) float d = dot_v3v3(a, a); /* a larger value causes normalize errors in a - * scaled down models with camera xtreme close */ + * scaled down models with camera extreme close */ if (d > 1.0e-35f) { d = sqrtf(d); mul_v3_v3fl(r, a, 1.0f / d); @@ -681,7 +681,7 @@ MINLINE double normalize_v3_d(double n[3]) double d = n[0] * n[0] + n[1] * n[1] + n[2] * n[2]; /* a larger value causes normalize errors in a - * scaled down models with camera xtreme close */ + * scaled down models with camera extreme close */ if (d > 1.0e-35) { double mul; diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h index 4fa3a69356f..e851a642b32 100644 --- a/source/blender/bmesh/bmesh_class.h +++ b/source/blender/bmesh/bmesh_class.h @@ -45,7 +45,7 @@ struct Object; * pointers. this is a requirement of mempool's method of * iteration. * - * hrm. it doesn't but stull works ok, remove the comment above? - campbell. + * hrm. it doesn't but still works ok, remove the comment above? - campbell. */ // #pragma GCC diagnostic error "-Wpadded" diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c index a2f2a9a0dba..643e73e02b4 100644 --- a/source/blender/bmesh/intern/bmesh_core.c +++ b/source/blender/bmesh/intern/bmesh_core.c @@ -2103,7 +2103,7 @@ bool bmesh_edge_separate(BMesh *bm, BMEdge *e, BMLoop *l_sep) } /** - * \brief Unglue Region Make Vert (URMV) + * \brief Un-glue Region Make Vert (URMV) * * Disconnects a face from its vertex fan at loop \a sl * diff --git a/source/blender/bmesh/intern/bmesh_iterators_inline.h b/source/blender/bmesh/intern/bmesh_iterators_inline.h index d9784ac9b2a..eef6544be89 100644 --- a/source/blender/bmesh/intern/bmesh_iterators_inline.h +++ b/source/blender/bmesh/intern/bmesh_iterators_inline.h @@ -35,7 +35,7 @@ /** * \brief Iterator Step * - * Calls an iterators step fucntion to return the next element. + * Calls an iterators step function to return the next element. */ BLI_INLINE void *BM_iter_step(BMIter *iter) { diff --git a/source/blender/bmesh/intern/bmesh_queries.c b/source/blender/bmesh/intern/bmesh_queries.c index 2284e183d97..44dc483d5a7 100644 --- a/source/blender/bmesh/intern/bmesh_queries.c +++ b/source/blender/bmesh/intern/bmesh_queries.c @@ -472,7 +472,7 @@ BMLoop *BM_vert_step_fan_loop(BMLoop *l, BMEdge **e_step) * The function takes a vertex at the center of a fan and returns the opposite edge in the fan. * All edges in the fan must be manifold, otherwise return NULL. * - * \note This could (probably) be done more effieiently. + * \note This could (probably) be done more efficiently. */ BMEdge *BM_vert_other_disk_edge(BMVert *v, BMEdge *e_first) { diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c index c7c33aa2775..36ad8ef506b 100644 --- a/source/blender/bmesh/operators/bmo_subdivide.c +++ b/source/blender/bmesh/operators/bmo_subdivide.c @@ -165,7 +165,7 @@ static void alter_co(BMesh *bm, BMVert *v, BMEdge *UNUSED(origed), const SubDPar } /* apply the new difference to the rest of the shape keys, - * note that this dosn't take rotations into account, we _could_ support + * note that this doesn't take rotations into account, we _could_ support * this by getting the normals and coords for each shape key and * re-calculate the smooth value for each but this is quite involved. * for now its ok to simply apply the difference IMHO - campbell */ diff --git a/source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c b/source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c index 9dc4b596568..7e9a5784552 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c +++ b/source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c @@ -189,7 +189,7 @@ void BM_mesh_decimate_unsubdivide_ex(BMesh *bm, const int iterations, const bool int iter_step; - /* if tag_only is set, we assyme the caller knows what verts to tag + /* if tag_only is set, we assume the caller knows what verts to tag * needed for the operator */ if (tag_only == false) { BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) { diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp index 84bb33929c1..13403555bfb 100644 --- a/source/blender/collada/collada_utils.cpp +++ b/source/blender/collada/collada_utils.cpp @@ -329,15 +329,18 @@ void bc_match_scale(std::vector *objects_done, float bl_scale; - switch(type) { - case USER_UNIT_NONE : bl_scale = 1.0; // map 1 Blender unit to 1 Meter - break; - case USER_UNIT_METRIC : bl_scale = RNA_property_float_get(&unit_settings, scale_ptr); - break; - default : bl_scale = RNA_property_float_get(&unit_settings, scale_ptr); - // it looks like the conversion to Imperial is done implicitly. - // So nothing to do here. - break; + switch (type) { + case USER_UNIT_NONE: + bl_scale = 1.0; // map 1 Blender unit to 1 Meter + break; + case USER_UNIT_METRIC: + bl_scale = RNA_property_float_get(&unit_settings, scale_ptr); + break; + default: + bl_scale = RNA_property_float_get(&unit_settings, scale_ptr); + // it looks like the conversion to Imperial is done implicitly. + // So nothing to do here. + break; } float size_mat3[3][3]; diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c index 52a585dd314..2003aeaa848 100644 --- a/source/blender/editors/io/io_collada.c +++ b/source/blender/editors/io/io_collada.c @@ -367,8 +367,9 @@ void WM_OT_collada_import(wmOperatorType *ot) WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); RNA_def_boolean(ot->srna, - "import_units", 0, "Import Units", - "If disabled match import to Blender's current Unit settings. Otherwise use the settings from the Imported scene."); + "import_units", 0, "Import Units", + "If disabled match import to Blender's current Unit settings. " + "Otherwise use the settings from the Imported scene"); } #endif diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c index c53a8f68713..8b2ac740e47 100644 --- a/source/blender/editors/render/render_view.c +++ b/source/blender/editors/render/render_view.c @@ -291,7 +291,8 @@ static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent for (win = CTX_wm_manager(C)->windows.first; win; win = win->next) { bScreen *sc = win->screen; if ((sc->temp && ((ScrArea *)sc->areabase.first)->spacetype == SPACE_IMAGE) || - (win == winshow && winshow != wincur)) { + (win == winshow && winshow != wincur)) + { wm_window_raise(win); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index da2facc244a..11f1828ff4e 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -3597,7 +3597,7 @@ static void SCENE_OT_delete(wmOperatorType *ot) /* ***************** region alpha blending ***************** */ -/* implementation note: a disapplearing region needs at least 1 last draw with 100% backbuffer +/* implementation note: a disappearing region needs at least 1 last draw with 100% backbuffer * texture over it- then triple buffer will clear it entirely. * This because flag RGN_HIDDEN is set in end - region doesnt draw at all then */ diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 74399857a97..a1b3941dd7a 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -904,7 +904,7 @@ static int project_paint_occlude_ptv_clip(const ProjPaintState *ps, const MFace /* Check if a screenspace location is occluded by any other faces * check, pixelScreenCo must be in screenspace, its Z-Depth only needs to be used for comparison - * and dosn't need to be correct in relation to X and Y coords (this is the case in perspective view) */ + * and doesn't need to be correct in relation to X and Y coords (this is the case in perspective view) */ static int project_bucket_point_occluded(const ProjPaintState *ps, LinkNode *bucketFace, const int orig_face, float pixelScreenCo[4]) { MFace *mf; diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c index 701048cd229..ae7026a634f 100644 --- a/source/blender/editors/space_buttons/buttons_header.c +++ b/source/blender/editors/space_buttons/buttons_header.c @@ -97,7 +97,7 @@ static void do_buttons_buttons(bContext *C, void *UNUSED(arg), int event) sbuts->mainbuser = sbuts->mainb; } -#define BUT_UNIT_X (UI_UNIT_X + 2*U.pixelsize) +#define BUT_UNIT_X (UI_UNIT_X + 2 * U.pixelsize) void buttons_header_buttons(const bContext *C, ARegion *ar) { @@ -105,7 +105,7 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) uiBlock *block; uiBut *but; int headery = ED_area_headersize(); - int xco, yco = 0.5f*(headery - UI_UNIT_Y); + int xco, yco = 0.5f * (headery - UI_UNIT_Y); buttons_context_compute(C, sbuts); diff --git a/source/blender/render/intern/source/multires_bake.c b/source/blender/render/intern/source/multires_bake.c index 89f67335c39..ea42049989b 100644 --- a/source/blender/render/intern/source/multires_bake.c +++ b/source/blender/render/intern/source/multires_bake.c @@ -938,17 +938,18 @@ static void build_permutation_table(unsigned short permutation[], unsigned short permutation[i] = temp_permutation[entry]; /* delete entry */ - for(k = entry; k < nr_entries_left - 1; k++) + for (k = entry; k < nr_entries_left - 1; k++) { temp_permutation[k] = temp_permutation[k + 1]; + } } /* verify permutation table * every entry must appear exactly once */ #if 0 - for(i = 0; i < number_of_rays; i++) temp_permutation[i] = 0; - for(i = 0; i < number_of_rays; i++) ++temp_permutation[permutation[i]]; - for(i = 0; i < number_of_rays; i++) BLI_assert(temp_permutation[i] == 1); + for (i = 0; i < number_of_rays; i++) temp_permutation[i] = 0; + for (i = 0; i < number_of_rays; i++) ++temp_permutation[permutation[i]]; + for (i = 0; i < number_of_rays; i++) BLI_assert(temp_permutation[i] == 1); #endif } diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 91be03986c1..6044e3fb771 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -800,7 +800,7 @@ void wm_draw_update(bContext *C) if (state == GHOST_kWindowStateMinimized) { /* do not update minimized windows, it gives issues on intel drivers (see [#33223]) - * anyway, it seems logical to skip update for invisile windows + * anyway, it seems logical to skip update for invisible windows */ continue; } diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 9e3722777ba..0005c3a2230 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -3042,7 +3042,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U event.keymodifier = 0; /* this case happened with an external numpad, it's not really clear - * why, but it's also impossible to map a key modifier to an unknwon + * why, but it's also impossible to map a key modifier to an unknown * key, so it shouldn't harm */ if (event.keymodifier == UNKNOWNKEY) event.keymodifier = 0; diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index e22694a6560..1172f66fb1b 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1341,7 +1341,7 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *ar, void *userData) block = uiBeginBlock(C, ar, __func__, UI_EMBOSS); uiBlockClearFlag(block, UI_BLOCK_LOOP); - /* intentionally don't use 'UI_BLOCK_MOVEMOUSE_QUIT', some dialogs have many items + /* intentionally don't use 'UI_BLOCK_MOVEMOUSE_QUIT', some dialogues have many items * where quitting by accident is very annoying */ uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN); @@ -1998,7 +1998,7 @@ static int wm_link_append_poll(bContext *C) if (WM_operator_winactive(C)) { /* linking changes active object which is pretty useful in general, * but which totally confuses edit mode (i.e. it becoming not so obvious - * to leave from edit mode and inwalid tools in toolbar might be displayed) + * to leave from edit mode and invalid tools in toolbar might be displayed) * so disable link/append when in edit mode (sergey) */ if (CTX_data_edit_object(C)) return 0; diff --git a/source/creator/creator.c b/source/creator/creator.c index 3260f0c3976..fcfec947d9f 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -499,8 +499,7 @@ static void blender_crash_handler_backtrace(FILE *fp) symbolinfo->MaxNameLen = MAXSYMBOL - 1; symbolinfo->SizeOfStruct = sizeof(SYMBOL_INFO); - for( i = 0; i < nframes; i++ ) - { + for (i = 0; i < nframes; i++) { SymFromAddr(process, ( DWORD64 )( stack[ i ] ), 0, symbolinfo); fprintf(fp, "%u: %s - 0x%0X\n", nframes - i - 1, symbolinfo->Name, symbolinfo->Address); diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageIM.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageIM.cpp index 490c26a5c3b..7bcc8dc9034 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageIM.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageIM.cpp @@ -74,7 +74,7 @@ void RAS_StorageIM::TexCoord(const RAS_TexVert &tv) if (GLEW_ARB_multitexture) { for (unit = 0; unit < *m_texco_num; unit++) { - switch(m_texco[unit]) { + switch (m_texco[unit]) { case RAS_IRasterizer::RAS_TEXCO_ORCO: case RAS_IRasterizer::RAS_TEXCO_GLOB: glMultiTexCoord3fvARB(GL_TEXTURE0_ARB + unit, tv.getXYZ()); @@ -97,7 +97,7 @@ void RAS_StorageIM::TexCoord(const RAS_TexVert &tv) if (GLEW_ARB_vertex_program) { int uv = 0; for (unit = 0; unit < *m_attrib_num; unit++) { - switch(m_attrib[unit]) { + switch (m_attrib[unit]) { case RAS_IRasterizer::RAS_TEXCO_ORCO: case RAS_IRasterizer::RAS_TEXCO_GLOB: glVertexAttrib3fvARB(unit, tv.getXYZ());