diff options
author | Campbell Barton <campbell@blender.org> | 2022-01-14 02:47:50 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-01-14 03:23:46 +0300 |
commit | cea588b9ef8f9bdb2729fb233d6f1ed0886700e1 (patch) | |
tree | fa0bfce1f026a4af40aaf72eecd6fde101d8b938 /source/blender/editors | |
parent | 7a0cf2c72f58be31824f5c3b17844ba54797b594 (diff) |
Cleanup: spelling in comments, C++ style comments for disabled code
Also ensure space at end of comment.
Diffstat (limited to 'source/blender/editors')
20 files changed, 44 insertions, 37 deletions
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<ActKeyColumn *> 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; |