diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-10-10 02:25:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-10-10 02:29:50 +0300 |
commit | dc2cd2d0dcfdc2e10ccd1f06039390b6293e46ef (patch) | |
tree | ff83bb5a1175d3f8afc495825b34c557065035e2 /source/blender | |
parent | f61a8a2abd07ee879f9bc860230e0dd3e6ee6a0c (diff) |
Cleanup: clang-format, spelling
Diffstat (limited to 'source/blender')
19 files changed, 57 insertions, 43 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 77d13d3cae9..4413ad2a70f 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -244,9 +244,9 @@ typedef struct SculptSession { /* Painting on deformed mesh */ bool deform_modifiers_active; /* object is deformed with some modifiers */ - float (*orig_cos)[3]; /* coords of undeformed mesh */ - float (*deform_cos)[3]; /* coords of deformed mesh but without stroke displacement */ - float (*deform_imats)[3][3]; /* crazyspace deformation matrices */ + float (*orig_cos)[3]; /* coords of undeformed mesh */ + float (*deform_cos)[3]; /* coords of deformed mesh but without stroke displacement */ + float (*deform_imats)[3][3]; /* crazyspace deformation matrices */ /* Used to cache the render of the active texture */ unsigned int texcache_side, *texcache, texcache_actual; diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index 48c0258bf47..10499ae0b5c 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -821,7 +821,7 @@ static void fcm_noise_evaluate( FMod_Noise *data = (FMod_Noise *)fcm->data; float noise; - /* generate noise using good ol' Blender Noise + /* generate noise using good old Blender Noise * - 0.1 is passed as the 'z' value, otherwise evaluation fails for size = phase = 1 * with evaltime being an integer (which happens when evaluating on frame by frame basis) */ diff --git a/source/blender/blenkernel/intern/mirror.c b/source/blender/blenkernel/intern/mirror.c index 624996f8150..02e0a2bb3b9 100644 --- a/source/blender/blenkernel/intern/mirror.c +++ b/source/blender/blenkernel/intern/mirror.c @@ -169,13 +169,13 @@ Mesh *BKE_mirror_apply_mirror_on_axis(MirrorModifierData *mmd, result = BKE_mesh_new_nomain_from_template( mesh, maxVerts * 2, maxEdges * 2, 0, maxLoops * 2, maxPolys * 2); - /*copy customdata to original geometry*/ + /* Copy custom-data to original geometry. */ CustomData_copy_data(&mesh->vdata, &result->vdata, 0, 0, maxVerts); CustomData_copy_data(&mesh->edata, &result->edata, 0, 0, maxEdges); CustomData_copy_data(&mesh->ldata, &result->ldata, 0, 0, maxLoops); CustomData_copy_data(&mesh->pdata, &result->pdata, 0, 0, maxPolys); - /* Subsurf for eg won't have mesh data in the custom data arrays. + /* Subsurf for eg won't have mesh data in the custom-data arrays. * now add mvert/medge/mpoly layers. */ if (!CustomData_has_layer(&mesh->vdata, CD_MVERT)) { memcpy(result->mvert, mesh->mvert, sizeof(*result->mvert) * mesh->totvert); @@ -188,8 +188,8 @@ Mesh *BKE_mirror_apply_mirror_on_axis(MirrorModifierData *mmd, memcpy(result->mpoly, mesh->mpoly, sizeof(*result->mpoly) * mesh->totpoly); } - /* copy customdata to new geometry, - * copy from its self because this data may have been created in the checks above */ + /* Copy custom-data to new geometry, + * copy from its self because this data may have been created in the checks above. */ CustomData_copy_data(&result->vdata, &result->vdata, 0, maxVerts, maxVerts); CustomData_copy_data(&result->edata, &result->edata, 0, maxEdges, maxEdges); /* loops are copied later */ diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 1bd2fbffd58..3db51c95fcb 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -2562,8 +2562,13 @@ static void update_flowsfluids( else { /* MOD_SMOKE_FLOW_SOURCE_MESH */ /* update flow object frame */ BLI_mutex_lock(&object_update_lock); - BKE_object_modifier_update_subframe( - depsgraph, scene, collob, true, 5, BKE_scene_frame_get(scene), eModifierType_Smoke); + BKE_object_modifier_update_subframe(depsgraph, + scene, + collob, + true, + 5, + BKE_scene_frame_get(scene), + eModifierType_Smoke); BLI_mutex_unlock(&object_update_lock); /* apply flow */ diff --git a/source/blender/blenkernel/intern/subdiv_ccg.c b/source/blender/blenkernel/intern/subdiv_ccg.c index 4e3ba532fb2..8654c50a783 100644 --- a/source/blender/blenkernel/intern/subdiv_ccg.c +++ b/source/blender/blenkernel/intern/subdiv_ccg.c @@ -1558,8 +1558,8 @@ static int adjacent_edge_point_index_from_coord(const SubdivCCG *subdiv_ccg, topology_refiner->getEdgeVertices(topology_refiner, adjacent_edge_index, edge_vertices_indices); /* Vertex index of an edge which is used to see whether edge points in the right direction. - * Tricky part here is that depending whether input coordinate is ar macimum X or Y coordinate - * of the grid we need to use dirrerent edge direction. + * Tricky part here is that depending whether input coordinate is are maximum X or Y coordinate + * of the grid we need to use different edge direction. * Basically, the edge adjacent to a previous loop needs to point opposite direction. */ int directional_edge_vertex_index = -1; diff --git a/source/blender/blenlib/intern/delaunay_2d.c b/source/blender/blenlib/intern/delaunay_2d.c index 4abe0dee594..af4fa9fa54e 100644 --- a/source/blender/blenlib/intern/delaunay_2d.c +++ b/source/blender/blenlib/intern/delaunay_2d.c @@ -2004,9 +2004,10 @@ static void remove_non_constraint_edges_leave_valid_bmesh(CDT_state *cdt) if (fleft != cdt->outer_face && fright != cdt->outer_face && (fleft->input_ids != NULL || fright->input_ids != NULL)) { /* Is there another symedge with same left and right faces? - * Or is there a vertex not part of e touching the same left and right faces? */ + * Or is there a vertex not part of e touching the same left and right faces? */ for (se2 = se->next; dissolve && se2 != se; se2 = se2->next) { - if (sym(se2)->face == fright || (se2->vert != se->next->vert && vert_touches_face(se2->vert, fright))) { + if (sym(se2)->face == fright || + (se2->vert != se->next->vert && vert_touches_face(se2->vert, fright))) { dissolve = false; } } @@ -2150,7 +2151,7 @@ static void prepare_cdt_for_output(CDT_state *cdt, const CDT_output_type output_ UNUSED_VARS(f); #endif - if (output_type == CDT_CONSTRAINTS) { + if (output_type == CDT_CONSTRAINTS) { remove_non_constraint_edges(cdt); } else if (output_type == CDT_CONSTRAINTS_VALID_BMESH) { diff --git a/source/blender/blenlib/intern/expr_pylike_eval.c b/source/blender/blenlib/intern/expr_pylike_eval.c index b3692926838..c7631f8991e 100644 --- a/source/blender/blenlib/intern/expr_pylike_eval.c +++ b/source/blender/blenlib/intern/expr_pylike_eval.c @@ -504,7 +504,7 @@ static bool parse_add_func(ExprParseState *state, eOpCode code, int args, void * if (jmp_gap >= 1 && prev_ops[-1].opcode == OPCODE_CONST) { UnaryOpFunc func = funcptr; - /* volatile because some compilers overly agressive optimize this call out. + /* volatile because some compilers overly aggressive optimize this call out. * see D6012 for details. */ volatile double result = func(prev_ops[-1].arg.dval); @@ -522,7 +522,7 @@ static bool parse_add_func(ExprParseState *state, eOpCode code, int args, void * prev_ops[-1].opcode == OPCODE_CONST) { BinaryOpFunc func = funcptr; - /* volatile because some compilers overly agressive optimize this call out. + /* volatile because some compilers overly aggressive optimize this call out. * see D6012 for details. */ volatile double result = func(prev_ops[-2].arg.dval, prev_ops[-1].arg.dval); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 545659d06c2..7257c26e1d2 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -8240,9 +8240,9 @@ void blo_lib_link_restore(Main *oldmain, } /* Restore all ID pointers in Main database itself - * (especially IDProperties might point to some worspace of other 'weirdly unchanged' ID + * (especially IDProperties might point to some word-space of other 'weirdly unchanged' ID * pointers, see T69146). - * Note that this will re;ap again a few pointers in workspaces or so, + * Note that this will re-apply again a few pointers in workspaces or so, * but since we are remapping final ones already set above, * that is just some minor harmless double-processing. */ lib_link_main_data_restore(id_map, newmain); @@ -10101,7 +10101,7 @@ static void expand_doit_library(void *fdhandle, Main *mainvar, void *old) } else { /* Convert any previously read weak link to regular link - * to signal that we want to read this datablock. */ + * to signal that we want to read this data-block. */ if (id->tag & LIB_TAG_ID_LINK_PLACEHOLDER) { id->flag &= ~LIB_INDIRECT_WEAK_LINK; } @@ -10151,7 +10151,7 @@ static void expand_doit_library(void *fdhandle, Main *mainvar, void *old) } else { /* Convert any previously read weak link to regular link - * to signal that we want to read this datablock. */ + * to signal that we want to read this data-block. */ if (id->tag & LIB_TAG_ID_LINK_PLACEHOLDER) { id->flag &= ~LIB_INDIRECT_WEAK_LINK; } @@ -12002,7 +12002,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) Main *main_newid = BKE_main_new(); for (Main *mainptr = mainl->next; mainptr; mainptr = mainptr->next) { - /* Drop weak links for which no datablock was found. */ + /* Drop weak links for which no data-block was found. */ read_library_clear_weak_links(basefd, mainlist, mainptr); /* Do versioning for newly added linked data-locks. If no data-locks diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 6366ed0bb6f..51db656bf63 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -1192,7 +1192,7 @@ static bool drw_engines_draw_background(void) /* No draw engines draw the background. We clear the background. * We draw the background after drawing of the scene so the camera background * images can be drawn using ALPHA Under. Otherwise the background always - * interferred with the alpha blending */ + * interfered with the alpha blending. */ DRW_clear_background(); return false; } diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index d56791e5da0..c030c551374 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -2051,7 +2051,7 @@ void ED_object_single_users(Main *bmain, single_object_action_users(bmain, scene, NULL, NULL, 0); single_mat_users_expand(bmain); /* Duplicating obdata and other IDs may require another update of the collections and objects - * pointers, especially reguarding drivers and custom props, see T66641. + * pointers, especially regarding drivers and custom props, see T66641. * Note that this whole scene duplication code and 'make single user' functions have te be * rewritten at some point to make use of proper modern ID management code, * but that is no small task. diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index e2c9bb8d6e5..0b6d5661577 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -362,10 +362,10 @@ void ED_fileselect_set_params_from_userdef(SpaceFile *sfile) /** * Update the user-preference data for the file space. In fact, this also contains some - * non-FileSelectParams data, but it's neglectable. + * non-FileSelectParams data, but we can safely ignore this. * - * \param temp_win_size: If the browser was opened in a temporary window, pass its size here so we - * can store that in the preferences. Otherwise NULL. + * \param temp_win_size: If the browser was opened in a temporary window, + * pass its size here so we can store that in the preferences. Otherwise NULL. */ void ED_fileselect_params_to_userdef(SpaceFile *sfile, int temp_win_size[2]) { diff --git a/source/blender/editors/space_image/image_undo.c b/source/blender/editors/space_image/image_undo.c index c450d5122eb..7cfdea3495d 100644 --- a/source/blender/editors/space_image/image_undo.c +++ b/source/blender/editors/space_image/image_undo.c @@ -70,7 +70,7 @@ static CLG_LogRef LOG = {"ed.image.undo"}; /** \name Thread Locking * \{ */ -/* this is a static resource for non-globality, +/* This is a non-global static resource, * Maybe it should be exposed as part of the * paint operation, but for now just give a public interface */ static SpinLock paint_tiles_lock; diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 8852470398e..f1e884adc3d 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -263,7 +263,8 @@ static void do_outliner_object_select_recursive(ViewLayer *view_layer, for (base = FIRSTBASE(view_layer); base; base = base->next) { Object *ob = base->object; - if ((((base->flag & BASE_VISIBLE_DEPSGRAPH) != 0) && BKE_object_is_child_recursive(ob_parent, ob))) { + if ((((base->flag & BASE_VISIBLE_DEPSGRAPH) != 0) && + BKE_object_is_child_recursive(ob_parent, ob))) { ED_object_base_select(base, select ? BA_SELECT : BA_DESELECT); } } diff --git a/source/blender/freestyle/intern/stroke/Stroke.h b/source/blender/freestyle/intern/stroke/Stroke.h index f4fd2b132e8..263b5429161 100644 --- a/source/blender/freestyle/intern/stroke/Stroke.h +++ b/source/blender/freestyle/intern/stroke/Stroke.h @@ -590,7 +590,8 @@ class Stroke : public Interface1D { /*! Resampling method. * Resamples the curve so that it eventually has iNPoints. That means it is going to add * iNPoints-vertices_size, if vertices_size is the number of points we already have. If - * vertices_size >= iNPoints, no resampling is done. \param iNPoints: The number of vertices we + * vertices_size >= iNPoints, no resampling is done. + * \param iNPoints: The number of vertices we * eventually want in our stroke. */ int Resample(int iNPoints); @@ -840,8 +841,10 @@ class Stroke : public Interface1D { vertex_iterator vertices_end(); /*! Returns a StrokeVertexIterator pointing on the first StrokeVertex of the Stroke. One can - * specify a sampling value to resample the Stroke on the fly if needed. \param t: The resampling - * value with which we want our Stroke to be resampled. If 0 is specified, no resampling is done. + * specify a sampling value to resample the Stroke on the fly if needed. + * + * \param t: The resampling value with which we want our Stroke to be resampled. + * If 0 is specified, no resampling is done. */ StrokeInternal::StrokeVertexIterator strokeVerticesBegin(float t = 0.0f); diff --git a/source/blender/freestyle/intern/view_map/Interface1D.h b/source/blender/freestyle/intern/view_map/Interface1D.h index 7a72a176902..ab489bff4c9 100644 --- a/source/blender/freestyle/intern/view_map/Interface1D.h +++ b/source/blender/freestyle/intern/view_map/Interface1D.h @@ -156,15 +156,17 @@ class Interface1D { /*! Returns an iterator over the Interface1D points, pointing to the first point. The difference * with verticesBegin() is that here we can iterate over points of the 1D element at a any given - * sampling. Indeed, for each iteration, a virtual point is created. \param t: The sampling with - * which we want to iterate over points of this 1D element. + * sampling. Indeed, for each iteration, a virtual point is created. + * + * \param t: The sampling with which we want to iterate over points of this 1D element. */ virtual Interface0DIterator pointsBegin(float t = 0.0f); /*! Returns an iterator over the Interface1D points, pointing after the last point. The * difference with verticesEnd() is that here we can iterate over points of the 1D element at a - * any given sampling. Indeed, for each iteration, a virtual point is created. \param t: The - * sampling with which we want to iterate over points of this 1D element. + * any given sampling. Indeed, for each iteration, a virtual point is created. + * + * \param t: The sampling with which we want to iterate over points of this 1D element. */ virtual Interface0DIterator pointsEnd(float t = 0.0f); diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h index 7d8c3347eb4..d7218e97bf0 100644 --- a/source/blender/gpu/GPU_batch.h +++ b/source/blender/gpu/GPU_batch.h @@ -193,8 +193,10 @@ GPUBatch *create_BatchInGeneral(GPUPrimType, VertexBufferStuff, ElementListStuff #endif /* future plans */ -/* GPUDrawList is an API to do lots of similar drawcalls very fast using multidrawindirect. - * There is a fallback if the feature is not supported. */ +/** + * #GPUDrawList is an API to do lots of similar draw-calls very fast using multi-draw-indirect. + * There is a fallback if the feature is not supported. + */ typedef struct GPUDrawList GPUDrawList; GPUDrawList *GPU_draw_list_create(int length); diff --git a/source/blender/gpu/intern/gpu_batch.c b/source/blender/gpu/intern/gpu_batch.c index cffe46f4396..fc578b4466c 100644 --- a/source/blender/gpu/intern/gpu_batch.c +++ b/source/blender/gpu/intern/gpu_batch.c @@ -858,7 +858,7 @@ void GPU_draw_list_submit(GPUDrawList *list) size_t bytes_used = cmd_len * sizeof(GPUDrawCommandIndexed); list->cmd_len = 0; /* Avoid reuse. */ - /* Only do multidraw indirect if doing more than 2 drawcall. + /* Only do multi-draw indirect if doing more than 2 drawcall. * This avoids the overhead of buffer mapping if scene is * not very instance friendly. */ if (USE_MULTI_DRAW_INDIRECT && cmd_len > 2) { diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index d13393280d0..6c66097fe22 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -932,8 +932,8 @@ static PyObject *pyrna_struct_repr(BPy_StructRNA *self) ID *real_id = NULL; path = RNA_path_from_real_ID_to_struct(G_MAIN, &self->ptr, &real_id); if (path != NULL) { - /* real_id may be NULL in some cases, although the only valid one is evaluated data, - * which should have been catched already above. + /* 'real_id' may be NULL in some cases, although the only valid one is evaluated data, + * which should have already been caught above. * So assert, but handle it without crashing for release builds. */ BLI_assert(real_id != NULL); diff --git a/source/blender/windowmanager/intern/wm_platform_support.c b/source/blender/windowmanager/intern/wm_platform_support.c index 5153fc33d49..94eceafc59b 100644 --- a/source/blender/windowmanager/intern/wm_platform_support.c +++ b/source/blender/windowmanager/intern/wm_platform_support.c @@ -206,8 +206,8 @@ bool WM_platform_support_perform_checks() printf("%s\n\n%s\n%s\n", title, message, link); } if (G.background) { - /* don't show the messagebox when running in background mode. Printing to - * console is enough. */ + /* Don't show the message-box when running in background mode. + * Printing to console is enough. */ result = true; } else if (show_message) { |