diff --git a/scripts/templates_py/ui_list.py b/scripts/templates_py/ui_list.py index c5700e9970c..17e236e14ec 100644 --- a/scripts/templates_py/ui_list.py +++ b/scripts/templates_py/ui_list.py @@ -31,13 +31,14 @@ class MESH_UL_mylist(bpy.types.UIList): # This function gets the collection property (as the usual tuple (data, propname)), and must return two lists: # * The first one is for filtering, it must contain 32bit integers were self.bitflag_filter_item marks the # matching item as filtered (i.e. to be shown). The upper 16 bits (including self.bitflag_filter_item) are - # reseverd for internal use, the lower 16 bits are free for custom use. Here we use the first bit to mark + # reserved for internal use, the lower 16 bits are free for custom use. Here we use the first bit to mark # VGROUP_EMPTY. # * The second one is for reordering, it must return a list containing the new indices of the items (which # gives us a mapping org_idx -> new_idx). - # Please note that the default UI_UL_list defines helper functions for common tasks (see its doc for more info). - # If you do not make filtering and/or ordering, return empty list(s) (this will be more efficient than - # returning full lists doing nothing!). + # Please note that the default `UI_UL_list` defines helper functions for common tasks + # (see its doc for more info). + # If you do not make filtering and/or ordering, return empty list(s) + # (this will be more efficient than returning full lists doing nothing!). # Default return values. flt_flags = [] diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h index 284f9bb0b23..31617dd56b5 100644 --- a/source/blender/blenkernel/BKE_animsys.h +++ b/source/blender/blenkernel/BKE_animsys.h @@ -34,7 +34,7 @@ struct PropertyRNA; struct bAction; struct bActionGroup; -/* Container for data required to do FCurve and Driver evaluation. */ +/** Container for data required to do FCurve and Driver evaluation. */ typedef struct AnimationEvalContext { /* For drivers, so that they have access to the dependency graph and the current view layer. See * #77086. */ diff --git a/source/blender/blenkernel/BKE_mesh_mapping.hh b/source/blender/blenkernel/BKE_mesh_mapping.hh index 175942dfa64..816f0e25a10 100644 --- a/source/blender/blenkernel/BKE_mesh_mapping.hh +++ b/source/blender/blenkernel/BKE_mesh_mapping.hh @@ -24,27 +24,29 @@ struct UvMapVert { bool separate; }; -/* Map from uv vertex to face. Used by select linked, uv subdivision-surface and obj exporter. */ +/** Map from UV vertex to face. Used by select linked, UV subdivision-surface and obj exporter. */ struct UvVertMap { UvMapVert **vert; UvMapVert *buf; }; -/* UvElement stores per uv information so that we can quickly access information for a uv. +/** + * UvElement stores per uv information so that we can quickly access information for a uv. * it is actually an improved UvMapVert, including an island and a direct pointer to the face - * to avoid initializing face arrays */ + * to avoid initializing face arrays. + */ struct UvElement { - /* Next UvElement corresponding to same vertex */ + /** Next UvElement corresponding to same vertex */ UvElement *next; - /* Face the element belongs to */ + /** Face the element belongs to */ BMLoop *l; - /* index in loop. */ + /** Index in loop. */ unsigned short loop_of_face_index; - /* Whether this element is the first of coincident elements */ + /** Whether this element is the first of coincident elements */ bool separate; - /* general use flag */ + /** general use flag. */ unsigned char flag; - /* If generating element map with island sorting, this stores the island index */ + /** If generating element map with island sorting, this stores the island index */ unsigned int island; }; diff --git a/source/blender/blenkernel/nla_private.h b/source/blender/blenkernel/nla_private.h index 0ee2cf48404..e7f6b4f1a06 100644 --- a/source/blender/blenkernel/nla_private.h +++ b/source/blender/blenkernel/nla_private.h @@ -20,20 +20,25 @@ struct AnimationEvalContext; /* --------------- NLA Evaluation DataTypes ----------------------- */ -/* used for list of strips to accumulate at current time */ +/** Used for list of strips to accumulate at current time. */ typedef struct NlaEvalStrip { struct NlaEvalStrip *next, *prev; - NlaTrack *track; /* Track that this strip belongs to. */ - NlaStrip *strip; /* Strip that's being used. */ + /** Track that this strip belongs to. */ + NlaTrack *track; + /** Strip that's being used. */ + NlaStrip *strip; - short track_index; /* The index of the track within the list. */ - short strip_mode; /* Which end of the strip are we looking at. */ + /** The index of the track within the list. */ + short track_index; + /** Which end of the strip are we looking at. */ + short strip_mode; - float strip_time; /* Time at which this strip is being evaluated. */ + /** Time at which this strip is being evaluated. */ + float strip_time; } NlaEvalStrip; -/* NlaEvalStrip->strip_mode */ +/** #NlaEvalStrip::strip_mode. */ enum eNlaEvalStrip_StripMode { /* standard evaluation */ NES_TIME_BEFORE = -1, @@ -48,19 +53,19 @@ enum eNlaEvalStrip_StripMode { struct NlaEvalChannel; struct NlaEvalData; -/* Unique channel key for GHash. */ +/** Unique channel key for GHash. */ typedef struct NlaEvalChannelKey { struct PointerRNA ptr; struct PropertyRNA *prop; } NlaEvalChannelKey; -/* Bitmask of array indices touched by actions. */ +/** Bitmask of array indices touched by actions. */ typedef struct NlaValidMask { BLI_bitmap *ptr; BLI_bitmap buffer[sizeof(uint64_t) / sizeof(BLI_bitmap)]; } NlaValidMask; -/* Set of property values for blending. */ +/** Set of property values for blending. */ typedef struct NlaEvalChannelSnapshot { struct NlaEvalChannel *channel; @@ -78,7 +83,7 @@ typedef struct NlaEvalChannelSnapshot { /* Memory over-allocated to provide space for values. */ } NlaEvalChannelSnapshot; -/* NlaEvalChannel->mix_mode */ +/** #NlaEvalChannel::mix_mode */ enum eNlaEvalChannel_MixMode { NEC_MIX_ADD, NEC_MIX_MULTIPLY, @@ -86,8 +91,10 @@ enum eNlaEvalChannel_MixMode { NEC_MIX_AXIS_ANGLE, }; -/* Temp channel for accumulating data from NLA for a single property. - * Handles array properties as a unit to allow intelligent blending. */ +/** + * Temp channel for accumulating data from NLA for a single property. + * Handles array properties as a unit to allow intelligent blending. + */ typedef struct NlaEvalChannel { struct NlaEvalChannel *next, *prev; struct NlaEvalData *owner; @@ -108,7 +115,7 @@ typedef struct NlaEvalChannel { /* Memory over-allocated to provide space for base_snapshot.values. */ } NlaEvalChannel; -/* Set of values for all channels. */ +/** Set of values for all channels. */ typedef struct NlaEvalSnapshot { /* Snapshot this one defaults to. */ struct NlaEvalSnapshot *base; @@ -117,7 +124,7 @@ typedef struct NlaEvalSnapshot { NlaEvalChannelSnapshot **channels; } NlaEvalSnapshot; -/* Set of all channels covered by NLA. */ +/** Set of all channels covered by NLA. */ typedef struct NlaEvalData { ListBase channels; @@ -133,7 +140,7 @@ typedef struct NlaEvalData { NlaEvalSnapshot eval_snapshot; } NlaEvalData; -/* Information about the currently edited strip and ones below it for keyframing. */ +/** Information about the currently edited strip and ones below it for keyframing. */ typedef struct NlaKeyframingContext { struct NlaKeyframingContext *next, *prev; @@ -180,11 +187,12 @@ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list, */ enum eNlaStripEvaluate_Mode { - /* Blend upper strip with lower stack. */ + /** Blend upper strip with lower stack. */ STRIP_EVAL_BLEND, - /* Given upper strip and blended snapshot, solve for lower stack. */ + /** Given upper strip and blended snapshot, solve for lower stack. */ STRIP_EVAL_BLEND_GET_INVERTED_LOWER_SNAPSHOT, - /* Store strip fcurve values in snapshot, properly marking blend_domain values. + /** + * Store strip fcurve values in snapshot, properly marking blend_domain values. * * Currently only used for transitions to distinguish fcurve sampled values from default or lower * stack values. diff --git a/source/blender/compositor/operations/COM_SMAAOperation.cc b/source/blender/compositor/operations/COM_SMAAOperation.cc index bb96c20c94d..c572681ed1e 100644 --- a/source/blender/compositor/operations/COM_SMAAOperation.cc +++ b/source/blender/compositor/operations/COM_SMAAOperation.cc @@ -56,7 +56,7 @@ * |output| * * Note that each [pass] has its own vertex and pixel shader. Remember to use - * oversized triangles instead of quads to avoid overshading along the + * over-sized triangles instead of quads to avoid over-shading along the * diagonal. * * You've three edge detection methods to choose from: luma, color or depth. @@ -72,7 +72,7 @@ * - Color edge detection is usually the most expensive one but catches * chroma-only edges. * - * For quickstarters: just use luma edge detection. + * For quick-starters: just use luma edge detection. * * The general advice is to not rush the integration process and ensure each * step is done correctly (don't try to integrate SMAA T2x with predicated edge @@ -119,7 +119,7 @@ * of the input read and the output write in * 'SMAANeighborhoodBlending' (and only in this pass!). If sRGB reads in * this last pass are not possible, the technique will work anyway, but - * will perform antialiasing in gamma space. + * will perform anti-aliasing in gamma space. * * IMPORTANT: for best results the input read for the color/luma edge * detection should *NOT* be sRGB. @@ -151,7 +151,7 @@ * * Note that SMAA_RT_METRICS doesn't need to be a macro, it can be a * uniform variable. The code is designed to minimize the impact of not - * using a constant value, but it is still better to hardcode it. + * using a constant value, but it is still better to hard-code it. * * Depending on how you encoded 'areaTex' and 'searchTex', you may have to * add (and customize) the following defines before including SMAA.h: @@ -372,7 +372,7 @@ * * In number of pixels, it's actually the double. So the maximum line length * perfectly handled by, for example 16, is 64 (by perfectly, we meant that - * longer lines won't look as good, but still antialiased). + * longer lines won't look as good, but still anti-aliased). * * Range: [0, 112] */ diff --git a/source/blender/editors/animation/keyframes_draw.cc b/source/blender/editors/animation/keyframes_draw.cc index 55a7e36e12b..8627a625025 100644 --- a/source/blender/editors/animation/keyframes_draw.cc +++ b/source/blender/editors/animation/keyframes_draw.cc @@ -493,7 +493,7 @@ static void prepare_channel_for_drawing(ChannelListElement *elem) ED_keylist_prepare_for_direct_access(elem->keylist); } -/* List of channels that are actually drawn because they are in view. */ +/** List of channels that are actually drawn because they are in view. */ struct ChannelDrawList { ListBase /*ChannelListElement*/ channels; }; diff --git a/source/blender/editors/animation/keyframes_general.cc b/source/blender/editors/animation/keyframes_general.cc index fca15638ad9..81dc82bf632 100644 --- a/source/blender/editors/animation/keyframes_general.cc +++ b/source/blender/editors/animation/keyframes_general.cc @@ -514,10 +514,6 @@ static float butterworth_calculate_blend_value(float *samples, return 0; } -/** - * \param samples: Are expected to start at the first frame of the segment with a buffer of size - * `segment->filter_order` at the left. - */ void butterworth_smooth_fcurve_segment(FCurve *fcu, FCurveSegment *segment, float *samples, @@ -687,7 +683,7 @@ void ease_fcurve_segment(FCurve *fcu, return; } - /* Using the factor on the xshift we are basicaly moving the curve horizontaly. */ + /* Using the factor on the X-shift we are basically moving the curve horizontally. */ const float shift = -factor; const float y_min = ease_sigmoid_function(-1, width, shift); const float y_max = ease_sigmoid_function(1, width, shift); diff --git a/source/blender/editors/asset/ED_asset_list.hh b/source/blender/editors/asset/ED_asset_list.hh index c57261b754f..e9cbe8ade4a 100644 --- a/source/blender/editors/asset/ED_asset_list.hh +++ b/source/blender/editors/asset/ED_asset_list.hh @@ -40,7 +40,7 @@ void asset_reading_region_listen_fn(const wmRegionListenerParams *params); asset_system::AssetLibrary *library_get_once_available( const AssetLibraryReference &library_reference); -/* Can return false to stop iterating. */ +/** Can return false to stop iterating. */ using AssetListHandleIterFn = FunctionRef; using AssetListIterFn = FunctionRef; diff --git a/source/blender/editors/asset/ED_asset_mark_clear.hh b/source/blender/editors/asset/ED_asset_mark_clear.hh index 69b575119d4..01e66e8fe24 100644 --- a/source/blender/editors/asset/ED_asset_mark_clear.hh +++ b/source/blender/editors/asset/ED_asset_mark_clear.hh @@ -16,16 +16,16 @@ struct bContext; namespace blender::ed::asset { /** - * Mark the datablock as asset. + * Mark the data-block as asset. * - * To ensure the datablock is saved, this sets Fake User. + * To ensure the data-block is saved, this sets Fake User. * - * \return whether the datablock was marked as asset; false when it is not capable of becoming an + * \return whether the data-block was marked as asset; false when it is not capable of becoming an * asset, or when it already was an asset. */ bool mark_id(ID *id); /** - * Generate preview image for the given datablock. + * Generate preview image for the given data-block. * * The preview image might be generated using a background thread. */ @@ -34,7 +34,7 @@ void generate_preview(const bContext *C, ID *id); /** * Remove the asset metadata, turning the ID into a "normal" ID. * - * This clears the Fake User. If for some reason the datablock is meant to be saved anyway, the + * This clears the Fake User. If for some reason the data-block 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. diff --git a/source/blender/editors/asset/ED_asset_type.hh b/source/blender/editors/asset/ED_asset_type.hh index 6e13ffe7e2f..bc77dc35a3a 100644 --- a/source/blender/editors/asset/ED_asset_type.hh +++ b/source/blender/editors/asset/ED_asset_type.hh @@ -34,7 +34,7 @@ int64_t types_supported_as_filter_flags(); /** * Utility: A string enumerating the non-experimental asset types. This is useful info to - * the user, it should be displayed in tooltips or messages. Macro to support concatenating static + * the user, it should be displayed in tool-tips or messages. Macro to support concatenating static * strings with this (not all UI code supports dynamic strings nicely). * Should start with a consonant, so usages can prefix it with "a" (not "an"). */ diff --git a/source/blender/editors/grease_pencil/intern/grease_pencil_geom.cc b/source/blender/editors/grease_pencil/intern/grease_pencil_geom.cc index 57a3066266f..1776cfcf432 100644 --- a/source/blender/editors/grease_pencil/intern/grease_pencil_geom.cc +++ b/source/blender/editors/grease_pencil/intern/grease_pencil_geom.cc @@ -21,17 +21,6 @@ extern "C" { namespace blender::ed::greasepencil { -/** - * An implementation of the Ramer-Douglas-Peucker algorithm. - * - * \param range: The range to simplify. - * \param epsilon: The threshold distance from the coord between two points for when a point - * in-between needs to be kept. - * \param dist_function: A function that computes the distance to a point at an index in the range. - * The IndexRange is a subrange of \a range and the index is an index relative to the subrange. - * \param points_to_delete: Writes true to the indices for which the points should be removed. - * \returns the total number of points to remove. - */ int64_t ramer_douglas_peucker_simplify( const IndexRange range, const float epsilon, diff --git a/source/blender/editors/include/ED_anim_api.hh b/source/blender/editors/include/ED_anim_api.hh index eab8461290b..6e5d016408a 100644 --- a/source/blender/editors/include/ED_anim_api.hh +++ b/source/blender/editors/include/ED_anim_api.hh @@ -98,19 +98,30 @@ struct bAnimContext { ReportList *reports; }; -/* Main Data container types */ +/** Main Data container types. */ enum eAnimCont_Types { - ANIMCONT_NONE = 0, /* invalid or no data */ - ANIMCONT_ACTION = 1, /* action (#bAction) */ - ANIMCONT_SHAPEKEY = 2, /* shape-key (#Key) */ - ANIMCONT_GPENCIL = 3, /* grease pencil (screen) */ - ANIMCONT_DOPESHEET = 4, /* dope-sheet (#bDopesheet) */ - ANIMCONT_FCURVES = 5, /* animation F-Curves (#bDopesheet) */ - ANIMCONT_DRIVERS = 6, /* drivers (#bDopesheet) */ - ANIMCONT_NLA = 7, /* NLA (#bDopesheet) */ - ANIMCONT_CHANNEL = 8, /* animation channel (#bAnimListElem) */ - ANIMCONT_MASK = 9, /* mask dope-sheet */ - ANIMCONT_TIMELINE = 10, /* "timeline" editor (#bDopeSheet) */ + /** Invalid or no data. */ + ANIMCONT_NONE = 0, + /** Action (#bAction). */ + ANIMCONT_ACTION = 1, + /** Shape-key (#Key). */ + ANIMCONT_SHAPEKEY = 2, + /** Grease pencil (screen). */ + ANIMCONT_GPENCIL = 3, + /** Dope-sheet (#bDopesheet). */ + ANIMCONT_DOPESHEET = 4, + /** Animation F-Curves (#bDopesheet). */ + ANIMCONT_FCURVES = 5, + /** Drivers (#bDopesheet). */ + ANIMCONT_DRIVERS = 6, + /** NLA (#bDopesheet). */ + ANIMCONT_NLA = 7, + /** Animation channel (#bAnimListElem). */ + ANIMCONT_CHANNEL = 8, + /** Mask dope-sheet. */ + ANIMCONT_MASK = 9, + /** "timeline" editor (#bDopeSheet). */ + ANIMCONT_TIMELINE = 10, }; /** \} */ @@ -247,7 +258,7 @@ enum eAnim_ChannelType { ANIMTYPE_NUM_TYPES, }; -/* types of keyframe data in bAnimListElem */ +/** Types of keyframe data in #bAnimListElem. */ enum eAnim_KeyType { ALE_NONE = 0, /* no keyframe data */ ALE_FCURVE, /* F-Curve */ @@ -272,9 +283,12 @@ enum eAnim_KeyType { * For use with ANIM_animdata_update() */ enum eAnim_Update_Flags { - ANIM_UPDATE_DEPS = (1 << 0), /* referenced data and dependencies get refreshed */ - ANIM_UPDATE_ORDER = (1 << 1), /* keyframes need to be sorted */ - ANIM_UPDATE_HANDLES = (1 << 2), /* recalculate handles */ + /** Referenced data and dependencies get refreshed. */ + ANIM_UPDATE_DEPS = (1 << 0), + /** Keyframes need to be sorted. */ + ANIM_UPDATE_ORDER = (1 << 1), + /** Recalculate handles. */ + ANIM_UPDATE_HANDLES = (1 << 2), }; /* used for most tools which change keyframes (flushed by ANIM_animdata_update) */ diff --git a/source/blender/editors/include/ED_armature.hh b/source/blender/editors/include/ED_armature.hh index ffdaf5ae438..285c3cfe0af 100644 --- a/source/blender/editors/include/ED_armature.hh +++ b/source/blender/editors/include/ED_armature.hh @@ -192,7 +192,7 @@ void ED_object_vgroup_calc_from_armature(ReportList *reports, int mode, bool mirror); -/* editarmature_undo.cc */ +/* `editarmature_undo.cc` */ /** Export for ED_undo_sys. */ void ED_armature_undosys_type(UndoType *ut); @@ -331,7 +331,7 @@ void ED_pose_bone_select_tag_update(Object *ob); */ void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select, bool change_active); -/* meshlaplacian.cc */ +/* `meshlaplacian.cc` */ void ED_mesh_deform_bind_callback(Object *object, MeshDeformModifierData *mmd, diff --git a/source/blender/editors/include/ED_clip.hh b/source/blender/editors/include/ED_clip.hh index 695c23bd2d8..06831ba5654 100644 --- a/source/blender/editors/include/ED_clip.hh +++ b/source/blender/editors/include/ED_clip.hh @@ -19,51 +19,65 @@ struct bScreen; /* `clip_editor.cc` */ -/* Returns true when the following conditions are met: +/** + * Returns true when the following conditions are met: * - Current space is Space Clip. - * - There is a movie clip opened in it. */ + * - There is a movie clip opened in it. + */ bool ED_space_clip_poll(bContext *C); -/* Returns true when the following conditions are met: +/** + * Returns true when the following conditions are met: * - Current space is Space Clip. * - It is set to Clip view. * - * It is not required to have movie clip opened for editing. */ + * It is not required to have movie clip opened for editing. + */ bool ED_space_clip_view_clip_poll(bContext *C); -/* Returns true when the following conditions are met: +/** + * Returns true when the following conditions are met: * - Current space is Space Clip. * - It is set to Tracking mode. * - * It is not required to have movie clip opened for editing. */ + * It is not required to have movie clip opened for editing. + */ bool ED_space_clip_tracking_poll(bContext *C); -/* Returns true when the following conditions are met: +/** + * Returns true when the following conditions are met: * - Current space is Space Clip. * - It is set to Mask mode. * - * It is not required to have mask opened for editing. */ + * It is not required to have mask opened for editing. + */ bool ED_space_clip_maskedit_poll(bContext *C); -/* Returns true when the following conditions are met: +/** + * Returns true when the following conditions are met: * - Current space is Space Clip. * - It is set to Mask mode. * - Mask has visible and editable splines. * - * It is not required to have mask opened for editing. */ + * It is not required to have mask opened for editing. + */ bool ED_space_clip_maskedit_visible_splines_poll(bContext *C); -/* Returns true when the following conditions are met: - * - Current space is Space Clip. - * - It is set to Mask mode. - * - The space has mask opened. */ -bool ED_space_clip_maskedit_mask_poll(bContext *C); - -/* Returns true when the following conditions are met: +/** + * Returns true when the following conditions are met: * - Current space is Space Clip. * - It is set to Mask mode. * - The space has mask opened. - * - Mask has visible and editable splines. */ + */ +bool ED_space_clip_maskedit_mask_poll(bContext *C); + +/** + * Returns true when the following conditions are met: + * - Current space is Space Clip. + * - It is set to Mask mode. + * - The space has mask opened. + * - Mask has visible and editable splines. + */ bool ED_space_clip_maskedit_mask_visible_splines_poll(bContext *C); void ED_space_clip_get_size(const SpaceClip *sc, int *r_width, int *r_height); @@ -132,20 +146,23 @@ void ED_space_clip_set_clip(bContext *C, bScreen *screen, SpaceClip *sc, MovieCl Mask *ED_space_clip_get_mask(const SpaceClip *sc); void ED_space_clip_set_mask(bContext *C, SpaceClip *sc, Mask *mask); -/* Locked state is used to preserve current clip editor viewport upon changes. Example usage: +/** + * Locked state is used to preserve current clip editor viewport upon changes. Example usage: * - * ... + * \code{.cc} + * ... * - * ClipViewLockState lock_state; - * ED_clip_view_lock_state_store(C, &lock_state); + * ClipViewLockState lock_state; + * ED_clip_view_lock_state_store(C, &lock_state); * - * + * * - * ED_clip_view_lock_state_restore_no_jump(C, &lock_state); + * ED_clip_view_lock_state_restore_no_jump(C, &lock_state); + * \endcode * - * These function are to be used from space clip editor context only. Otherwise debug builds will - * assert, release builds will crash. */ - + * These function are to be used from space clip editor context only. + * Otherwise debug builds will assert, release builds will crash. + */ struct ClipViewLockState { float offset_x, offset_y; float lock_offset_x, lock_offset_y; diff --git a/source/blender/editors/include/ED_curve.hh b/source/blender/editors/include/ED_curve.hh index 087294ebccb..98272ffc5c1 100644 --- a/source/blender/editors/include/ED_curve.hh +++ b/source/blender/editors/include/ED_curve.hh @@ -80,7 +80,7 @@ bool ED_curve_select_all(EditNurb *editnurb); bool ED_curve_select_swap(EditNurb *editnurb, bool hide_handles); int ED_curve_select_count(const View3D *v3d, const EditNurb *editnurb); -/* editcurve_undo.cc */ +/* `editcurve_undo.cc` */ /** Export for ED_undo_sys */ void ED_curve_undosys_type(UndoType *ut); diff --git a/source/blender/editors/include/ED_file_indexer.hh b/source/blender/editors/include/ED_file_indexer.hh index 35bb877f4cd..46ad628d927 100644 --- a/source/blender/editors/include/ED_file_indexer.hh +++ b/source/blender/editors/include/ED_file_indexer.hh @@ -117,7 +117,7 @@ struct FileIndexerType { FileIndexerUpdateIndexFunc update_index; }; -/* file_indexer.cc */ +/* `file_indexer.cc` */ /** Removes all entries inside the given `indexer_entries`. */ void ED_file_indexer_entries_clear(FileIndexerEntries *indexer_entries); diff --git a/source/blender/editors/include/ED_fileselect.hh b/source/blender/editors/include/ED_fileselect.hh index b52b2d254c1..7a67bef12f6 100644 --- a/source/blender/editors/include/ED_fileselect.hh +++ b/source/blender/editors/include/ED_fileselect.hh @@ -48,17 +48,17 @@ struct FileAttributeColumn { const char *name; float width; - /* The sort type to use when sorting by this column. */ + /** The sort type to use when sorting by this column. */ int sort_type; /* eFileSortType */ - /* Alignment of column texts, header text is always left aligned */ + /** Alignment of column texts, header text is always left aligned */ int text_align; /* eFontStyle_Align */ }; struct FileLayout { /* view settings - XXX: move into its own struct. */ int offset_top; - /* Height of the header for the different FileAttributeColumn's. */ + /** Height of the header for the different FileAttributeColumn's. */ int attribute_column_header_h; int prv_w; int prv_h; @@ -69,19 +69,23 @@ struct FileLayout { int prv_border_x; int prv_border_y; int rows; - /* Those are the major layout columns the files are distributed across, not to be confused with - * 'attribute_columns' array below. */ + /** + * Those are the major layout columns the files are distributed across, + * not to be confused with `attribute_columns` array below. + */ int flow_columns; int width; int height; int flag; int dirty; int textheight; - /* The columns for each item (name, modification date/time, size). Not to be confused with the - * 'flow_columns' above. */ + /** + * The columns for each item (name, modification date/time, size). + * Not to be confused with the `flow_columns` above. + */ FileAttributeColumn attribute_columns[ATTRIBUTE_COLUMN_MAX]; - /* When we change display size, we may have to update static strings like size of files... */ + /** When we change display size, we may have to update static strings like size of files. */ short curr_size; }; @@ -229,7 +233,7 @@ enum FSMenuCategory { FS_CATEGORY_SYSTEM_BOOKMARKS, FS_CATEGORY_BOOKMARKS, FS_CATEGORY_RECENT, - /* For internal use, a list of known paths that are used to match paths to icons and names. */ + /** For internal use, a list of known paths that are used to match paths to icons and names. */ FS_CATEGORY_OTHER, }; diff --git a/source/blender/editors/include/ED_gizmo_library.hh b/source/blender/editors/include/ED_gizmo_library.hh index 0a855984bd6..335104217de 100644 --- a/source/blender/editors/include/ED_gizmo_library.hh +++ b/source/blender/editors/include/ED_gizmo_library.hh @@ -60,9 +60,9 @@ enum { /* transform */ enum { - /* inverted offset during interaction - if set it also sets constrained below */ + /** Inverted offset during interaction - if set it also sets constrained below. */ ED_GIZMO_ARROW_XFORM_FLAG_INVERTED = (1 << 3), - /* clamp arrow interaction to property width */ + /** Clamp arrow interaction to property width. */ ED_GIZMO_ARROW_XFORM_FLAG_CONSTRAINED = (1 << 4), }; @@ -99,12 +99,14 @@ enum { /* draw_style */ enum { - /* Display the hover region (edge or corner) of the underlying bounding box. */ + /** Display the hover region (edge or corner) of the underlying bounding box. */ ED_GIZMO_CAGE2D_STYLE_BOX = 0, - /* Display the bounding box plus dots on four corners while hovering, usually used for - * transforming a 2D shape. */ + /** + * Display the bounding box plus dots on four corners while hovering, + * usually used for transforming a 2D shape. + */ ED_GIZMO_CAGE2D_STYLE_BOX_TRANSFORM, - /* Display the bounding circle while hovering. */ + /** Display the bounding circle while hovering. */ ED_GIZMO_CAGE2D_STYLE_CIRCLE, }; diff --git a/source/blender/editors/include/ED_gpencil_legacy.hh b/source/blender/editors/include/ED_gpencil_legacy.hh index 9e8d42117b9..644b751a7a5 100644 --- a/source/blender/editors/include/ED_gpencil_legacy.hh +++ b/source/blender/editors/include/ED_gpencil_legacy.hh @@ -45,19 +45,19 @@ struct wmOperator; #define GPENCIL_MINIMUM_JOIN_DIST 20.0f -/* Reproject stroke modes. */ +/** Reproject stroke modes. */ enum eGP_ReprojectModes { /* Axis */ GP_REPROJECT_FRONT = 0, GP_REPROJECT_SIDE, GP_REPROJECT_TOP, - /* On same plane, parallel to view-plane. */ + /** On same plane, parallel to view-plane. */ GP_REPROJECT_VIEW, - /* Reprojected on to the scene geometry */ + /** Re-projected on to the scene geometry. */ GP_REPROJECT_SURFACE, - /* Reprojected on 3D cursor orientation */ + /** Re-projected on 3D cursor orientation. */ GP_REPROJECT_CURSOR, - /* Keep equals (used in some operators) */ + /** Keep equals (used in some operators). */ GP_REPROJECT_KEEP, }; @@ -69,7 +69,8 @@ enum eGP_TargetObjectMode { /* ------------- Grease-Pencil Runtime Data ---------------- */ -/* Temporary 'Stroke Point' data (2D / screen-space) +/** + * Temporary 'Stroke Point' data (2D / screen-space) * * Used as part of the 'stroke cache' used during drawing of new strokes */ @@ -176,11 +177,11 @@ bool ED_gpencil_layer_has_selected_stroke(const bGPDlayer *gpl, bool is_multiedi * TODO: do we need additional flags for screen-space vs data-space?. */ bool ED_gpencil_stroke_can_use_direct(const ScrArea *area, const bGPDstroke *gps); -/* Check whether given stroke can be edited in the current context */ +/** Check whether given stroke can be edited in the current context */ bool ED_gpencil_stroke_can_use(const bContext *C, const bGPDstroke *gps); -/* Check whether given stroke can be edited for the current color */ +/** Check whether given stroke can be edited for the current color */ bool ED_gpencil_stroke_material_editable(Object *ob, const bGPDlayer *gpl, const bGPDstroke *gps); -/* Check whether given stroke is visible for the current material. */ +/** Check whether given stroke is visible for the current material. */ bool ED_gpencil_stroke_material_visible(Object *ob, const bGPDstroke *gps); /* ----------- Grease Pencil Operators ----------------- */ diff --git a/source/blender/editors/include/ED_grease_pencil.hh b/source/blender/editors/include/ED_grease_pencil.hh index db2e62493e2..521db915ef6 100644 --- a/source/blender/editors/include/ED_grease_pencil.hh +++ b/source/blender/editors/include/ED_grease_pencil.hh @@ -120,9 +120,11 @@ bool mirror_selected_frames(GreasePencil &grease_pencil, Scene &scene, const eEditKeyframes_Mirror mode); -/* Creates duplicate frames for each selected frame in the layer. The duplicates are stored in the - * LayerTransformData structure of the layer runtime data. This function also deselects the - * selected frames, while keeping the duplicates selected. */ +/** + * Creates duplicate frames for each selected frame in the layer. + * The duplicates are stored in the LayerTransformData structure of the layer runtime data. + * This function also deselects the selected frames, while keeping the duplicates selected. + */ bool duplicate_selected_frames(GreasePencil &grease_pencil, bke::greasepencil::Layer &layer); bool remove_all_selected_frames(GreasePencil &grease_pencil, bke::greasepencil::Layer &layer); @@ -228,10 +230,21 @@ void create_blank(Main &bmain, Object &object, int frame_number); void create_stroke(Main &bmain, Object &object, const float4x4 &matrix, int frame_number); void create_suzanne(Main &bmain, Object &object, const float4x4 &matrix, int frame_number); +/** + * An implementation of the Ramer-Douglas-Peucker algorithm. + * + * \param range: The range to simplify. + * \param epsilon: The threshold distance from the coord between two points for when a point + * in-between needs to be kept. + * \param dist_function: A function that computes the distance to a point at an index in the range. + * The IndexRange is a subrange of \a range and the index is an index relative to the subrange. + * \param points_to_delete: Writes true to the indices for which the points should be removed. + * \returns the total number of points to remove. + */ int64_t ramer_douglas_peucker_simplify(IndexRange range, float epsilon, FunctionRef dist_function, - MutableSpan dst); + MutableSpan points_to_delete); Array polyline_fit_curve(Span points, float error_threshold, diff --git a/source/blender/editors/include/ED_image.hh b/source/blender/editors/include/ED_image.hh index 672185490af..ba24c34872d 100644 --- a/source/blender/editors/include/ED_image.hh +++ b/source/blender/editors/include/ED_image.hh @@ -119,36 +119,44 @@ bool ED_space_image_paint_curve(const bContext *C); */ bool ED_space_image_check_show_maskedit(SpaceImage *sima, Object *obedit); -/* Returns true when the following conditions are met: +/** + * Returns true when the following conditions are met: * - Current space is Image Editor. * - The image editor is not a UV Editor. * - It is set to Mask mode. * - * It is not required to have mask opened for editing. */ + * It is not required to have mask opened for editing. + */ bool ED_space_image_maskedit_poll(bContext *C); -/* Returns true when the following conditions are met: +/** + * Returns true when the following conditions are met: * - Current space is Image Editor. * - The image editor is not a UV Editor. * - It is set to Mask mode. * - Mask has visible and editable splines. * - * It is not required to have mask opened for editing. */ + * It is not required to have mask opened for editing. + */ bool ED_space_image_maskedit_visible_splines_poll(bContext *C); -/* Returns true when the following conditions are met: - * - Current space is Image Editor. - * - The image editor is not an UV Editor. - * - It is set to Mask mode. - * - The space has mask opened. */ -bool ED_space_image_maskedit_mask_poll(bContext *C); - -/* Returns true when the following conditions are met: +/** + * Returns true when the following conditions are met: * - Current space is Image Editor. * - The image editor is not an UV Editor. * - It is set to Mask mode. * - The space has mask opened. - * - Mask has visible and editable splines. */ + */ +bool ED_space_image_maskedit_mask_poll(bContext *C); + +/** + * Returns true when the following conditions are met: + * - Current space is Image Editor. + * - The image editor is not an UV Editor. + * - It is set to Mask mode. + * - The space has mask opened. + * - Mask has visible and editable splines. + */ bool ED_space_image_maskedit_mask_visible_splines_poll(bContext *C); bool ED_space_image_cursor_poll(bContext *C); diff --git a/source/blender/editors/include/ED_keyframes_draw.hh b/source/blender/editors/include/ED_keyframes_draw.hh index 7840f1c9617..042cf6191ca 100644 --- a/source/blender/editors/include/ED_keyframes_draw.hh +++ b/source/blender/editors/include/ED_keyframes_draw.hh @@ -26,9 +26,12 @@ struct GreasePencil; struct GreasePencilLayer; struct GreasePencilLayerTreeGroup; -/* draw simple diamond-shape keyframe */ -/* caller should set up vertex format, bind GPU_SHADER_KEYFRAME_SHAPE, - * immBegin(GPU_PRIM_POINTS, n), then call this n times */ +/** + * Draw simple diamond-shape keyframe. + * + * The caller should set up vertex format, bind #GPU_SHADER_KEYFRAME_SHAPE, + * `immBegin(GPU_PRIM_POINTS, n)`, then call this `n` times. + */ struct KeyframeShaderBindings { uint pos_id; uint size_id; diff --git a/source/blender/editors/include/ED_keyframes_edit.hh b/source/blender/editors/include/ED_keyframes_edit.hh index 69382347f0d..46606707cca 100644 --- a/source/blender/editors/include/ED_keyframes_edit.hh +++ b/source/blender/editors/include/ED_keyframes_edit.hh @@ -28,7 +28,7 @@ struct bDopeSheet; /** \name Tool Flags * \{ */ -/* bezt validation */ +/** bezt validation. */ enum eEditKeyframes_Validate { /* Frame range */ BEZT_OK_FRAME = 1, @@ -62,7 +62,7 @@ enum eEditKeyframes_Select { SELECT_EXTEND_RANGE = (1 << 4), }; -/* "selection map" building modes */ +/* "selection map" building modes. */ enum eEditKeyframes_SelMap { SELMAP_MORE = 0, SELMAP_LESS, @@ -202,9 +202,9 @@ struct KeyframeEditData { /** \name Function Pointer Typedefs * \{ */ -/* callback function that refreshes the F-Curve after use */ +/** Callback function that refreshes the F-Curve after use. */ using FcuEditFunc = void (*)(FCurve *fcu); -/* callback function that operates on the given BezTriple */ +/** Callback function that operates on the given #BezTriple. */ using KeyframeEditFunc = short (*)(KeyframeEditData *ked, BezTriple *bezt); /** \} */ @@ -213,55 +213,55 @@ using KeyframeEditFunc = short (*)(KeyframeEditData *ked, BezTriple *bezt); /** \name Custom Data Type Defines * \{ */ -/* Custom data for remapping one range to another in a fixed way */ +/** Custom data for remapping one range to another in a fixed way. */ struct KeyframeEditCD_Remap { float oldMin, oldMax; /* old range */ float newMin, newMax; /* new range */ }; -/* Paste options */ +/** Paste options. */ enum eKeyPasteOffset { - /* paste keys starting at current frame */ + /** Paste keys starting at current frame. */ KEYFRAME_PASTE_OFFSET_CFRA_START, - /* paste keys ending at current frame */ + /** Paste keys ending at current frame. */ KEYFRAME_PASTE_OFFSET_CFRA_END, - /* paste keys relative to the current frame when copying */ + /** Paste keys relative to the current frame when copying. */ KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE, - /* paste keys from original time */ + /** Paste keys from original time. */ KEYFRAME_PASTE_OFFSET_NONE, }; enum eKeyPasteValueOffset { - /* Paste keys with the first key matching the key left of the cursor. */ + /** Paste keys with the first key matching the key left of the cursor. */ KEYFRAME_PASTE_VALUE_OFFSET_LEFT_KEY, - /* Paste keys with the last key matching the key right of the cursor. */ + /** Paste keys with the last key matching the key right of the cursor. */ KEYFRAME_PASTE_VALUE_OFFSET_RIGHT_KEY, - /* Paste keys relative to the value of the curve under the cursor. */ + /** Paste keys relative to the value of the curve under the cursor. */ KEYFRAME_PASTE_VALUE_OFFSET_CFRA, - /* Paste values relative to the cursor position. */ + /** Paste values relative to the cursor position. */ KEYFRAME_PASTE_VALUE_OFFSET_CURSOR, - /* Paste keys with the exact copied value. */ + /** Paste keys with the exact copied value. */ KEYFRAME_PASTE_VALUE_OFFSET_NONE, }; enum eKeyMergeMode { - /* overlay existing with new keys */ + /** Overlay existing with new keys. */ KEYFRAME_PASTE_MERGE_MIX, - /* replace entire fcurve */ + /** Replace entire fcurve. */ KEYFRAME_PASTE_MERGE_OVER, - /* overwrite keys in pasted range */ + /** Overwrite keys in pasted range. */ KEYFRAME_PASTE_MERGE_OVER_RANGE, - /* overwrite keys in pasted range (use all keyframe start & end for range) */ + /** Overwrite keys in pasted range (use all keyframe start & end for range). */ KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL, }; -/* Possible errors occurring while pasting keys. */ +/** Possible errors occurring while pasting keys. */ enum eKeyPasteError { - /* No errors occurred */ + /** No errors occurred. */ KEYFRAME_PASTE_OK, - /* Nothing was copied */ + /** Nothing was copied. */ KEYFRAME_PASTE_NOTHING_TO_PASTE, - /* No F-curves was selected to paste into. */ + /** No F-curves was selected to paste into. */ KEYFRAME_PASTE_NOWHERE_TO_PASTE }; @@ -438,7 +438,7 @@ void blend_to_neighbor_fcurve_segment(FCurve *fcu, FCurveSegment *segment, float void breakdown_fcurve_segment(FCurve *fcu, FCurveSegment *segment, float factor); void scale_average_fcurve_segment(FCurve *fcu, FCurveSegment *segment, float factor); void push_pull_fcurve_segment(FCurve *fcu, FCurveSegment *segment, float factor); -/* Used for operators that need a reference key of the segment to work. */ +/** Used for operators that need a reference key of the segment to work. */ enum class FCurveSegmentAnchor { LEFT, RIGHT }; void scale_from_fcurve_segment_neighbor(FCurve *fcu, FCurveSegment *segment, @@ -456,6 +456,10 @@ void ED_anim_free_butterworth_coefficients(ButterworthCoefficients *bw_coeff); void ED_anim_calculate_butterworth_coefficients(float cutoff, float sampling_frequency, ButterworthCoefficients *bw_coeff); +/** + * \param samples: Are expected to start at the first frame of the segment with a buffer of size + * `segment->filter_order` at the left. + */ void butterworth_smooth_fcurve_segment(FCurve *fcu, FCurveSegment *segment, float *samples, @@ -470,8 +474,10 @@ void smooth_fcurve_segment(FCurve *fcu, float factor, int kernel_size, double *kernel); -/** Snap the keys on the given FCurve segment to an S-Curve. By modifying the `factor` the part of - * the S-Curve that the keys are snapped to is moved on the x-axis.*/ +/** + * Snap the keys on the given FCurve segment to an S-Curve. By modifying the `factor` the part of + * the S-Curve that the keys are snapped to is moved on the x-axis. + */ void ease_fcurve_segment(FCurve *fcu, FCurveSegment *segment, float factor, float width); enum tShearDirection { diff --git a/source/blender/editors/include/ED_keyframes_keylist.hh b/source/blender/editors/include/ED_keyframes_keylist.hh index 3290e843d7e..1095e535783 100644 --- a/source/blender/editors/include/ED_keyframes_keylist.hh +++ b/source/blender/editors/include/ED_keyframes_keylist.hh @@ -32,18 +32,18 @@ struct bGPdata; struct AnimKeylist; -/* Information about the stretch of time from current to the next column */ +/** Information about the stretch of time from current to the next column. */ struct ActKeyBlockInfo { - /* Combination of flags from all curves. */ + /** Combination of flags from all curves. */ short flag; - /* Mask of flags that differ between curves. */ + /** Mask of flags that differ between curves. */ short conflict; - /* Selection flag. */ + /** Selection flag. */ char sel; }; -/* Keyframe Column Struct */ +/** Keyframe Column Struct. */ struct ActKeyColumn { /* ListBase linkage */ ActKeyColumn *next, *prev; @@ -73,23 +73,23 @@ struct ActKeyColumn { short totcurve, totkey, totblock; }; -/* ActKeyBlockInfo - Flag */ +/** #ActKeyBlockInfo - Flag. */ enum eActKeyBlock_Hold { - /* Key block represents a moving hold */ + /** Key block represents a moving hold. */ ACTKEYBLOCK_FLAG_MOVING_HOLD = (1 << 0), - /* Key block represents a static hold */ + /** Key block represents a static hold */ ACTKEYBLOCK_FLAG_STATIC_HOLD = (1 << 1), - /* Key block represents any kind of hold */ + /** Key block represents any kind of hold. */ ACTKEYBLOCK_FLAG_ANY_HOLD = (1 << 2), - /* The curve segment uses non-bezier interpolation */ + /** The curve segment uses non-bezier interpolation. */ ACTKEYBLOCK_FLAG_NON_BEZIER = (1 << 3), - /* The block is grease pencil */ + /** The block is grease pencil. */ ACTKEYBLOCK_FLAG_GPENCIL = (1 << 4), }; /* *********************** Keyframe Drawing ****************************** */ -/* options for keyframe shape drawing */ +/** Options for keyframe shape drawing. */ enum eKeyframeShapeDrawOpts { /* only the border */ KEYFRAME_SHAPE_FRAME = 0, @@ -99,7 +99,7 @@ enum eKeyframeShapeDrawOpts { KEYFRAME_SHAPE_BOTH, }; -/* Handle type. */ +/** Handle type. */ enum eKeyframeHandleDrawOpts { /* Don't draw */ KEYFRAME_HANDLE_NONE = 0, @@ -111,15 +111,16 @@ enum eKeyframeHandleDrawOpts { KEYFRAME_HANDLE_FREE, }; -/* Extreme type. */ +/** Extreme type. */ enum eKeyframeExtremeDrawOpts { KEYFRAME_EXTREME_NONE = 0, - /* Minimum/maximum present. */ + /** Minimum present. */ KEYFRAME_EXTREME_MIN = (1 << 0), + /** Maximum present. */ KEYFRAME_EXTREME_MAX = (1 << 1), - /* Grouped keys have different states. */ + /** Grouped keys have different states. */ KEYFRAME_EXTREME_MIXED = (1 << 2), - /* Both neighbors are equal to this key. */ + /** Both neighbors are equal to this key. */ KEYFRAME_EXTREME_FLAT = (1 << 3), }; diff --git a/source/blender/editors/include/ED_keyframing.hh b/source/blender/editors/include/ED_keyframing.hh index 713393dd06a..e41df62832c 100644 --- a/source/blender/editors/include/ED_keyframing.hh +++ b/source/blender/editors/include/ED_keyframing.hh @@ -79,44 +79,45 @@ void ED_keyframes_add(FCurve *fcu, int num_keys_to_add); struct ExtensionRNA; struct KeyingSetInfo; -/* Polling Callback for KeyingSets */ +/** Polling Callback for KeyingSets. */ using cbKeyingSet_Poll = bool (*)(KeyingSetInfo *ksi, bContext *C); -/* Context Iterator Callback for KeyingSets */ +/** Context Iterator Callback for KeyingSets. */ using cbKeyingSet_Iterator = void (*)(KeyingSetInfo *ksi, bContext *C, KeyingSet *ks); -/* Property Specifier Callback for KeyingSets (called from iterators) */ +/** Property Specifier Callback for KeyingSets (called from iterators) */ using cbKeyingSet_Generate = void (*)(KeyingSetInfo *ksi, bContext *C, KeyingSet *ks, PointerRNA *ptr); -/* Callback info for 'Procedural' KeyingSets to use */ +/** Callback info for 'Procedural' KeyingSets to use. */ struct KeyingSetInfo { KeyingSetInfo *next, *prev; /* info */ - /* identifier used for class name, which KeyingSet instances reference as "Type-info Name" */ + /** Identifier used for class name, which KeyingSet instances reference as "Type-info Name". */ char idname[64]; - /* identifier so that user can hook this up to a KeyingSet (used as label). */ + /** identifier so that user can hook this up to a KeyingSet (used as label). */ char name[64]; - /* short help/description. */ + /** Short help/description. */ char description[1024]; /* #RNA_DYN_DESCR_MAX */ - /* keying settings */ + /** Keying settings. */ short keyingflag; /* polling callbacks */ - /* callback for polling the context for whether the right data is available */ + /** callback for polling the context for whether the right data is available. */ cbKeyingSet_Poll poll; /* generate callbacks */ - /* iterator to use to go through collections of data in context + /** + * Iterator to use to go through collections of data in context * - this callback is separate from the 'adding' stage, allowing - * BuiltIn KeyingSets to be manually specified to use + * BuiltIn KeyingSets to be manually specified to use. */ cbKeyingSet_Iterator iter; - /* generator to use to add properties based on the data found by iterator */ + /** Generator to use to add properties based on the data found by iterator. */ cbKeyingSet_Generate generate; - /* RNA integration */ + /** RNA integration. */ ExtensionRNA rna_ext; }; @@ -131,13 +132,13 @@ void ANIM_relative_keyingset_add_source(blender::Vector &sources, void *data); void ANIM_relative_keyingset_add_source(blender::Vector &sources, ID *id); -/* mode for modify_keyframes */ +/** Mode for modify_keyframes. */ enum eModifyKey_Modes { MODIFYKEY_MODE_INSERT = 0, MODIFYKEY_MODE_DELETE, }; -/* return codes for errors (with Relative KeyingSets) */ +/** Return codes for errors (with Relative KeyingSets). */ enum eModifyKey_Returns { MODIFYKEY_SUCCESS = 0, /** Context info was invalid for using the Keying Set. */ @@ -269,7 +270,7 @@ bool ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *ks); /** \name Drivers * \{ */ -/* Flags for use by driver creation calls */ +/** Flags for use by driver creation calls */ enum eCreateDriverFlags { /** create drivers with a default variable for nicer UI */ CREATEDRIVER_WITH_DEFAULT_DVAR = (1 << 0), @@ -277,7 +278,7 @@ enum eCreateDriverFlags { CREATEDRIVER_WITH_FMODIFIER = (1 << 1), }; -/* Heuristic to use for connecting target properties to driven ones */ +/** Heuristic to use for connecting target properties to driven ones */ enum eCreateDriver_MappingTypes { /** 1 to Many - Use the specified index, and drive all elements with it */ CREATEDRIVER_MAPPING_1_N = 0, @@ -303,10 +304,14 @@ extern EnumPropertyItem prop_driver_create_mapping_types[]; /* -------- */ enum eDriverFCurveCreationMode { - DRIVER_FCURVE_LOOKUP_ONLY = 0, /* Don't add anything if not found. */ - DRIVER_FCURVE_KEYFRAMES = 1, /* Add with keyframes, for visual tweaking. */ - DRIVER_FCURVE_GENERATOR = 2, /* Add with generator, for script backwards compatibility. */ - DRIVER_FCURVE_EMPTY = 3 /* Add without data, for pasting. */ + /** Don't add anything if not found. */ + DRIVER_FCURVE_LOOKUP_ONLY = 0, + /** Add with keyframes, for visual tweaking. */ + DRIVER_FCURVE_KEYFRAMES = 1, + /** Add with generator, for script backwards compatibility. */ + DRIVER_FCURVE_GENERATOR = 2, + /** Add without data, for pasting. */ + DRIVER_FCURVE_EMPTY = 3 }; /** diff --git a/source/blender/editors/include/ED_markers.hh b/source/blender/editors/include/ED_markers.hh index 335e55f5f81..79dbfa627bc 100644 --- a/source/blender/editors/include/ED_markers.hh +++ b/source/blender/editors/include/ED_markers.hh @@ -18,14 +18,14 @@ struct wmKeyConfig; /** \name Drawing API * \{ */ -/* flags for drawing markers */ +/** Flags for drawing markers. */ enum { DRAW_MARKERS_LINES = (1 << 0), DRAW_MARKERS_LOCAL = (1 << 1), DRAW_MARKERS_MARGIN = (1 << 2), }; -/* Draw Scene-Markers in time window */ +/** Draw Scene-Markers in time window. */ void ED_markers_draw(const bContext *C, int flag); /** \} */ diff --git a/source/blender/editors/include/ED_mask.hh b/source/blender/editors/include/ED_mask.hh index 1eb18bac316..62a6b8299df 100644 --- a/source/blender/editors/include/ED_mask.hh +++ b/source/blender/editors/include/ED_mask.hh @@ -19,32 +19,40 @@ struct wmKeyConfig; /* `mask_edit.cc` */ -/* Returns true when the following conditions are met: +/** + * Returns true when the following conditions are met: * - Current space supports mask editing. * - The space is configured to interact with mask. * - * It is not required to have mask opened for editing. */ + * It is not required to have mask opened for editing. + */ bool ED_maskedit_poll(bContext *C); -/* Returns true when the following conditions are met: +/** + * Returns true when the following conditions are met: * - Current space supports mask editing. * - The space is configured to interact with mask. * - Mask has visible and editable splines. * - * It is not required to have mask opened for editing. */ + * It is not required to have mask opened for editing. + */ bool ED_maskedit_visible_splines_poll(bContext *C); -/* Returns true when the following conditions are met: +/** + * Returns true when the following conditions are met: * - Current space supports mask editing. * - The space is configured to interact with mask. - * - The space has mask open for editing. */ + * - The space has mask open for editing. + */ bool ED_maskedit_mask_poll(bContext *C); -/* Returns true when the following conditions are met: +/** + * Returns true when the following conditions are met: * - Current space supports mask editing. * - The space is configured to interact with mask. * - The space has mask opened. - * - Mask has visible and editable splines. */ + * - Mask has visible and editable splines. + */ bool ED_maskedit_mask_visible_splines_poll(bContext *C); void ED_mask_deselect_all(const bContext *C); diff --git a/source/blender/editors/include/ED_mesh.hh b/source/blender/editors/include/ED_mesh.hh index bff3d08a682..5f4d77af73f 100644 --- a/source/blender/editors/include/ED_mesh.hh +++ b/source/blender/editors/include/ED_mesh.hh @@ -42,7 +42,7 @@ struct wmOperator; struct UvElement; struct UvElementMap; -/* editmesh_utils.cc */ +/* `editmesh_utils.cc` */ /** * \param em: Edit-mesh used for generating mirror data. @@ -189,12 +189,12 @@ void EDBM_automerge(Object *obedit, bool update, char hflag, float dist); void EDBM_automerge_and_split( Object *obedit, bool split_edges, bool split_faces, bool update, char hflag, float dist); -/* editmesh_undo.cc */ +/* `editmesh_undo.cc` */ /** Export for ED_undo_sys. */ void ED_mesh_undosys_type(UndoType *ut); -/* editmesh_select.cc */ +/* `editmesh_select.cc` */ void EDBM_select_mirrored( BMEditMesh *em, const Mesh *mesh, int axis, bool extend, int *r_totmirr, int *r_totfail); @@ -441,7 +441,7 @@ void ED_mesh_mirrtopo_init(BMEditMesh *em, bool skip_em_vert_array_init); void ED_mesh_mirrtopo_free(MirrTopoStore_t *mesh_topo_store); -/* object_vgroup.cc */ +/* `object_vgroup.cc` */ #define WEIGHT_REPLACE 1 #define WEIGHT_ADD 2 @@ -513,7 +513,7 @@ float ED_vgroup_vert_weight(Object *ob, bDeformGroup *dg, int vertnum); */ void ED_vgroup_vert_active_mirror(Object *ob, int def_nr); -/* mesh_data.cc */ +/* `mesh_data.cc` */ void ED_mesh_verts_add(Mesh *mesh, ReportList *reports, int count); void ED_mesh_edges_add(Mesh *mesh, ReportList *reports, int count); @@ -584,7 +584,7 @@ void EDBM_redo_state_restore_and_free(BMBackup *backup, BMEditMesh *em, bool rec ATTR_NONNULL(1, 2); void EDBM_redo_state_free(BMBackup *backup) ATTR_NONNULL(1); -/* *** meshtools.cc *** */ +/* `meshtools.cc` */ int ED_mesh_join_objects_exec(bContext *C, wmOperator *op); int ED_mesh_shapes_join_objects_exec(bContext *C, wmOperator *op); diff --git a/source/blender/editors/include/ED_numinput.hh b/source/blender/editors/include/ED_numinput.hh index f4a223472d1..7a7576a1097 100644 --- a/source/blender/editors/include/ED_numinput.hh +++ b/source/blender/editors/include/ED_numinput.hh @@ -48,7 +48,7 @@ enum { /* (1 << 9) and above are reserved for internal flags! */ }; -/* NumInput.val_flag[] */ +/** #NumInput::val_flag */ enum { /* Public! */ NUM_NULL_ONE = (1 << 0), diff --git a/source/blender/editors/include/ED_object.hh b/source/blender/editors/include/ED_object.hh index ad3969744e9..bbe4f64ee8b 100644 --- a/source/blender/editors/include/ED_object.hh +++ b/source/blender/editors/include/ED_object.hh @@ -42,7 +42,7 @@ struct wmKeyConfig; struct wmOperator; struct wmOperatorType; -/* object_edit.cc */ +/* `object_edit.cc` */ /** `context.object` */ Object *ED_object_context(const bContext *C); @@ -108,7 +108,7 @@ void ED_object_data_xform_container_update_all(XFormObjectData_Container *xds, Depsgraph *depsgraph); void ED_object_data_xform_container_item_ensure(XFormObjectData_Container *xds, Object *ob); -/* Object Skip-Child Container helper API. */ +/** Object Skip-Child Container helper API. */ enum { /** * The parent is transformed, this is held in place. @@ -451,7 +451,7 @@ void ED_object_constraint_copy_for_pose(Main *bmain, bPoseChannel *pchan, bConstraint *con); -/* object_modes.cc */ +/* `object_modes.cc` */ /** * Checks the mode to be set is compatible with the object @@ -577,7 +577,7 @@ bool ED_object_iter_other(Main *bmain, */ bool ED_object_multires_update_totlevels_cb(Object *ob, void *totlevel_v); -/* object_greasepencil_modifier.c */ +/* `object_greasepencil_modifier.cc` */ GpencilModifierData *ED_object_gpencil_modifier_add( ReportList *reports, Main *bmain, Scene *scene, Object *ob, const char *name, int type); @@ -652,7 +652,7 @@ bool ED_object_jump_to_object(bContext *C, Object *ob, bool reveal_hidden); */ bool ED_object_jump_to_bone(bContext *C, Object *ob, const char *bone_name, bool reveal_hidden); -/* object_data_transform.cc */ +/* `object_data_transform.cc` */ XFormObjectData *ED_object_data_xform_create_ex(ID *id, bool is_edit_mode); XFormObjectData *ED_object_data_xform_create(ID *id); diff --git a/source/blender/editors/include/ED_paint.hh b/source/blender/editors/include/ED_paint.hh index 051244bd325..b886b732272 100644 --- a/source/blender/editors/include/ED_paint.hh +++ b/source/blender/editors/include/ED_paint.hh @@ -24,7 +24,7 @@ struct UndoType; struct wmKeyConfig; struct wmOperator; -/* paint_ops.cc */ +/* `paint_ops.cc` */ void ED_operatortypes_paint(); void ED_operatormacros_paint(); @@ -110,7 +110,8 @@ void ED_paintcurve_undo_push_end(bContext *C); /** Export for ED_undo_sys. */ void ED_paintcurve_undosys_type(UndoType *ut); -/* paint_canvas.cc */ +/* `paint_canvas.cc` */ + /** Color type of an object can be overridden in sculpt/paint mode. */ eV3DShadingColorType ED_paint_shading_color_override(bContext *C, const PaintModeSettings *settings, @@ -124,5 +125,5 @@ eV3DShadingColorType ED_paint_shading_color_override(bContext *C, */ bool ED_paint_tool_use_canvas(bContext *C, bToolRef *tref); -/* Store the last used tool in the sculpt session. */ +/** Store the last used tool in the sculpt session. */ void ED_paint_tool_update_sticky_shading_color(bContext *C, Object *ob); diff --git a/source/blender/editors/include/ED_render.hh b/source/blender/editors/include/ED_render.hh index 28999305803..c45791ab863 100644 --- a/source/blender/editors/include/ED_render.hh +++ b/source/blender/editors/include/ED_render.hh @@ -54,16 +54,15 @@ void ED_render_view3d_update(Depsgraph *depsgraph, wmWindow *window, ScrArea *ar Scene *ED_render_job_get_scene(const bContext *C); Scene *ED_render_job_get_current_scene(const bContext *C); -/* Render the preview - * - * pr_method: - * - PR_BUTS_RENDER: preview is rendered for buttons window - * - PR_ICON_RENDER: preview is rendered for icons. hopefully fast enough for at least 32x32 - * - PR_ICON_DEFERRED: No render, we just ensure deferred icon data gets generated. +/** + * Render the preview method. */ enum ePreviewRenderMethod { + /** Preview is rendered for buttons window. */ PR_BUTS_RENDER = 0, + /** Preview is rendered for icons. hopefully fast enough for at least 32x32. */ PR_ICON_RENDER = 1, + /** No render, we just ensure deferred icon data gets generated. */ PR_ICON_DEFERRED = 2, }; diff --git a/source/blender/editors/include/ED_screen.hh b/source/blender/editors/include/ED_screen.hh index c9ae31c1c17..7a4e94af397 100644 --- a/source/blender/editors/include/ED_screen.hh +++ b/source/blender/editors/include/ED_screen.hh @@ -469,9 +469,9 @@ bScreen *ED_screen_animation_playing(const wmWindowManager *wm); bScreen *ED_screen_animation_no_scrub(const wmWindowManager *wm); /* screen keymaps */ -/* called in spacetypes.cc */ +/* called in `spacetypes.cc`. */ void ED_operatortypes_screen(); -/* called in spacetypes.cc */ +/* called in `spacetypes.cc`. */ void ED_keymap_screen(wmKeyConfig *keyconf); /** * Workspace key-maps. diff --git a/source/blender/editors/include/ED_screen_types.hh b/source/blender/editors/include/ED_screen_types.hh index 8bd19db33fa..62c081ca73b 100644 --- a/source/blender/editors/include/ED_screen_types.hh +++ b/source/blender/editors/include/ED_screen_types.hh @@ -18,13 +18,19 @@ struct ARegion; * For animation playback operator, stored in #bScreen.animtimer.customdata. */ struct ScreenAnimData { - ARegion *region; /* do not read from this, only for comparing if region exists */ + /** Do not read from this, only for comparing if region exists. */ + ARegion *region; short redraws; - short flag; /* flags for playback */ - int sfra; /* frame that playback was started from */ - int nextfra; /* next frame to go to (when ANIMPLAY_FLAG_USE_NEXT_FRAME is set) */ - double lagging_frame_count; /* used for frame dropping */ - bool from_anim_edit; /* playback was invoked from animation editor */ + /** Flags for playback */ + short flag; + /** Frame that playback was started from */ + int sfra; + /** Next frame to go to (when ANIMPLAY_FLAG_USE_NEXT_FRAME is set) */ + int nextfra; + /** Used for frame dropping */ + double lagging_frame_count; + /** Playback was invoked from animation editor */ + bool from_anim_edit; }; /** #ScreenAnimData.flag */ @@ -43,7 +49,7 @@ enum { /* ----------------------------------------------------- */ -/* Enum for Action Zone Edges. Which edge of area is action zone. */ +/** Enum for Action Zone Edges. Which edge of area is action zone. */ enum AZEdge { /** Region located on the left, _right_ edge is action zone. * Region minimized to the top left */ @@ -64,22 +70,22 @@ enum AZScrollDirection { AZ_SCROLL_HOR, }; -/* for editing areas/regions */ +/** For editing areas/regions. */ struct AZone { AZone *next, *prev; ARegion *region; int type; union { - /* region-azone, which of the edges (only for AZONE_REGION) */ + /** Region-azone, which of the edges (only for #AZONE_REGION). */ AZEdge edge; AZScrollDirection direction; }; - /* for draw */ + /** For drawing. */ short x1, y1, x2, y2; - /* for clip */ + /** For clip. */ rcti rect; - /* for fade in/out */ + /** For fade in/out. */ float alpha; }; diff --git a/source/blender/editors/include/ED_sculpt.hh b/source/blender/editors/include/ED_sculpt.hh index abae81d6c94..2df0a9339b5 100644 --- a/source/blender/editors/include/ED_sculpt.hh +++ b/source/blender/editors/include/ED_sculpt.hh @@ -18,7 +18,7 @@ struct rcti; struct wmOperator; struct wmKeyConfig; -/* sculpt.cc */ +/* `sculpt.cc` */ /** * Checks if the currently active Sculpt Mode on the object is targeting a locked shape key, @@ -30,7 +30,8 @@ bool ED_sculpt_report_if_shape_key_is_locked(const Object *ob, ReportList *repor void ED_operatortypes_sculpt(); void ED_keymap_sculpt(wmKeyConfig *keyconf); -/* sculpt_transform.cc */ + +/* `sculpt_transform.cc` */ void ED_sculpt_update_modal_transform(bContext *C, Object *ob); void ED_sculpt_init_transform(bContext *C, @@ -39,7 +40,7 @@ void ED_sculpt_init_transform(bContext *C, const char *undo_name); void ED_sculpt_end_transform(bContext *C, Object *ob); -/* sculpt_undo.cc */ +/* `sculpt_undo.cc` */ namespace blender::ed::sculpt_paint { @@ -56,8 +57,10 @@ void geometry_begin(Object *ob, const wmOperator *op); void geometry_begin_ex(Object *ob, const char *name); void geometry_end(Object *ob); -/* Undo for changes happening on a base mesh for multires sculpting. - * if there is no multi-res sculpt active regular undo is used. */ +/** + * Undo for changes happening on a base mesh for multires sculpting. + * if there is no multi-res sculpt active regular undo is used. + */ void push_multires_mesh_begin(bContext *C, const char *str); void push_multires_mesh_end(bContext *C, const char *str); diff --git a/source/blender/editors/include/ED_select_utils.hh b/source/blender/editors/include/ED_select_utils.hh index da8c6715cdd..134dc6f6d0d 100644 --- a/source/blender/editors/include/ED_select_utils.hh +++ b/source/blender/editors/include/ED_select_utils.hh @@ -37,7 +37,7 @@ enum eSelectOp { SEL_OP_XOR, }; -/* Select Similar */ +/** Select Similar. */ enum eSimilarCmp { SIM_CMP_EQ = 0, SIM_CMP_GT, diff --git a/source/blender/editors/include/ED_transform.hh b/source/blender/editors/include/ED_transform.hh index 24869d9f413..3ca03b68741 100644 --- a/source/blender/editors/include/ED_transform.hh +++ b/source/blender/editors/include/ED_transform.hh @@ -71,9 +71,11 @@ enum eTfmMode { TFM_GPENCIL_OPACITY, }; -/* Standalone call to get the transformation center corresponding to the current situation +/** + * Standalone call to get the transformation center corresponding to the current situation * returns 1 if successful, 0 otherwise (usually means there's no selection) - * (if false is returns, `cent3d` is unmodified). */ + * (if false is returns, `cent3d` is unmodified). + */ bool calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], float cent2d[2]); /* UNUSED */ @@ -170,10 +172,12 @@ void ED_widgetgroup_gizmo2d_rotate_callbacks_set(wmGizmoGroupType *gzgt); #define SNAP_INCREMENTAL_ANGLE DEG2RAD(5.0) struct TransformBounds { - float center[3]; /* Center for transform widget. */ - float min[3], max[3]; /* Bounding-box of selection for transform widget. */ + /** Center for transform widget. */ + float center[3]; + /** Bounding-box of selection for transform widget. */ + float min[3], max[3]; - /* Normalized axis */ + /** Normalized axis. */ float axis[3][3]; float axis_min[3], axis_max[3]; @@ -188,7 +192,7 @@ struct TransformBounds { struct TransformCalcParams { uint use_only_center : 1; uint use_local_axis : 1; - /* Use 'Scene.orientation_type' when zero, otherwise subtract one and use. */ + /** Use #Scene::orientation_type when zero, otherwise subtract one and use. */ ushort orientation_index; }; /** diff --git a/source/blender/editors/include/ED_transform_snap_object_context.hh b/source/blender/editors/include/ED_transform_snap_object_context.hh index c7bde10abcf..190438ec887 100644 --- a/source/blender/editors/include/ED_transform_snap_object_context.hh +++ b/source/blender/editors/include/ED_transform_snap_object_context.hh @@ -23,7 +23,7 @@ struct Object; struct Scene; struct View3D; -/* transform_snap_object.cc */ +/* `transform_snap_object.cc` */ /* ED_transform_snap_object_*** API */ @@ -40,24 +40,26 @@ struct SnapObjectHitDepth { float depth; float co[3]; - /* needed to tell which ray-cast this was part of, - * the same object may be part of many ray-casts when dupli's are used. */ + /** + * Needed to tell which ray-cast this was part of, + * the same object may be part of many ray-casts when dupli's are used. + */ unsigned int ob_uuid; }; /** parameters that define which objects will be used to snap. */ struct SnapObjectParams { - /* Special context sensitive handling for the active or selected object. */ + /** Special context sensitive handling for the active or selected object. */ eSnapTargetOP snap_target_select; - /* Geometry for snapping in edit mode. */ + /** Geometry for snapping in edit mode. */ eSnapEditType edit_mode_type; - /* Break nearest face snapping into steps to improve transformations across U-shaped targets. */ + /** Break nearest face snapping into steps to improve transformations across U-shaped targets. */ short face_nearest_steps; - /* snap to the closest element, use when using more than one snap type */ + /** Snap to the closest element, use when using more than one snap type. */ bool use_occlusion_test : 1; - /* exclude back facing geometry from snapping */ + /** Exclude back facing geometry from snapping. */ bool use_backface_culling : 1; - /* Enable to force nearest face snapping to snap to target the source was initially near. */ + /** Enable to force nearest face snapping to snap to target the source was initially near. */ bool keep_on_same_target : 1; }; @@ -65,7 +67,7 @@ struct SnapObjectContext; SnapObjectContext *ED_transform_snap_object_context_create(Scene *scene, int flag); void ED_transform_snap_object_context_destroy(SnapObjectContext *sctx); -/* callbacks to filter how snap works */ +/** Callbacks to filter how snap works. */ void ED_transform_snap_object_context_set_editmesh_callbacks( SnapObjectContext *sctx, bool (*test_vert_fn)(BMVert *, void *user_data), @@ -86,6 +88,13 @@ bool ED_transform_snap_object_project_ray_ex(SnapObjectContext *sctx, int *r_index, Object **r_ob, float r_obmat[4][4]); +/** + * Convenience function for snap ray-casting. + * + * Given a ray, cast it into the scene (snapping to faces). + * + * \return Snap success + */ bool ED_transform_snap_object_project_ray(SnapObjectContext *sctx, Depsgraph *depsgraph, const View3D *v3d, diff --git a/source/blender/editors/include/ED_util.hh b/source/blender/editors/include/ED_util.hh index 087bc87766f..224bcae5b65 100644 --- a/source/blender/editors/include/ED_util.hh +++ b/source/blender/editors/include/ED_util.hh @@ -18,7 +18,7 @@ namespace blender::bke::id { class IDRemapper; } -/* ed_util.cc */ +/* `ed_util.cc` */ void ED_editors_init_for_undo(Main *bmain); void ED_editors_init(bContext *C); @@ -90,7 +90,7 @@ void ED_slider_status_string_get(const tSlider *slider, float ED_slider_factor_get(tSlider *slider); void ED_slider_factor_set(tSlider *slider, float factor); -/* One bool value for each side of the slider. Allows to enable overshoot only on one side. */ +/** One bool value for each side of the slider. Allows to enable overshoot only on one side. */ void ED_slider_allow_overshoot_set(tSlider *slider, bool lower, bool upper); /** diff --git a/source/blender/editors/include/ED_view3d.hh b/source/blender/editors/include/ED_view3d.hh index 3e9efaf9c28..ed72a3e1800 100644 --- a/source/blender/editors/include/ED_view3d.hh +++ b/source/blender/editors/include/ED_view3d.hh @@ -357,7 +357,7 @@ void ED_view3d_cursor_snap_draw_util(RegionView3D *rv3d, const uchar source_color[4], const uchar target_color[4]); -/* view3d_iterators.cc */ +/* `view3d_iterators.cc` */ /* foreach iterators */ @@ -926,7 +926,7 @@ int view3d_opengl_select_with_id_filter(const ViewContext *vc, eV3DSelectObjectFilter select_filter, uint select_id); -/* view3d_select.cc */ +/* `view3d_select.cc` */ float ED_view3d_select_dist_px(); ViewContext ED_view3d_viewcontext_init(bContext *C, Depsgraph *depsgraph); @@ -1285,7 +1285,7 @@ void ED_view3d_draw_bgpic_test(const Scene *scene, bool do_foreground, bool do_camera_frame); -/* view3d_gizmo_preselect_type.cc */ +/* `view3d_gizmo_preselect_type.cc` */ void ED_view3d_gizmo_mesh_preselect_get_active(const bContext *C, const wmGizmo *gz, @@ -1293,7 +1293,7 @@ void ED_view3d_gizmo_mesh_preselect_get_active(const bContext *C, BMElem **r_ele); void ED_view3d_gizmo_mesh_preselect_clear(wmGizmo *gz); -/* space_view3d.cc */ +/* `space_view3d.cc` */ void ED_view3d_buttons_region_layout_ex(const bContext *C, ARegion *region, diff --git a/source/blender/editors/include/ED_viewer_path.hh b/source/blender/editors/include/ED_viewer_path.hh index 29df102e0eb..913bdc7de9b 100644 --- a/source/blender/editors/include/ED_viewer_path.hh +++ b/source/blender/editors/include/ED_viewer_path.hh @@ -38,7 +38,7 @@ Object *parse_object_only(const ViewerPath &viewer_path); struct ViewerPathForGeometryNodesViewer { Object *object; blender::StringRefNull modifier_name; - /* Contains only group node and simulation zone elements. */ + /** Contains only group node and simulation zone elements. */ blender::Vector node_path; int32_t viewer_node_id; }; diff --git a/source/blender/editors/interface/interface_layout.cc b/source/blender/editors/interface/interface_layout.cc index 9047e774498..040bcb4a1cb 100644 --- a/source/blender/editors/interface/interface_layout.cc +++ b/source/blender/editors/interface/interface_layout.cc @@ -6145,7 +6145,7 @@ static void ui_paneltype_draw_impl(bContext *C, PanelType *pt, uiLayout *layout, } /* This check may be paranoid, this function might run outside the context of a popup or can run - * in popopers that are not supposed to support refreshing, see #ui_popover_create_block. */ + * in popovers that are not supposed to support refreshing, see #ui_popover_create_block. */ if (block->handle && block->handle->region) { /* Allow popovers to contain collapsible sections, see #uiItemPopoverPanel. */ UI_popup_dummy_panel_set(block->handle->region, block); diff --git a/source/blender/editors/space_image/image_edit.cc b/source/blender/editors/space_image/image_edit.cc index a7f1cdabc34..a60505043b4 100644 --- a/source/blender/editors/space_image/image_edit.cc +++ b/source/blender/editors/space_image/image_edit.cc @@ -37,9 +37,9 @@ #include "WM_api.hh" #include "WM_types.hh" -/* NOTE: image_panel_properties() uses pointer to sima->image directly. */ Image *ED_space_image(const SpaceImage *sima) { + /* NOTE: image_panel_properties() uses pointer to `sima->image` directly. */ return sima->image; } diff --git a/source/blender/editors/space_sequencer/sequencer_clipboard.cc b/source/blender/editors/space_sequencer/sequencer_clipboard.cc index c22d9653676..cceb95920e4 100644 --- a/source/blender/editors/space_sequencer/sequencer_clipboard.cc +++ b/source/blender/editors/space_sequencer/sequencer_clipboard.cc @@ -145,8 +145,7 @@ static bool sequencer_write_copy_paste_file(Main *bmain_src, Scene *scene_dst = BKE_scene_add(bmain_src, "copybuffer_vse_scene"); /* Create a temporary scene that we will copy from. - * This is needed as it is the scene that contains all the VSE strip data. - */ + * This is needed as it is the scene that contains all the sequence-strip data. */ scene_dst->ed = MEM_cnew(__func__); scene_dst->ed->seqbasep = &scene_dst->ed->seqbase; SEQ_sequence_base_dupli_recursive( diff --git a/source/blender/editors/space_view3d/view3d_draw.cc b/source/blender/editors/space_view3d/view3d_draw.cc index d60f9c24dbc..87c9b3a3c6c 100644 --- a/source/blender/editors/space_view3d/view3d_draw.cc +++ b/source/blender/editors/space_view3d/view3d_draw.cc @@ -2092,11 +2092,12 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Depsgraph *depsgraph, v3d.flag2 = V3D_HIDE_OVERLAYS; /* HACK: When rendering gpencil objects this opacity is used to mix vertex colors in when not in - * render mode (e.g. in VSE). */ + * render mode (e.g. in the sequencer). */ v3d.overlay.gpencil_vertex_paint_opacity = 1.0f; - /* Also initialize wireframe properties to the default so it renders properly in VSE. Should - * find some way to use the viewport's current opacity and threshold, but this is a start. */ + /* Also initialize wire-frame properties to the default so it renders properly in sequencer. + * Should find some way to use the viewport's current opacity and threshold, + * but this is a start. */ v3d.overlay.wireframe_opacity = 1.0f; v3d.overlay.wireframe_threshold = 0.5f; diff --git a/source/blender/editors/space_view3d/view3d_edit.cc b/source/blender/editors/space_view3d/view3d_edit.cc index 9c8160cffaf..a3d8026a3f2 100644 --- a/source/blender/editors/space_view3d/view3d_edit.cc +++ b/source/blender/editors/space_view3d/view3d_edit.cc @@ -815,7 +815,6 @@ void VIEW3D_OT_clip_border(wmOperatorType *ot) /** \name Set Cursor Operator * \{ */ -/* cursor position in vec, result in vec, mval in region coords */ void ED_view3d_cursor3d_position(bContext *C, const int mval[2], const bool use_depth, diff --git a/source/blender/editors/space_view3d/view3d_navigate.cc b/source/blender/editors/space_view3d/view3d_navigate.cc index 226ec4320b3..1cffdf938d9 100644 --- a/source/blender/editors/space_view3d/view3d_navigate.cc +++ b/source/blender/editors/space_view3d/view3d_navigate.cc @@ -1042,10 +1042,10 @@ static const ViewOpsType *view3d_navigation_type_from_idname(const char *idname) return nullptr; } -/* Unlike `viewops_data_create`, `ED_view3d_navigation_init` creates a navigation context along - * with an array of `wmKeyMapItem`s used for navigation. */ ViewOpsData *ED_view3d_navigation_init(bContext *C, const wmKeyMapItem *kmi_merge) { + /* Unlike `viewops_data_create`, `ED_view3d_navigation_init` creates a navigation context along + * with an array of `wmKeyMapItem`s used for navigation. */ if (!CTX_wm_region_view3d(C)) { return nullptr; } diff --git a/source/blender/editors/transform/transform_snap_object.cc b/source/blender/editors/transform/transform_snap_object.cc index 452fb8763db..ca25d68e494 100644 --- a/source/blender/editors/transform/transform_snap_object.cc +++ b/source/blender/editors/transform/transform_snap_object.cc @@ -1200,13 +1200,6 @@ bool ED_transform_snap_object_project_ray_all(SnapObjectContext *sctx, return false; } -/** - * Convenience function for snap ray-casting. - * - * Given a ray, cast it into the scene (snapping to faces). - * - * \return Snap success - */ bool ED_transform_snap_object_project_ray(SnapObjectContext *sctx, Depsgraph *depsgraph, const View3D *v3d, diff --git a/source/blender/gpu/GPU_context.hh b/source/blender/gpu/GPU_context.hh index 5f997155691..ab8040d7406 100644 --- a/source/blender/gpu/GPU_context.hh +++ b/source/blender/gpu/GPU_context.hh @@ -56,7 +56,7 @@ GPUContext *GPU_context_create(void *ghost_window, void *ghost_context); void GPU_context_discard(GPUContext *); /** - * Ctx can be null. + * #GPUContext can be null. */ void GPU_context_active_set(GPUContext *); GPUContext *GPU_context_active_get(); diff --git a/source/blender/gpu/metal/mtl_texture_util.mm b/source/blender/gpu/metal/mtl_texture_util.mm index cec8a4bb33b..25eb7630cee 100644 --- a/source/blender/gpu/metal/mtl_texture_util.mm +++ b/source/blender/gpu/metal/mtl_texture_util.mm @@ -253,7 +253,7 @@ size_t get_mtl_format_bytesize(MTLPixelFormat tex_format) return 2; case MTLPixelFormatBC1_RGBA: case MTLPixelFormatBC1_RGBA_sRGB: - return 1; /* Note: not quite correct (BC1 is 0.5 bpp). */ + return 1; /* NOTE: not quite correct (BC1 is 0.5 BPP). */ case MTLPixelFormatBC2_RGBA: case MTLPixelFormatBC2_RGBA_sRGB: case MTLPixelFormatBC3_RGBA: diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index d8af3ab6377..497f8d23229 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -4,7 +4,7 @@ /** \file * \ingroup DNA - * \brief ID and Library types, which are fundamental for sdna. + * \brief ID and Library types, which are fundamental for SDNA. */ #pragma once @@ -452,9 +452,9 @@ typedef struct ID_Runtime { ID_Runtime_Remap remap; } ID_Runtime; -/* There's a nasty circular dependency here.... 'void *' to the rescue! I - * really wonder why this is needed. */ typedef struct ID { + /* There's a nasty circular dependency here.... 'void *' to the rescue! I + * really wonder why this is needed. */ void *next, *prev; struct ID *newid; diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index a20d9dbdf3b..575367789e1 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -625,7 +625,8 @@ typedef enum eItasc_Solver { /* Groups -------------------------------------- */ -/* Action-Channel Group (agrp) +/** + * Action-Channel Group (agrp) * * These are stored as a list per-Action, and are only used to * group that Action's channels in an Animation Editor. @@ -734,7 +735,7 @@ typedef struct bAction { PreviewImage *preview; } bAction; -/* Flags for the action */ +/** Flags for the action. */ typedef enum eAction_Flags { /* flags for displaying in UI */ ACT_COLLAPSED = (1 << 0), @@ -753,7 +754,7 @@ typedef enum eAction_Flags { /* ************************************************ */ /* Action/Dopesheet Editor */ -/* Storage for Dopesheet/Grease-Pencil Editor data */ +/** Storage for Dopesheet/Grease-Pencil Editor data. */ typedef struct bDopeSheet { /** Currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil). */ ID *source; @@ -776,7 +777,7 @@ typedef struct bDopeSheet { int renameIndex; } bDopeSheet; -/* DopeSheet filter-flag */ +/** DopeSheet filter-flag. */ typedef enum eDopeSheet_FilterFlag { /* general filtering */ /** only include channels relating to selected data */ diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index d54df36ccc8..c4ab1609b3b 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -601,7 +601,7 @@ typedef struct FPoint { char _pad[4]; } FPoint; -/* 'Function-Curve' - defines values over time for a given setting (fcu) */ +/** 'Function-Curve' - defines values over time for a given setting (fcu). */ typedef struct FCurve { struct FCurve *next, *prev; diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index 922bd1b4fad..5a36d2f0b66 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -26,7 +26,7 @@ typedef struct bConstraintChannel { char name[30]; } bConstraintChannel; -/* A Constraint */ +/** A Constraint. */ typedef struct bConstraint { struct bConstraint *next, *prev; diff --git a/source/blender/makesdna/DNA_gpencil_legacy_types.h b/source/blender/makesdna/DNA_gpencil_legacy_types.h index 2a74f15eddc..7ded6b06460 100644 --- a/source/blender/makesdna/DNA_gpencil_legacy_types.h +++ b/source/blender/makesdna/DNA_gpencil_legacy_types.h @@ -63,7 +63,8 @@ typedef struct bGPDspoint_Runtime { char _pad0[4]; } bGPDspoint_Runtime; -/* Grease-Pencil Annotations - 'Stroke Point' +/** + * Grease-Pencil Annotations - 'Stroke Point' * -> Coordinates may either be 2d or 3d depending on settings at the time * -> Coordinates of point on stroke, in proportions of window size * This assumes that the bottom-left corner is (0,0) @@ -264,7 +265,8 @@ typedef struct bGPDstroke_Runtime { void *_pad2; } bGPDstroke_Runtime; -/* Grease-Pencil Annotations - 'Stroke' +/** + * Grease-Pencil Annotations - 'Stroke' * -> A stroke represents a (simplified version) of the curve * drawn by the user in one 'mouse-down'->'mouse-up' operation */ @@ -407,7 +409,8 @@ typedef struct bGPDframe_Runtime { struct bGPDframe *gpf_orig; } bGPDframe_Runtime; -/* Grease-Pencil Annotations - 'Frame' +/** + * Grease-Pencil Annotations - 'Frame' * -> Acts as storage for the 'image' formed by strokes */ typedef struct bGPDframe { @@ -465,7 +468,7 @@ typedef enum ebGPDlayer_Mask_Flag { GP_MASK_INVERT = (1 << 1), } ebGPDlayer_Mask_Flag; -/* Runtime temp data for bGPDlayer */ +/** Runtime temp data for #bGPDlayer. */ typedef struct bGPDlayer_Runtime { DNA_DEFINE_CXX_METHODS(bGPDlayer_Runtime) @@ -476,7 +479,7 @@ typedef struct bGPDlayer_Runtime { struct bGPDlayer *gpl_orig; } bGPDlayer_Runtime; -/* Grease-Pencil Annotations - 'Layer' */ +/** Grease-Pencil Annotations - 'Layer'. */ typedef struct bGPDlayer { DNA_DEFINE_CXX_METHODS(bGPDlayer) @@ -680,7 +683,7 @@ typedef struct bGPgrid { char _pad[4]; } bGPgrid; -/* Grease-Pencil Annotations - 'DataBlock' */ +/** Grease-Pencil Annotations - 'DataBlock'. */ typedef struct bGPdata { DNA_DEFINE_CXX_METHODS(bGPdata) diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h index 0dc877fd85f..d3049fdd092 100644 --- a/source/blender/makesdna/DNA_image_types.h +++ b/source/blender/makesdna/DNA_image_types.h @@ -19,8 +19,10 @@ struct PackedFile; struct RenderResult; struct Scene; -/* ImageUser is in Texture, in Nodes, Background Image, Image Window, .... */ -/* should be used in conjunction with an ID * to Image. */ +/** + * ImageUser is in Texture, in Nodes, Background Image, Image Window, ... + * should be used in conjunction with an ID * to Image. + */ typedef struct ImageUser { /** To retrieve render result. */ struct Scene *scene; diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index 634b88b82f7..972f1a59b2d 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -275,7 +275,7 @@ typedef struct uiListDyn { void *customdata; /* Filtering data. */ - /** This bitfield is effectively exposed in Python, and scripts are explicitly allowed to assign + /** This bit-field is effectively exposed in Python, and scripts are explicitly allowed to assign * any own meaning to the lower 16 ones. * #items_len length. */ int *items_filter_flags; diff --git a/source/blender/makesrna/intern/rna_color.cc b/source/blender/makesrna/intern/rna_color.cc index 348d16eb5aa..0b6716297e8 100644 --- a/source/blender/makesrna/intern/rna_color.cc +++ b/source/blender/makesrna/intern/rna_color.cc @@ -597,8 +597,11 @@ struct Seq_colorspace_cb_data { Sequence *r_seq; }; -/* Colorspace could be changed for scene, but also VSE strip. If property pointer matches one of - * strip, set `r_seq`, so not all cached images have to be invalidated. */ +/** + * Color-space could be changed for scene, but also sequencer-strip. + * If property pointer matches one of strip, set `r_seq`, + * so not all cached images have to be invalidated. + */ static bool seq_find_colorspace_settings_cb(Sequence *seq, void *user_data) { Seq_colorspace_cb_data *cd = (Seq_colorspace_cb_data *)user_data; diff --git a/source/blender/python/gpu/gpu_py_batch.hh b/source/blender/python/gpu/gpu_py_batch.hh index 4646b53a1b7..13bb18513fa 100644 --- a/source/blender/python/gpu/gpu_py_batch.hh +++ b/source/blender/python/gpu/gpu_py_batch.hh @@ -25,7 +25,7 @@ struct BPyGPUBatch { /* The batch is owned, we may support thin wrapped batches later. */ blender::gpu::Batch *batch; #ifdef USE_GPU_PY_REFERENCES - /* Just to keep a user to prevent freeing buf's we're using */ + /* Just to keep a user to prevent freeing buffers we're using. */ PyObject *references; #endif }; diff --git a/source/blender/python/gpu/gpu_py_shader.hh b/source/blender/python/gpu/gpu_py_shader.hh index 3261208563d..8fb27bf6776 100644 --- a/source/blender/python/gpu/gpu_py_shader.hh +++ b/source/blender/python/gpu/gpu_py_shader.hh @@ -47,7 +47,7 @@ struct BPyGPUStageInterfaceInfo { PyObject_VAR_HEAD GPUStageInterfaceInfo *interface; #ifdef USE_GPU_PY_REFERENCES - /* Just to keep a user to prevent freeing buf's we're using. */ + /* Just to keep a user to prevent freeing buffers we're using. */ PyObject *references; #endif }; @@ -56,7 +56,7 @@ struct BPyGPUShaderCreateInfo { PyObject_VAR_HEAD GPUShaderCreateInfo *info; #ifdef USE_GPU_PY_REFERENCES - /* Just to keep a user to prevent freeing buf's we're using. */ + /* Just to keep a user to prevent freeing buffers we're using. */ PyObject *vertex_source; PyObject *fragment_source; PyObject *compute_source; diff --git a/source/blender/render/intern/render_types.h b/source/blender/render/intern/render_types.h index f9061abdbf5..7ee1e431861 100644 --- a/source/blender/render/intern/render_types.h +++ b/source/blender/render/intern/render_types.h @@ -132,7 +132,7 @@ struct ViewRender : public BaseRender { } }; -/* Controls state of render, everything that's read-only during render stage */ +/** Controls state of render, everything that's read-only during render stage. */ struct Render : public BaseRender { /* NOTE: Currently unused, provision for the future. * Add these now to allow the guarded memory allocator to catch C-specific function calls. */ diff --git a/source/blender/sequencer/intern/effects.cc b/source/blender/sequencer/intern/effects.cc index f0f95eeafc9..c41a0e63efb 100644 --- a/source/blender/sequencer/intern/effects.cc +++ b/source/blender/sequencer/intern/effects.cc @@ -2644,7 +2644,8 @@ void SEQ_effect_text_font_load(TextVars *data, const bool do_id_user) char filepath[FILE_MAX]; STRNCPY(filepath, vfont->filepath); if (BLI_thread_is_main()) { - /* FIXME: This is a band-aid fix. A proper solution has to be worked on by the VSE team. + /* FIXME: This is a band-aid fix. + * A proper solution has to be worked on by the sequencer team. * * This code can be called from non-main thread, e.g. when copying sequences as part of * depsgraph evaluated copy of the evaluated scene. Just skip font loading in that case, BLF diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_types.hh b/source/blender/windowmanager/gizmo/WM_gizmo_types.hh index 233b8732988..9ae61993540 100644 --- a/source/blender/windowmanager/gizmo/WM_gizmo_types.hh +++ b/source/blender/windowmanager/gizmo/WM_gizmo_types.hh @@ -189,9 +189,9 @@ ENUM_OPERATORS(eWM_GizmoFlagMapTypeUpdateFlag, WM_GIZMOMAPTYPE_KEYMAP_INIT) * \note Gizmos are responsible for handling this #wmGizmo.modal callback. */ enum eWM_GizmoFlagTweak { - /* Drag with extra precision (Shift). */ + /** Drag with extra precision (Shift). */ WM_GIZMO_TWEAK_PRECISE = (1 << 0), - /* Drag with snap enabled (Ctrl). */ + /** Drag with snap enabled (Control). */ WM_GIZMO_TWEAK_SNAP = (1 << 1), }; @@ -206,7 +206,7 @@ struct wmGizmoOpElem { bool is_redo; }; -/* Gizmos are set per region by registering them on gizmo-maps. */ +/** Gizmos are set per region by registering them on gizmo-maps. */ struct wmGizmo { wmGizmo *next, *prev; @@ -411,7 +411,7 @@ struct wmGizmoGroupTypeRef { wmGizmoGroupType *type; }; -/* Factory class for a gizmo-group type, gets called every time a new area is spawned. */ +/** Factory class for a gizmo-group type, gets called every time a new area is spawned. */ struct wmGizmoGroupType { const char *idname; /* #MAX_NAME. */ /** Gizmo-group name - displayed in UI (keymap editor). */