From 99ed1bd46b2c67dd4212684b07fca82c1439b9ce Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Oct 2025 15:19:01 +1100 Subject: [PATCH] Cleanup: use doxygen style comments for doc-strings --- .../blenkernel/BKE_attribute_storage.hh | 2 +- source/blender/blenkernel/BKE_customdata.hh | 16 ++++++++------ source/blender/blenlib/BLI_string_ref.hh | 2 +- .../blender/makesdna/DNA_customdata_types.h | 21 +++++++++++-------- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/source/blender/blenkernel/BKE_attribute_storage.hh b/source/blender/blenkernel/BKE_attribute_storage.hh index aa2f635bc4a..76a1716a8ea 100644 --- a/source/blender/blenkernel/BKE_attribute_storage.hh +++ b/source/blender/blenkernel/BKE_attribute_storage.hh @@ -41,7 +41,7 @@ class Attribute { * stores the size and type itself. It may be possible to make use of that fact to avoid * storing it here, or even vice versa. */ void *data; - /* The number of elements in the array. */ + /** The number of elements in the array. */ int64_t size; ImplicitSharingPtr<> sharing_info; static ArrayData from_value(const GPointer &value, int64_t domain_size); diff --git a/source/blender/blenkernel/BKE_customdata.hh b/source/blender/blenkernel/BKE_customdata.hh index 7c3f3e6c1f2..20616962788 100644 --- a/source/blender/blenkernel/BKE_customdata.hh +++ b/source/blender/blenkernel/BKE_customdata.hh @@ -36,12 +36,14 @@ namespace blender::bke { enum class AttrDomain : int8_t; } -/* These names are used as prefixes for UV layer names to find the associated boolean +/** + * These names are used as prefixes for UV layer names to find the associated boolean * layers. They should never be longer than 2 chars, as #MAX_CUSTOMDATA_LAYER_NAME * has 4 extra bytes above what can be used for the base layer name, and these * prefixes are placed between 2 '.'s at the start of the layer name. * For example The uv vert selection layer of a layer named `UVMap.001` - * will be called `.pn.UVMap.001`. */ + * will be called `.pn.UVMap.001`. + */ #define UV_PINNED_NAME "pn" /** @@ -57,7 +59,7 @@ struct BMUVOffsets { /** All values reference none layers. */ #define BMUVOFFSETS_NONE {-1, -1} -/* A data type large enough to hold 1 element from any custom-data layer type. */ +/** A data type large enough to hold 1 element from any custom-data layer type. */ struct CDBlockBytes { unsigned char data[64]; }; @@ -69,10 +71,10 @@ extern const CustomData_MeshMasks CD_MASK_DERIVEDMESH; extern const CustomData_MeshMasks CD_MASK_BMESH; extern const CustomData_MeshMasks CD_MASK_EVERYTHING; -/* for ORIGINDEX layer type, indicates no original index for this element */ +/** For ORIGINDEX layer type, indicates no original index for this element. */ #define ORIGINDEX_NONE -1 -/* initializes a CustomData object with the same layer setup as source and +/* Initializes a CustomData object with the same layer setup as source and * memory space for totelem elements. mask must be an array of length * CD_NUMTYPES elements, that indicate if a layer can be copied. */ @@ -179,7 +181,9 @@ void CustomData_init_layout_from(const CustomData *source, eCDAllocType alloctype, int totelem); -/* BMESH_TODO, not really a public function but `readfile.cc` needs it. */ +/** + * \note Ideally this would not be a public function but versioning needs it. + */ void CustomData_update_typemap(CustomData *data); /** diff --git a/source/blender/blenlib/BLI_string_ref.hh b/source/blender/blenlib/BLI_string_ref.hh index f14632e8d2a..6a73db59803 100644 --- a/source/blender/blenlib/BLI_string_ref.hh +++ b/source/blender/blenlib/BLI_string_ref.hh @@ -53,7 +53,7 @@ class StringRefBase { constexpr StringRefBase(const char *data, int64_t size); public: - /* Similar to string_view::npos, but signed. */ + /** Similar to #string_view::npos, but signed. */ static constexpr int64_t not_found = -1; constexpr int64_t size() const; diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index b3cf153faa5..a2a3f7dfd79 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -184,7 +184,8 @@ typedef enum eCustomDataType { using eCustomDataMask = uint64_t; #endif -/* Bits for eCustomDataMask */ +/* Bits for #eCustomDataMask */ + #define CD_MASK_MDEFORMVERT (1 << CD_MDEFORMVERT) #define CD_MASK_MFACE (1 << CD_MFACE) #define CD_MASK_MTFACE (1 << CD_MTFACE) @@ -222,17 +223,17 @@ using eCustomDataMask = uint64_t; /** Multi-resolution loop data. */ #define CD_MASK_MULTIRES_GRIDS (CD_MASK_MDISPS | CD_GRID_PAINT_MASK) -/* All data layers. */ +/** All data layers. */ #define CD_MASK_ALL (~0LL) -/* All generic attributes. */ +/** All generic attributes. */ #define CD_MASK_PROP_ALL \ (CD_MASK_PROP_FLOAT | CD_MASK_PROP_FLOAT2 | CD_MASK_PROP_FLOAT3 | CD_MASK_PROP_INT32 | \ CD_MASK_PROP_COLOR | CD_MASK_PROP_STRING | CD_MASK_PROP_BYTE_COLOR | CD_MASK_PROP_BOOL | \ CD_MASK_PROP_INT8 | CD_MASK_PROP_INT16_2D | CD_MASK_PROP_INT32_2D | CD_MASK_PROP_QUATERNION | \ CD_MASK_PROP_FLOAT4X4) -/* All color attributes */ +/** All color attributes */ #define CD_MASK_COLOR_ALL (CD_MASK_PROP_COLOR | CD_MASK_PROP_BYTE_COLOR) typedef struct CustomData_MeshMasks { @@ -245,14 +246,16 @@ typedef struct CustomData_MeshMasks { /** #CustomData.flag */ enum { - /* Indicates layer should not be copied by CustomData_from_template or CustomData_copy_data */ + /** + * Indicates layer should not be copied by #CustomData_from_template or #CustomData_copy_data. + */ CD_FLAG_NOCOPY = (1 << 0), CD_FLAG_UNUSED = (1 << 1), - /* Indicates the layer is only temporary, also implies no copy */ + /** Indicates the layer is only temporary, also implies no copy */ CD_FLAG_TEMPORARY = ((1 << 2) | CD_FLAG_NOCOPY), - /* Indicates the layer is stored in an external file */ + /** Indicates the layer is stored in an external file */ CD_FLAG_EXTERNAL = (1 << 3), - /* Indicates external data is read into memory */ + /** Indicates external data is read into memory */ CD_FLAG_IN_MEMORY = (1 << 4), #ifdef DNA_DEPRECATED_ALLOW CD_FLAG_COLOR_ACTIVE = (1 << 5), @@ -260,5 +263,5 @@ enum { #endif }; -/* Limits */ +/** Limits. */ #define MAX_MTFACE 8