From cea588b9ef8f9bdb2729fb233d6f1ed0886700e1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 14 Jan 2022 10:47:50 +1100 Subject: [PATCH] Cleanup: spelling in comments, C++ style comments for disabled code Also ensure space at end of comment. --- intern/cycles/bvh/build.cpp | 2 +- intern/cycles/session/session.cpp | 2 +- intern/opencolorio/ocio_impl_glsl.cc | 2 +- .../blender/blenkernel/BKE_asset_catalog.hh | 2 +- source/blender/blenkernel/BKE_lib_override.h | 6 ++-- source/blender/blenkernel/BKE_mesh.h | 2 +- .../blenkernel/intern/asset_catalog_test.cc | 2 +- .../blenlib/intern/polyfill_2d_beautify.c | 2 +- .../blenloader/intern/versioning_300.c | 2 +- source/blender/draw/intern/DRW_gpu_wrapper.hh | 28 +++++++++---------- .../editors/animation/keyframes_general.c | 6 ++-- .../editors/animation/keyframes_keylist.cc | 2 +- source/blender/editors/animation/keyframing.c | 2 +- .../editors/asset/ED_asset_mark_clear.h | 3 +- .../blender/editors/gpencil/annotate_paint.c | 2 +- source/blender/editors/mask/mask_draw.c | 6 ++-- .../editors/space_buttons/buttons_texture.c | 4 +-- .../space_file/asset_catalog_tree_view.cc | 2 +- source/blender/editors/space_file/filelist.c | 7 +++-- source/blender/editors/space_file/fsmenu.c | 4 +-- .../editors/space_graph/graph_slider_ops.c | 6 ++-- .../editors/space_outliner/outliner_draw.cc | 4 +-- .../editors/space_outliner/outliner_edit.cc | 12 ++++---- .../editors/space_outliner/outliner_intern.hh | 6 ++-- .../editors/space_outliner/outliner_select.cc | 2 +- .../editors/space_outliner/outliner_sync.cc | 2 +- .../editors/space_outliner/outliner_utils.cc | 2 +- .../space_outliner/tree/tree_display.h | 3 +- .../editors/space_sequencer/sequencer_edit.c | 2 +- .../editors/space_userpref/space_userpref.c | 4 +-- source/blender/makesdna/DNA_space_defaults.h | 2 +- .../blender/makesrna/intern/rna_scene_api.c | 2 +- source/blender/makesrna/intern/rna_wm_api.c | 2 +- .../geometry/nodes/node_geo_dual_mesh.cc | 2 +- source/blender/python/intern/bpy_operator.c | 2 +- source/blender/python/intern/bpy_rna_array.c | 2 +- source/blender/render/intern/texture_image.c | 2 +- .../simulation/intern/SIM_mass_spring.cpp | 2 +- .../simulation/intern/implicit_blender.c | 2 +- 39 files changed, 79 insertions(+), 70 deletions(-) diff --git a/intern/cycles/bvh/build.cpp b/intern/cycles/bvh/build.cpp index 242595bee4c..082041f5ed2 100644 --- a/intern/cycles/bvh/build.cpp +++ b/intern/cycles/bvh/build.cpp @@ -935,7 +935,7 @@ BVHNode *BVHBuild::create_object_leaf_nodes(const BVHReference *ref, int start, BVHNode *BVHBuild::create_leaf_node(const BVHRange &range, const vector &references) { - /* This is a bit overallocating here (considering leaf size into account), + /* This is a bit over-allocating here (considering leaf size into account), * but chunk-based re-allocation in vector makes it difficult to use small * size of stack storage here. Some tweaks are possible tho. * diff --git a/intern/cycles/session/session.cpp b/intern/cycles/session/session.cpp index 2c50a9a6d7f..d03063a7dda 100644 --- a/intern/cycles/session/session.cpp +++ b/intern/cycles/session/session.cpp @@ -428,7 +428,7 @@ void Session::do_delayed_reset() /* Update temp directory on reset. * This potentially allows to finish the existing rendering with a previously configure temporary - * direcotry in the host software and switch to a new temp directory when new render starts. */ + * directory in the host software and switch to a new temp directory when new render starts. */ tile_manager_.set_temp_dir(params.temp_dir); /* Progress. */ diff --git a/intern/opencolorio/ocio_impl_glsl.cc b/intern/opencolorio/ocio_impl_glsl.cc index 87bc2842539..fc45ec4e301 100644 --- a/intern/opencolorio/ocio_impl_glsl.cc +++ b/intern/opencolorio/ocio_impl_glsl.cc @@ -642,7 +642,7 @@ bool OCIOImpl::gpuDisplayShaderBind(OCIO_ConstConfigRcPtr *config, } /* Bind textures to sampler units. Texture 0 is set by caller. - * Uniforms have already been set for texture bind points.*/ + * Uniforms have already been set for texture bind points. */ if (!use_overlay) { /* Avoid missing binds. */ GPU_texture_bind(textures.dummy, TEXTURE_SLOT_OVERLAY); diff --git a/source/blender/blenkernel/BKE_asset_catalog.hh b/source/blender/blenkernel/BKE_asset_catalog.hh index ecc839050b7..004b70c2925 100644 --- a/source/blender/blenkernel/BKE_asset_catalog.hh +++ b/source/blender/blenkernel/BKE_asset_catalog.hh @@ -141,7 +141,7 @@ class AssetCatalogService { AssetCatalogFilter create_catalog_filter(CatalogID active_catalog_id) const; /** Create a catalog with some sensible auto-generated catalog ID. - * The catalog will be saved to the default catalog file.*/ + * The catalog will be saved to the default catalog file. */ AssetCatalog *create_catalog(const AssetCatalogPath &catalog_path); /** diff --git a/source/blender/blenkernel/BKE_lib_override.h b/source/blender/blenkernel/BKE_lib_override.h index 16156824f8e..30e75259967 100644 --- a/source/blender/blenkernel/BKE_lib_override.h +++ b/source/blender/blenkernel/BKE_lib_override.h @@ -306,7 +306,8 @@ void BKE_lib_override_library_main_validate(struct Main *bmain, struct ReportLis * This is typically used to detect whether some property has been changed in local and a new * #IDOverrideProperty (of #IDOverridePropertyOperation) has to be added. * - * \return true if status is OK, false otherwise. */ + * \return true if status is OK, false otherwise. + */ bool BKE_lib_override_library_status_check_local(struct Main *bmain, struct ID *local); /** * Check that status of reference data-block is still valid against current local one. @@ -317,7 +318,8 @@ bool BKE_lib_override_library_status_check_local(struct Main *bmain, struct ID * * This is typically used to detect whether some reference has changed and local * needs to be updated against it. * - * \return true if status is OK, false otherwise. */ + * \return true if status is OK, false otherwise. + */ bool BKE_lib_override_library_status_check_reference(struct Main *bmain, struct ID *local); /** diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index a9a78bbc12e..e7382ce448a 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -461,7 +461,7 @@ void BKE_mesh_calc_normals_poly(const struct MVert *mvert, /** * Calculate vertex and face normals, storing the result in custom data layers on the mesh. * - * \note It is usually preferrable to calculate normals lazily with + * \note It is usually preferable to calculate normals lazily with * #BKE_mesh_vertex_normals_ensure, but some areas (perhaps unnecessarily) * can also calculate them eagerly. */ diff --git a/source/blender/blenkernel/intern/asset_catalog_test.cc b/source/blender/blenkernel/intern/asset_catalog_test.cc index 3ff7831b19a..8c39bfc9770 100644 --- a/source/blender/blenkernel/intern/asset_catalog_test.cc +++ b/source/blender/blenkernel/intern/asset_catalog_test.cc @@ -239,7 +239,7 @@ class AssetCatalogTest : public testing::Test { } /* Create an empty CDF to add complexity. It should not save to this, but to the top-level - * one.*/ + * one. */ ASSERT_TRUE(BLI_file_touch(cdf_in_subdir.c_str())); ASSERT_EQ(0, BLI_file_size(cdf_in_subdir.c_str())); diff --git a/source/blender/blenlib/intern/polyfill_2d_beautify.c b/source/blender/blenlib/intern/polyfill_2d_beautify.c index 684094234cf..aab33cb163b 100644 --- a/source/blender/blenlib/intern/polyfill_2d_beautify.c +++ b/source/blender/blenlib/intern/polyfill_2d_beautify.c @@ -400,7 +400,7 @@ void BLI_polyfill_beautify(const float (*coords)[2], BLI_heap_clear(eheap, NULL); - /* MEM_freeN(eheap_table); */ /* arena */ + // MEM_freeN(eheap_table); /* arena */ /* get tris from half edge. */ uint tri_index = 0; diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index dd0cd9e24dc..a80be65bd75 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -1174,7 +1174,7 @@ static void legacy_vec_roll_to_mat3_normalized(const float nor[3], const float z = nor[2]; const float theta = 1.0f + y; /* remapping Y from [-1,+1] to [0,2]. */ - const float theta_alt = x * x + z * z; /* Helper value for matrix calculations.*/ + const float theta_alt = x * x + z * z; /* Helper value for matrix calculations. */ float rMatrix[3][3], bMatrix[3][3]; BLI_ASSERT_UNIT_V3(nor); diff --git a/source/blender/draw/intern/DRW_gpu_wrapper.hh b/source/blender/draw/intern/DRW_gpu_wrapper.hh index 01c57406dac..7a9bdb377fe 100644 --- a/source/blender/draw/intern/DRW_gpu_wrapper.hh +++ b/source/blender/draw/intern/DRW_gpu_wrapper.hh @@ -31,40 +31,40 @@ * * All types are not copyable and Buffers are not Movable. * - * drw::UniformArrayBuffer + * `drw::UniformArrayBuffer` * Uniform buffer object containing an array of T with len elements. * Data can be accessed using the [] operator. * - * drw::UniformBuffer + * `drw::UniformBuffer` * A uniform buffer object class inheriting from T. * Data can be accessed just like a normal T object. * - * drw::StorageArrayBuffer + * `drw::StorageArrayBuffer` * Storage buffer object containing an array of T with len elements. * The item count can be changed after creation using `resize()`. * However, this requires the invalidation of the whole buffer and * discarding all data inside it. * Data can be accessed using the [] operator. * - * drw::StorageBuffer + * `drw::StorageBuffer` * A storage buffer object class inheriting from T. * Data can be accessed just like a normal T object. * - * drw::Texture - * A simple wrapper to GPUTexture. A drw::Texture can be created without allocation. + * `drw::Texture` + * A simple wrapper to #GPUTexture. A #drw::Texture can be created without allocation. * The `ensure_[1d|2d|3d|cube][_array]()` method is here to make sure the underlying texture - * will meet the requirements and create (or recreate) the GPUTexture if needed. + * will meet the requirements and create (or recreate) the #GPUTexture if needed. * - * drw::TextureFromPool + * `drw::TextureFromPool` * A GPUTexture from the viewport texture pool. This texture can be shared with other engines - * and its content is undefined when aquiring it. - * A drw::TextureFromPool is acquired for rendering using `acquire()` and released once the + * and its content is undefined when acquiring it. + * A #drw::TextureFromPool is acquired for rendering using `acquire()` and released once the * rendering is done using `release()`. The same texture can be acquired & released multiple * time in one draw loop. * The `sync()` method *MUST* be called once during the cache populate (aka: Sync) phase. * - * drw::Framebuffer - * Simple wrapper to GPUFramebuffer that can be moved. + * `drw::Framebuffer` + * Simple wrapper to #GPUFramebuffer that can be moved. * */ @@ -627,7 +627,7 @@ class Texture : NonCopyable { } /** - * Free the internal texture but not the drw::Texture itself. + * Free the internal texture but not the #drw::Texture itself. */ void free() { @@ -646,7 +646,7 @@ class Texture : NonCopyable { { /* TODO(fclem) In the future, we need to check if mip_count did not change. - * For now it's ok as we always define all mip level.*/ + * For now it's ok as we always define all MIP level. */ if (tx_) { int3 size = this->size(); if (size != int3(w, h, d) || GPU_texture_format(tx_) != format || diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index 5d82b3b9939..92017c02858 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -307,11 +307,13 @@ void clean_fcurve(struct bAnimContext *ac, bAnimListElem *ale, float thresh, boo } } -/** Find the first segment of consecutive selected curve points, starting from \a start_index. +/** + * Find the first segment of consecutive selected curve points, starting from \a start_index. * Keys that have BEZT_FLAG_IGNORE_TAG set are treated as unselected. * \param r_segment_start_idx: returns the start index of the segment. * \param r_segment_len: returns the number of curve points in the segment. - * \return whether such a segment was found or not.*/ + * \return whether such a segment was found or not. + */ static bool find_fcurve_segment(FCurve *fcu, const int start_index, int *r_segment_start_idx, diff --git a/source/blender/editors/animation/keyframes_keylist.cc b/source/blender/editors/animation/keyframes_keylist.cc index e4641ead2d2..aba73ec141b 100644 --- a/source/blender/editors/animation/keyframes_keylist.cc +++ b/source/blender/editors/animation/keyframes_keylist.cc @@ -80,7 +80,7 @@ struct AnimKeylist { ListBase /* ActKeyColumn */ key_columns; /* Last accessed column in the key_columns list base. Inserting columns are typically done in * order. The last accessed column is used as starting point to search for a location to add or - * update the next column.*/ + * update the next column. */ std::optional last_accessed_column = std::nullopt; struct { diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 25d2f6c510b..0a435a9034a 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -580,7 +580,7 @@ int insert_vert_fcurve( beztr.ipo = BEZT_IPO_BEZ; } else { - /* for UI usage - defaults should come from the userprefs and/or toolsettings */ + /* For UI usage - defaults should come from the user-preferences and/or tool-settings. */ beztr.h1 = beztr.h2 = U.keyhandles_new; /* use default handle type here */ /* use default interpolation mode, with exceptions for int/discrete values */ diff --git a/source/blender/editors/asset/ED_asset_mark_clear.h b/source/blender/editors/asset/ED_asset_mark_clear.h index 8e6a8e11d69..512a1d94535 100644 --- a/source/blender/editors/asset/ED_asset_mark_clear.h +++ b/source/blender/editors/asset/ED_asset_mark_clear.h @@ -50,7 +50,8 @@ void ED_asset_generate_preview(const struct bContext *C, struct ID *id); * This clears the Fake User. If for some reason the datablock is meant to be saved anyway, the * caller is responsible for explicitly setting the Fake User. * - * \return whether the asset metadata was actually removed; false when the ID was not an asset. */ + * \return whether the asset metadata was actually removed; false when the ID was not an asset. + */ bool ED_asset_clear_id(struct ID *id); void ED_assets_pre_save(struct Main *bmain); diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index 25f03058597..e75e9314659 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -1473,7 +1473,7 @@ static tGPsdata *annotation_session_initpaint(bContext *C) return NULL; } - /* Radius for eraser circle is defined in userprefs */ + /* Radius for eraser circle is defined in user-preferences. */ /* NOTE: we do this here, so that if we exit immediately, * erase size won't get lost */ diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c index 9504a8783a0..dcd5b90bc04 100644 --- a/source/blender/editors/mask/mask_draw.c +++ b/source/blender/editors/mask/mask_draw.c @@ -722,8 +722,8 @@ void ED_mask_draw_region( /* find window pixel coordinates of origin */ UI_view2d_view_to_region(®ion->v2d, 0.0f, 0.0f, &x, &y); - /* w = BLI_rctf_size_x(&v2d->tot); */ - /* h = BLI_rctf_size_y(&v2d->tot); */ + // w = BLI_rctf_size_x(&v2d->tot); + // h = BLI_rctf_size_y(&v2d->tot); zoomx = (float)(BLI_rcti_size_x(®ion->winrct) + 1) / BLI_rctf_size_x(®ion->v2d.cur); zoomy = (float)(BLI_rcti_size_y(®ion->winrct) + 1) / BLI_rctf_size_y(®ion->v2d.cur); @@ -835,7 +835,7 @@ void ED_mask_draw_frames( mask_layer_shape = mask_layer_shape->next) { int frame = mask_layer_shape->frame; - /* draw_keyframe(i, CFRA, sfra, framelen, 1); */ + // draw_keyframe(i, CFRA, sfra, framelen, 1); int height = (frame == cfra) ? 22 : 10; int x = (frame - sfra) * framelen; immVertex2i(pos, x, region_bottom); diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c index 554edf680be..5dd7c3d240e 100644 --- a/source/blender/editors/space_buttons/buttons_texture.c +++ b/source/blender/editors/space_buttons/buttons_texture.c @@ -155,10 +155,10 @@ static void buttons_texture_users_find_nodetree(ListBase *users, for (node = ntree->nodes.first; node; node = node->next) { if (node->typeinfo->nclass == NODE_CLASS_TEXTURE) { PointerRNA ptr; - /* PropertyRNA *prop; */ /* UNUSED */ + // PropertyRNA *prop; /* UNUSED */ RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr); - /* prop = RNA_struct_find_property(&ptr, "texture"); */ /* UNUSED */ + // prop = RNA_struct_find_property(&ptr, "texture"); /* UNUSED */ buttons_texture_user_node_add( users, id, ntree, node, category, RNA_struct_ui_icon(ptr.type), node->name); diff --git a/source/blender/editors/space_file/asset_catalog_tree_view.cc b/source/blender/editors/space_file/asset_catalog_tree_view.cc index f6c449a0584..4107669630f 100644 --- a/source/blender/editors/space_file/asset_catalog_tree_view.cc +++ b/source/blender/editors/space_file/asset_catalog_tree_view.cc @@ -325,7 +325,7 @@ void AssetCatalogTreeViewItem::build_context_menu(bContext &C, uiLayout &column) /* Doesn't actually exist right now, but could be defined in Python. Reason that this isn't done * in Python yet is that catalogs are not exposed in BPY, and we'd somehow pass the clicked on - * catalog to the menu draw callback (via context probably).*/ + * catalog to the menu draw callback (via context probably). */ MenuType *mt = WM_menutype_find("ASSETBROWSER_MT_catalog_context_menu", true); if (!mt) { return; diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index e4ea832fe2f..0c4db167a0e 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -852,7 +852,8 @@ static bool is_filtered_hidden(const char *filename, /** * Apply the filter string as file path matching pattern. - * \return true when the file should be in the result set, false if it should be filtered out. */ + * \return true when the file should be in the result set, false if it should be filtered out. + */ static bool is_filtered_file_relpath(const FileListInternEntry *file, const FileListFilter *filter) { if (filter->filter_search[0] == '\0') { @@ -2064,7 +2065,7 @@ static char *fileentry_uiname(const char *root, BLI_join_dirfile(abspath, sizeof(abspath), root, relpath); name = BLF_display_name_from_file(abspath); if (name) { - /* Allocated string, so no need to BLI_strdup.*/ + /* Allocated string, so no need to #BLI_strdup. */ return name; } } @@ -3661,7 +3662,7 @@ static void filelist_readjob_recursive_dir_add_items(const bool do_lib, list_lib_options |= LIST_LIB_RECURSIVE; } /* Only load assets when browsing an asset library. For normal file browsing we return all - * entries. `FLF_ASSETS_ONLY` filter can be enabled/disabled by the user.*/ + * entries. `FLF_ASSETS_ONLY` filter can be enabled/disabled by the user. */ if (filelist->asset_library_ref) { list_lib_options |= LIST_LIB_ASSETS_ONLY; } diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c index 97f22ca7d89..14f596ae7bf 100644 --- a/source/blender/editors/space_file/fsmenu.c +++ b/source/blender/editors/space_file/fsmenu.c @@ -185,8 +185,8 @@ static void fsmenu_xdg_user_dirs_free(GHash *xdg_map) /** * Add fsmenu entry for system folders on linux. - * - Check if a path is stored in the GHash generated from user-dirs.dirs - * - If not, check for a default path in $HOME + * - Check if a path is stored in the #GHash generated from `user-dirs.dirs`. + * - If not, check for a default path in `$HOME`. * * \param key: Use `user-dirs.dirs` format "XDG_EXAMPLE_DIR" * \param default_path: Directory name to check in $HOME, also used for the menu entry name. diff --git a/source/blender/editors/space_graph/graph_slider_ops.c b/source/blender/editors/space_graph/graph_slider_ops.c index 733313dd06b..4b8c983a761 100644 --- a/source/blender/editors/space_graph/graph_slider_ops.c +++ b/source/blender/editors/space_graph/graph_slider_ops.c @@ -99,8 +99,10 @@ typedef struct tBeztCopyData { /** \name Utility Functions * \{ */ -/* Construct a list with the original bezt arrays so we can restore them during modal operation. - * The data is stored on the struct that is passed.*/ +/** + * Construct a list with the original bezt arrays so we can restore them during modal operation. + * The data is stored on the struct that is passed. + */ static void store_original_bezt_arrays(tGraphSliderOp *gso) { ListBase anim_data = {NULL, NULL}; diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index e7f35b856c0..07c25a57f08 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -2165,7 +2165,7 @@ static bool outliner_draw_warning_tree_element(uiBlock *block, const int te_ys) { if ((te->flag & TE_HAS_WARNING) == 0) { - /* If given element has no warning, recusively try to display the first sub-elements' warning. + /* If given element has no warning, recursively try to display the first sub-elements' warning. */ if (!TSELEM_OPEN(tselem, space_outliner)) { LISTBASE_FOREACH (TreeElement *, sub_te, &te->subtree) { @@ -3422,7 +3422,7 @@ static void outliner_draw_hierarchy_line( /* Small vertical padding. */ const short line_padding = UI_UNIT_Y / 4.0f; - /* >= is 1.0 for undashed lines. */ + /* >= is 1.0 for un-dashed lines. */ immUniform1f("dash_factor", draw_dashed ? 0.5f : 1.0f); immBegin(GPU_PRIM_LINES, 2); diff --git a/source/blender/editors/space_outliner/outliner_edit.cc b/source/blender/editors/space_outliner/outliner_edit.cc index 9a4ef1c5d2e..a10dbc94b34 100644 --- a/source/blender/editors/space_outliner/outliner_edit.cc +++ b/source/blender/editors/space_outliner/outliner_edit.cc @@ -1466,10 +1466,10 @@ static void outliner_find_panel( else { /* pop up panel - no previous, or user didn't want search after previous */ name[0] = '\0'; - /* XXX if (sbutton(name, 0, sizeof(name) - 1, "Find: ") && name[0]) { */ - /* te = outliner_find_name(space_outliner, &space_outliner->tree, name, flags, nullptr, &prevFound); */ - /* } */ - /* else return; XXX RETURN! XXX */ + // XXX if (sbutton(name, 0, sizeof(name) - 1, "Find: ") && name[0]) { + // te = outliner_find_name(space_outliner, &space_outliner->tree, name, flags, nullptr, &prevFound); + // } + // else return; XXX RETURN! XXX } /* do selection and reveal */ @@ -1485,7 +1485,7 @@ static void outliner_find_panel( outliner_flag_set(space_outliner, &space_outliner->tree, TSE_SELECTED, 0); tselem->flag |= TSE_SELECTED; - /* make te->ys center of view */ + /* Make `te->ys` center of view. */ ytop = (int)(te->ys + BLI_rctf_size_y(®ion->v2d.mask) / 2); if (ytop > 0) { ytop = 0; @@ -1493,7 +1493,7 @@ static void outliner_find_panel( region->v2d.cur.ymax = (float)ytop; region->v2d.cur.ymin = (float)(ytop - BLI_rctf_size_y(®ion->v2d.mask)); - /* make te->xs ==> te->xend center of view */ + /* Make `te->xs` ==> `te->xend` center of view. */ xdelta = (int)(te->xs - region->v2d.cur.xmin); region->v2d.cur.xmin += xdelta; region->v2d.cur.xmax += xdelta; diff --git a/source/blender/editors/space_outliner/outliner_intern.hh b/source/blender/editors/space_outliner/outliner_intern.hh index 24e86e06f68..a11f325ef05 100644 --- a/source/blender/editors/space_outliner/outliner_intern.hh +++ b/source/blender/editors/space_outliner/outliner_intern.hh @@ -594,7 +594,7 @@ TreeElement *outliner_find_item_at_x_in_row(const SpaceOutliner *space_outliner, bool *r_is_merged_icon, bool *r_is_over_icon); /** - * `tse` is not in the treestore, we use its contents to find a match. + * `tse` is not in the tree-store, we use its contents to find a match. */ TreeElement *outliner_find_tse(struct SpaceOutliner *space_outliner, const TreeStoreElem *tse); /** @@ -608,7 +608,7 @@ TreeElement *outliner_find_parent_element(ListBase *lb, TreeElement *parent_te, const TreeElement *child_te); /** - * Find treestore that refers to given ID. + * Find tree-store that refers to given ID. */ TreeElement *outliner_find_id(struct SpaceOutliner *space_outliner, ListBase *lb, @@ -633,7 +633,7 @@ bool outliner_tree_traverse(const SpaceOutliner *space_outliner, void *customdata); float outliner_restrict_columns_width(const struct SpaceOutliner *space_outliner); /** - * Find first tree element in tree with matching treestore flag. + * Find first tree element in tree with matching tree-store flag. */ TreeElement *outliner_find_element_with_flag(const ListBase *lb, short flag); /** diff --git a/source/blender/editors/space_outliner/outliner_select.cc b/source/blender/editors/space_outliner/outliner_select.cc index 887890090db..c2a7bfb9b37 100644 --- a/source/blender/editors/space_outliner/outliner_select.cc +++ b/source/blender/editors/space_outliner/outliner_select.cc @@ -355,7 +355,7 @@ static void tree_element_object_activate(bContext *C, } } else { - /* deleselect all */ + /* De-select all. */ /* Only in object mode so we can switch the active object, * keeping all objects in the current 'mode' selected, useful for multi-pose/edit mode. diff --git a/source/blender/editors/space_outliner/outliner_sync.cc b/source/blender/editors/space_outliner/outliner_sync.cc index 20806ff0a10..74416024b03 100644 --- a/source/blender/editors/space_outliner/outliner_sync.cc +++ b/source/blender/editors/space_outliner/outliner_sync.cc @@ -562,7 +562,7 @@ void outliner_sync_selection(const bContext *C, SpaceOutliner *space_outliner) outliner_sync_selection_to_outliner( view_layer, space_outliner, &space_outliner->tree, &active_data, &sync_types); - /* Keep any unsynced data in the dirty flag */ + /* Keep any un-synced data in the dirty flag. */ if (sync_types.object) { space_outliner->sync_select_dirty &= ~WM_OUTLINER_SYNC_SELECT_FROM_OBJECT; } diff --git a/source/blender/editors/space_outliner/outliner_utils.cc b/source/blender/editors/space_outliner/outliner_utils.cc index a097e86e2fa..86b56a7ec12 100644 --- a/source/blender/editors/space_outliner/outliner_utils.cc +++ b/source/blender/editors/space_outliner/outliner_utils.cc @@ -196,7 +196,7 @@ TreeElement *outliner_find_tse(SpaceOutliner *space_outliner, const TreeStoreEle return nullptr; } - /* check if 'tse' is in treestore */ + /* Check if 'tse' is in tree-store. */ tselem = BKE_outliner_treehash_lookup_any( space_outliner->runtime->treehash, tse->type, tse->nr, tse->id); if (tselem) { diff --git a/source/blender/editors/space_outliner/tree/tree_display.h b/source/blender/editors/space_outliner/tree/tree_display.h index 7b959576a4b..54a2516ca1c 100644 --- a/source/blender/editors/space_outliner/tree/tree_display.h +++ b/source/blender/editors/space_outliner/tree/tree_display.h @@ -54,7 +54,8 @@ bool outliner_tree_display_warnings_poll(const struct TreeDisplay *tree_display) * * \param r_icon The icon to display as warning. * \param r_message The message to display as warning. - * \return true if there is a warning, false otherwise. */ + * \return true if there is a warning, false otherwise. + */ bool outliner_element_warnings_get(struct TreeElement *te, int *r_icon, const char **r_message); /* The following functions are needed to build the tree. They are calls back into C; the way diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index c1b483f27e8..d43ff38edf9 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -1558,7 +1558,7 @@ static int sequencer_split_invoke(bContext *C, wmOperator *op, const wmEvent *ev } RNA_int_set(op->ptr, "channel", mouseloc[1]); RNA_enum_set(op->ptr, "side", split_side); - /*RNA_enum_set(op->ptr, "type", split_hard); */ + // RNA_enum_set(op->ptr, "type", split_hard); return sequencer_split_exec(C, op); } diff --git a/source/blender/editors/space_userpref/space_userpref.c b/source/blender/editors/space_userpref/space_userpref.c index 1711188fca7..b1ee6da1a33 100644 --- a/source/blender/editors/space_userpref/space_userpref.c +++ b/source/blender/editors/space_userpref/space_userpref.c @@ -113,9 +113,9 @@ static SpaceLink *userpref_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ static void userpref_main_region_init(wmWindowManager *wm, ARegion *region) { - /* do not use here, the properties changed in userprefs do a system-wide refresh, + /* do not use here, the properties changed in user-preferences do a system-wide refresh, * then scroller jumps back */ - /* region->v2d.flag &= ~V2D_IS_INIT; */ + // region->v2d.flag &= ~V2D_IS_INIT; region->v2d.scroll = V2D_SCROLL_RIGHT | V2D_SCROLL_VERTICAL_HIDE; diff --git a/source/blender/makesdna/DNA_space_defaults.h b/source/blender/makesdna/DNA_space_defaults.h index 8b5c6dc1de5..785abb39cc9 100644 --- a/source/blender/makesdna/DNA_space_defaults.h +++ b/source/blender/makesdna/DNA_space_defaults.h @@ -24,7 +24,7 @@ /* clang-format off */ /* -------------------------------------------------------------------- */ -/** \name Spaceclip Struct +/** \name SpaceClip Struct * \{ */ #define _DNA_DEFAULT_MaskSpaceInfo \ diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 543d69842be..41ba8119202 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -91,7 +91,7 @@ static void rna_Scene_frame_set(Scene *scene, Main *bmain, int frame, float subf if (!G.is_rendering) { /* can't use NC_SCENE|ND_FRAME because this causes wm_event_do_notifiers to call * BKE_scene_graph_update_for_newframe which will lose any un-keyed changes T24690. */ - /* WM_main_add_notifier(NC_SCENE|ND_FRAME, scene); */ + // WM_main_add_notifier(NC_SCENE|ND_FRAME, scene); /* instead just redraw the views */ WM_main_add_notifier(NC_WINDOW, NULL); diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c index 06edf6f443e..9e41d8c03fc 100644 --- a/source/blender/makesrna/intern/rna_wm_api.c +++ b/source/blender/makesrna/intern/rna_wm_api.c @@ -313,7 +313,7 @@ static wmKeyMapItem *rna_KeyMap_item_new_from_item(wmKeyMap *km, wmKeyMapItem *kmi_src, bool head) { - /* wmWindowManager *wm = CTX_wm_manager(C); */ + // wmWindowManager *wm = CTX_wm_manager(C); if ((km->flag & KEYMAP_MODAL) == (kmi_src->idname[0] != '\0')) { BKE_report(reports, RPT_ERROR, "Can not mix modal/non-modal items"); diff --git a/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc index 03fd9ac051e..f6be6c1e7fb 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc @@ -415,7 +415,7 @@ static void sort_vertex_polys(const Mesh &mesh, } } else { - /* Any polygon can be the first. Just need to check the orientation.*/ + /* Any polygon can be the first. Just need to check the orientation. */ const MLoop &first_loop = mesh.mloop[poly_vertex_corners[0].first]; const MLoop &second_loop = mesh.mloop[poly_vertex_corners[0].second]; if (first_loop.v == vertex_index) { diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c index ae42af7cd85..a86c2e3a35e 100644 --- a/source/blender/python/intern/bpy_operator.c +++ b/source/blender/python/intern/bpy_operator.c @@ -401,7 +401,7 @@ static PyObject *pyop_as_string(PyObject *UNUSED(self), PyObject *args) return NULL; } - /* WM_operator_properties_create(&ptr, opname); */ + // WM_operator_properties_create(&ptr, opname); /* Save another lookup */ RNA_pointer_create(NULL, ot->srna, NULL, &ptr); diff --git a/source/blender/python/intern/bpy_rna_array.c b/source/blender/python/intern/bpy_rna_array.c index 270c9ad431c..f3b1e357ebc 100644 --- a/source/blender/python/intern/bpy_rna_array.c +++ b/source/blender/python/intern/bpy_rna_array.c @@ -126,7 +126,7 @@ static int validate_array_type(PyObject *seq, ok = 0; } else if ((item_seq_size = PySequence_Size(item)) == -1) { - /* BLI_snprintf(error_str, error_str_size, "expected a sequence of %s", item_type_str); */ + // BLI_snprintf(error_str, error_str_size, "expected a sequence of %s", item_type_str); PyErr_Format(PyExc_TypeError, "%s expected a sequence of %s, not %s", error_prefix, diff --git a/source/blender/render/intern/texture_image.c b/source/blender/render/intern/texture_image.c index dfeaec2341e..6ded799b773 100644 --- a/source/blender/render/intern/texture_image.c +++ b/source/blender/render/intern/texture_image.c @@ -912,7 +912,7 @@ static void feline_eval(TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata (maxn ? (float)maxn : 1.0f); float du = maxn ? cosf(AFD->theta) * ll : 0.0f; float dv = maxn ? sinf(AFD->theta) * ll : 0.0f; - /* const float D = -0.5f*(du*du + dv*dv) / (AFD->majrad*AFD->majrad); */ + // const float D = -0.5f*(du*du + dv*dv) / (AFD->majrad*AFD->majrad); const float D = (EWA_MAXIDX + 1) * 0.25f * (du * du + dv * dv) / (AFD->majrad * AFD->majrad); float d; /* TXF alpha: cw = 0.0f; */ int n; /* TXF alpha: clip = 0; */ diff --git a/source/blender/simulation/intern/SIM_mass_spring.cpp b/source/blender/simulation/intern/SIM_mass_spring.cpp index 36513690584..73b287b4233 100644 --- a/source/blender/simulation/intern/SIM_mass_spring.cpp +++ b/source/blender/simulation/intern/SIM_mass_spring.cpp @@ -625,7 +625,7 @@ static void cloth_calc_force( } #endif - /* cloth_calc_volume_force(clmd); */ + // cloth_calc_volume_force(clmd); #ifdef CLOTH_FORCE_DRAG SIM_mass_spring_force_drag(data, drag); diff --git a/source/blender/simulation/intern/implicit_blender.c b/source/blender/simulation/intern/implicit_blender.c index add047bf8c8..95bf59101e6 100644 --- a/source/blender/simulation/intern/implicit_blender.c +++ b/source/blender/simulation/intern/implicit_blender.c @@ -830,7 +830,7 @@ static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, s_prev = s; s = dot_lfvector(r, r, numverts); - /* d = r+d*(s/s_prev); */ + // d = r+d*(s/s_prev); add_lfvector_lfvectorS(d, r, d, (s / s_prev), numverts); filter(d, S);