Cleanup: malformed C-style comment blocks, spelling

- Missing star prefix.
- Unnecessary indentation.
- Blank line after dot-points
  (otherwise doxygen merges with the previous dot-point).
- Use back-slash for doxygen commands.
- Correct spelling.
This commit is contained in:
Campbell Barton 2022-04-11 11:41:00 +10:00
parent 1c264ebdc0
commit 5e47056e8d
38 changed files with 136 additions and 115 deletions

View File

@ -165,7 +165,7 @@ void BKE_pchan_minmax(const struct Object *ob,
float r_max[3]);
/**
* Calculate the axis aligned bounds of the pose of `ob` in world-space.
*
* `r_min` and `r_max` are expanded to fit `ob->pose` so the caller must initialize them
* (typically using #INIT_MINMAX).
*

View File

@ -16,7 +16,7 @@ struct Main;
struct PointerRNA;
/**
Callbacks for One Off Actions
* Callbacks for One Off Actions
* =============================
*
* - `{ACTION}` use in cases where only a single callback is required,

View File

@ -59,7 +59,7 @@ struct CryptomatteHash {
std::string hex_encoded() const;
/**
Convert a cryptomatte hash to a float.
* Convert a cryptomatte hash to a float.
*
* Cryptomatte hashes are stored in float textures and images. The conversion is taken from the
* cryptomatte specification. See Floating point conversion section in

View File

@ -43,16 +43,16 @@ typedef struct CfraElem {
/* ************** F-Curve Modifiers *************** */
/* F-Curve Modifier Type-Info (fmi):
* This struct provides function pointers for runtime, so that functions can be
* written more generally (with fewer/no special exceptions for various modifiers).
/**
* F-Curve Modifier Type-Info (fmi):
* This struct provides function pointers for runtime, so that functions can be
* written more generally (with fewer/no special exceptions for various modifiers).
*
* Callers of these functions must check that they actually point to something useful,
* as some constraints don't define some of these.
* Callers of these functions must check that they actually point to something useful,
* as some constraints don't define some of these.
*
* Warning: it is not too advisable to reorder order of members of this struct,
* as you'll have to edit quite a few ($FMODIFIER_NUM_TYPES) of these
* structs.
* \warning it is not too advisable to reorder order of members of this struct,
* as you'll have to edit quite a few (#FMODIFIER_NUM_TYPES) of these structs.
*/
typedef struct FModifierTypeInfo {
/* admin/ident */

View File

@ -31,16 +31,17 @@ typedef enum eGPUpdateCacheNodeFlag {
} eGPUpdateCacheNodeFlag;
/**
* Cache for what needs to be updated after bGPdata was modified.
* Cache for what needs to be updated after bGPdata was modified.
*
* Every node holds information about one element that was changed:
* - the index of where that element is in the linked-list
* - the pointer to the original element in bGPdata
* Additionally, nodes also hold other nodes that are one "level" below them.
* E.g. a node that represents a change on a bGPDframe could contain a set of
* nodes that represent a change on bGPDstrokes.
* These nodes are stored in a red-black tree so that they are sorted by their
* index to make sure they can be processed in the correct order.
* Every node holds information about one element that was changed:
* - The index of where that element is in the linked-list.
* - The pointer to the original element in bGPdata.
*
* Additionally, nodes also hold other nodes that are one "level" below them.
* E.g. a node that represents a change on a bGPDframe could contain a set of
* nodes that represent a change on bGPDstrokes.
* These nodes are stored in a red-black tree so that they are sorted by their
* index to make sure they can be processed in the correct order.
*/
typedef struct GPencilUpdateCache {
/* Mapping from index to a GPencilUpdateCache struct. */

View File

@ -773,9 +773,9 @@ struct bNode *nodeGetActiveTexture(struct bNodeTree *ntree);
struct bNode *nodeGetActivePaintCanvas(struct bNodeTree *ntree);
/**
* @brief Does the given node supports the sub active flag.
* \brief Does the given node supports the sub active flag.
*
* @param sub_active The active flag to check. NODE_ACTIVE_TEXTURE/NODE_ACTIVE_PAINT_CANVAS
* \param sub_active: The active flag to check. #NODE_ACTIVE_TEXTURE / #NODE_ACTIVE_PAINT_CANVAS.
*/
bool nodeSupportsActiveFlag(const struct bNode *node, int sub_active);

View File

@ -124,7 +124,7 @@ void BKE_rigidbody_validate_sim_world(struct Scene *scene,
/**
* Helper function to calculate volume of rigid-body object.
*
* TODO: allow a parameter to specify method used to calculate this?
*/
void BKE_rigidbody_calc_volume(struct Object *ob, float *r_vol);

View File

@ -888,7 +888,7 @@ static void default_get_tarmat_full_bbone(struct Depsgraph *UNUSED(depsgraph),
/* This following macro should be used for all standard single-target *_get_tars functions
* to save typing and reduce maintenance woes. It does not do the subtarget related operations
* (Hopefully all compilers will be happy with the lines with just a space on them. Those are
* really just to help this code easier to read)
* really just to help this code easier to read)
*/
/* TODO: cope with getting rotation order... */
#define SINGLETARGETNS_GET_TARS(con, datatar, ct, list) \
@ -932,7 +932,7 @@ static void default_get_tarmat_full_bbone(struct Depsgraph *UNUSED(depsgraph),
* to save typing and reduce maintenance woes. It does not do the subtarget related operations.
* NOTE: the pointer to ct will be changed to point to the next in the list (as it gets removed)
* (Hopefully all compilers will be happy with the lines with just a space on them. Those are
* really just to help this code easier to read)
* really just to help this code easier to read)
*/
#define SINGLETARGETNS_FLUSH_TARS(con, datatar, ct, list, no_copy) \
{ \

View File

@ -21,7 +21,7 @@ static void add_implicit_conversion(DataTypeConversions &conversions)
static fn::CustomMF_SI_SO<From, To> multi_function{
conversion_name.c_str(),
/* Use lambda instead of passing #ConversionF directly, because otherwise the compiler won't
inline the function. */
* inline the function. */
[](const From &a) { return ConversionF(a); }};
static auto convert_single_to_initialized = [](const void *src, void *dst) {
*(To *)dst = ConversionF(*(const From *)src);

View File

@ -5,8 +5,8 @@
/** \file
* \ingroup bli
*
* This header file contains both a C interface and a C++ interface
* to the 2D Constrained Delaunay Triangulation library routine.
* This header file contains both a C interface and a C++ interface
* to the 2D Constrained Delaunay Triangulation library routine.
*/
#ifdef __cplusplus

View File

@ -270,7 +270,7 @@ struct LinkNode *BLI_file_read_as_lines(const char *file) ATTR_WARN_UNUSED_RESUL
void *BLI_file_read_text_as_mem(const char *filepath, size_t pad_bytes, size_t *r_size);
/**
* Return the text file data with:
*
* - Newlines replaced with '\0'.
* - Optionally trim white-space, replacing trailing <space> & <tab> with '\0'.
*

View File

@ -5,8 +5,8 @@
/** \file
* \ingroup bli
*
* Mesh intersection library functions.
* Uses exact arithmetic, so need GMP.
* Mesh intersection library functions.
* Uses exact arithmetic, so need GMP.
*/
#ifdef WITH_GMP

View File

@ -255,7 +255,7 @@ size_t BLI_str_unescape(char *__restrict dst, const char *__restrict src, size_t
*
* \param str: Typically this is the first character in a quoted string.
* Where the character before `*str` would be `"`.
*
* \return The pointer to the first un-escaped quote.
*/
const char *BLI_str_escape_find_quote(const char *str) ATTR_NONNULL();

View File

@ -2807,7 +2807,7 @@ blender::meshintersect::CDT_result<mpq_class> delaunay_2d_calc(const CDT_input<m
/* C interface. */
/**
This function uses the double version of #CDT::delaunay_calc.
* This function uses the double version of #CDT::delaunay_calc.
* Almost all of the work here is to convert between C++ #Arrays<Vector<int>>
* and a C version that linearizes all the elements and uses a "start"
* and "len" array to say where the individual vectors start and how

View File

@ -1857,23 +1857,23 @@ double incircle(const double *pa, const double *pb, const double *pc, const doub
}
/**
* inspherefast() Approximate 3D insphere test. Non-robust.
* insphere() Adaptive exact 3D insphere test. Robust.
* inspherefast() Approximate 3D insphere test. Non-robust.
* insphere() Adaptive exact 3D insphere test. Robust.
*
* Return a positive value if the point pe lies inside the
* sphere passing through pa, pb, pc, and pd; a negative value
* if it lies outside; and zero if the five points are
* co-spherical. The points pa, pb, pc, and pd must be ordered
* so that they have a positive orientation (as defined by
* orient3d()), or the sign of the result will be reversed.
* Return a positive value if the point pe lies inside the
* sphere passing through pa, pb, pc, and pd; a negative value
* if it lies outside; and zero if the five points are
* co-spherical. The points pa, pb, pc, and pd must be ordered
* so that they have a positive orientation (as defined by
* orient3d()), or the sign of the result will be reversed.
*
* The second uses exact arithmetic to ensure a correct answer. The
* result returned is the determinant of a matrix. In insphere() only,
* this determinant is computed adaptively, in the sense that exact
* arithmetic is used only to the degree it is needed to ensure that the
* returned value has the correct sign. Hence, insphere() is usually quite
* fast, but will run more slowly when the input points are co-spherical or
* nearly so.
* The second uses exact arithmetic to ensure a correct answer. The
* result returned is the determinant of a matrix. In insphere() only,
* this determinant is computed adaptively, in the sense that exact
* arithmetic is used only to the degree it is needed to ensure that the
* returned value has the correct sign. Hence, insphere() is usually quite
* fast, but will run more slowly when the input points are co-spherical or
* nearly so.
*/
double inspherefast(

View File

@ -988,7 +988,7 @@ void discard_edit_mode_pointers(ID *id_cow)
} // namespace
/**
Free content of the CoW data-block.
* Free content of the CoW data-block.
* Notes:
* - Does not recurse into nested ID data-blocks.
* - Does not free data-block itself.

View File

@ -10,10 +10,10 @@
struct ShaderParameters;
/**
* Space accessor.
* Space accessor.
*
* Image engine is used to draw the images inside multiple spaces \see SpaceLink.
* The AbstractSpaceAccessor is an interface to communicate with a space.
* Image engine is used to draw the images inside multiple spaces \see SpaceLink.
* The #AbstractSpaceAccessor is an interface to communicate with a space.
*/
class AbstractSpaceAccessor {
public:

View File

@ -92,7 +92,7 @@ GPU_SHADER_CREATE_INFO(workbench_material)
GPU_SHADER_CREATE_INFO(workbench_transparent_accum)
/* Note: Blending will be skipped on objectId because output is a
non-normalized integer buffer. */
* non-normalized integer buffer. */
.fragment_out(0, Type::VEC4, "transparentAccum")
.fragment_out(1, Type::VEC4, "revealageAccum")
.fragment_out(2, Type::UINT, "objectId")

View File

@ -8,20 +8,20 @@
* ====================
*
* - Push & Relax, Breakdowner
*
* These tools provide the animator with various capabilities
* for interactively controlling the spacing of poses, but also
* for 'pushing' and/or 'relaxing' extremes as they see fit.
*
* - Propagate
*
* This tool copies elements of the selected pose to successive
* keyframes, allowing the animator to go back and modify the poses
* for some "static" pose controls, without having to repeatedly
* doing a "next paste" dance.
*
* - Pose Sculpting (TODO)
*
* This is yet to be implemented, but the idea here is to use
* sculpting techniques to make it easier to pose rigs by allowing
* rigs to be manipulated using a familiar paint-based interface.

View File

@ -41,7 +41,7 @@ namespace blender::ed::asset {
/* -------------------------------------------------------------------- */
/** \name Asset list API
*
* Internally re-uses #FileList from the File Browser. It does all the heavy lifting already.
* Internally re-uses #FileList from the File Browser. It does all the heavy lifting already.
* \{ */
/**

View File

@ -325,7 +325,7 @@ struct UVPackIsland_Params {
};
/**
* Returns true if UV coordinates lie on a valid tile in UDIM grid or tiled image.
* Returns true if UV coordinates lie on a valid tile in UDIM grid or tiled image.
*/
bool uv_coords_isect_udim(const struct Image *image,
const int udim_grid[2],

View File

@ -1028,7 +1028,7 @@ void ui_draw_but_CURVE(struct ARegion *region,
const struct uiWidgetColors *wcol,
const rcti *rect);
/**
* Draws the curve profile widget. Somewhat similar to ui_draw_but_CURVE.
* Draws the curve profile widget. Somewhat similar to ui_draw_but_CURVE.
*/
void ui_draw_but_CURVEPROFILE(struct ARegion *region,
uiBut *but,

View File

@ -1281,7 +1281,7 @@ void SCENE_OT_view_layer_add_used_lightgroups(wmOperatorType *ot)
/** \} */
/* -------------------------------------------------------------------- */
/** \name View Layer Remove Unussed Lightgroups Operator
/** \name View Layer Remove Unused Lightgroups Operator
* \{ */
static int view_layer_remove_unused_lightgroups_exec(bContext *C, wmOperator *UNUSED(op))

View File

@ -201,13 +201,11 @@ struct SculptRakeData {
float follow_co[3];
};
/*
Generic thread data. The size of this struct
has gotten a little out of hand; normally we would
split it up, but it might be better to see if we can't
eliminate it altogether after moving to C++ (where
we'll be able to use lambdas).
*/
/**
* Generic thread data. The size of this struct has gotten a little out of hand;
* normally we would split it up, but it might be better to see if we can't eliminate it
* altogether after moving to C++ (where we'll be able to use lambdas).
*/
typedef struct SculptThreadedTaskData {
struct bContext *C;
struct Sculpt *sd;

View File

@ -454,7 +454,7 @@ static void do_smear_brush_task_cb_exec(void *__restrict userdata,
}
/* Multiply weight with edge lengths (in the future this will be
cotangent weights or face areas). */
* cotangent weights or face areas). */
w *= len;
/* Build directional weight. */

View File

@ -27,31 +27,46 @@ using namespace std;
namespace Freestyle {
// Integration method
/** The different integration methods that can be invoked to integrate into a single value the set
/**
* The different integration methods that can be invoked to integrate into a single value the set
* of values obtained from each 0D element of a 1D element.
*/
typedef enum {
MEAN, /**< The value computed for the 1D element is the mean of the values obtained for the 0D
elements. */
MIN, /**< The value computed for the 1D element is the minimum of the values obtained for the 0D
elements. */
MAX, /**< The value computed for the 1D element is the maximum of the values obtained for the 0D
elements. */
FIRST, /**< The value computed for the 1D element is the first of the values obtained for the 0D
elements. */
LAST, /**< The value computed for the 1D element is the last of the values obtained for the 0D
elements. */
/**
* The value computed for the 1D element is the mean of the values obtained for the 0D elements.
*/
MEAN,
/**
* The value computed for the 1D element is the minimum of the values obtained for the 0D
* elements.
*/
MIN,
/**
* The value computed for the 1D element is the maximum of the values obtained for the 0D
* elements.
*/
MAX,
/**
* The value computed for the 1D element is the first of the values obtained for the 0D
* elements.
*/
FIRST,
/**
* The value computed for the 1D element is the last of the values obtained for the 0D
* elements.
*/
LAST,
} IntegrationType;
/** Returns a single value from a set of values evaluated at each 0D element of this 1D element.
* \param fun:
* The UnaryFunction0D used to compute a value at each Interface0D.
* \param it:
* The Interface0DIterator used to iterate over the 0D elements of this 1D element. The
* integration will occur over the 0D elements starting from the one pointed by it. \param it_end:
* The Interface0DIterator pointing the end of the 0D elements of the 1D element.
* \param integration_type:
* The integration method used to compute a single value from a set of values.
/**
* Returns a single value from a set of values evaluated at each 0D element of this 1D element.
*
* \param fun: The UnaryFunction0D used to compute a value at each Interface0D.
* \param it: The Interface0DIterator used to iterate over the 0D elements of this 1D element.
* The integration will occur over the 0D elements starting from the one pointed by it.
* \param it_end: The Interface0DIterator pointing the end of the 0D elements of the 1D element.
* \param integration_type: The integration method used to compute a single value from a set of
* values.
* \return the single value obtained for the 1D element.
*/
template<class T>

View File

@ -20,7 +20,7 @@ namespace blender::fn {
* 2. single output (SO) of type Out1
*
* This example creates a function that adds 10 to the incoming values:
* CustomMF_SI_SO<int, int> fn("add 10", [](int value) { return value + 10; });
* `CustomMF_SI_SO<int, int> fn("add 10", [](int value) { return value + 10; });`
*/
template<typename In1, typename Out1> class CustomMF_SI_SO : public MultiFunction {
private:

View File

@ -218,10 +218,12 @@ static void apply_stroke_envelope(
max_ii(0, i + j - spread_left);
const int i2 = is_cyclic ? (i + j + spread_right) % gps->totpoints :
min_ii(gps->totpoints - 1, i + j + spread_right);
/*bool side = dot_v3v3(&old_points[i1].x, plane_no) < dot_v3v3(plane_no, &old_points[i2].x);
#if 0
bool side = dot_v3v3(&old_points[i1].x, plane_no) < dot_v3v3(plane_no, &old_points[i2].x);
if (side) {
continue;
}*/
}
#endif
float lambda = line_plane_factor_v3(
&point->x, plane_no, &old_points[i1].x, &old_points[i2].x);
if (lambda <= 0.0f || lambda >= 1.0f) {

View File

@ -40,7 +40,7 @@ struct NodePlacementContext {
/* Converts USD materials to Blender representation. */
/**
By default, the #USDMaterialReader creates a Blender material with
* By default, the #USDMaterialReader creates a Blender material with
* the same name as the USD material. If the USD material has a
* #UsdPreviewSurface source, the Blender material's viewport display
* color, roughness and metallic properties are set to the corresponding

View File

@ -349,8 +349,10 @@ typedef struct ID_Runtime_Remap {
int status;
/** During ID remapping the number of skipped use cases that refcount the data-block. */
int skipped_refcounted;
/** During ID remapping the number of direct use cases that could be remapped (e.g. obdata when
in edit mode). */
/**
* During ID remapping the number of direct use cases that could be remapped
* (e.g. obdata when in edit mode).
*/
int skipped_direct;
/** During ID remapping, the number of indirect use cases that could not be remapped. */
int skipped_indirect;

View File

@ -365,9 +365,9 @@ void rna_ViewLayer_active_lightgroup_index_range(
int rna_ViewLayer_active_lightgroup_index_get(PointerRNA *ptr);
void rna_ViewLayer_active_lightgroup_index_set(PointerRNA *ptr, int value);
/**
* Set `r_rna_path` with the base view-layer path.
* `rna_path_buffer_size` should be at least `sizeof(ViewLayer.name) * 3`.
* \return actual length of the generated RNA path.
* Set `r_rna_path` with the base view-layer path.
* `rna_path_buffer_size` should be at least `sizeof(ViewLayer.name) * 3`.
* \return actual length of the generated RNA path.
*/
size_t rna_ViewLayer_path_buffer_get(struct ViewLayer *view_layer,
char *r_rna_path,

View File

@ -30,14 +30,16 @@ typedef struct IDProperty IDProperty;
/* Function Callbacks */
/** Update callback for an RNA property.
/**
* Update callback for an RNA property.
*
* \note This is NOT called automatically when writing into the property, it needs to be called
* \note This is NOT called automatically when writing into the property, it needs to be called
* manually (through #RNA_property_update or #RNA_property_update_main) when needed.
*
* \param bmain: the Main data-base to which `ptr` data belongs.
* \param active_scene: The current active scene (may be NULL in some cases).
* \param ptr: The RNA pointer data to update. */
* \param bmain: the Main data-base to which `ptr` data belongs.
* \param active_scene: The current active scene (may be NULL in some cases).
* \param ptr: The RNA pointer data to update.
*/
typedef void (*UpdateFunc)(struct Main *bmain, struct Scene *active_scene, struct PointerRNA *ptr);
typedef void (*ContextPropUpdateFunc)(struct bContext *C,
struct PointerRNA *ptr,

View File

@ -28,15 +28,15 @@ const FloatMathOperationInfo *get_float_compare_operation_info(int operation);
/**
* This calls the `callback` with two arguments:
* 1. The math function that takes a float as input and outputs a new float.
* 2. A #FloatMathOperationInfo struct reference.
* 1. The math function that takes a float as input and outputs a new float.
* 2. A #FloatMathOperationInfo struct reference.
* Returns true when the callback has been called, otherwise false.
*
* The math function that is passed to the callback is actually a lambda function that is different
* for every operation. Therefore, if the callback is templated on the math function, it will get
* instantiated for every operation separately. This has two benefits:
* - The compiler can optimize the callback for every operation separately.
* - A static variable declared in the callback will be generated for every operation separately.
* - The compiler can optimize the callback for every operation separately.
* - A static variable declared in the callback will be generated for every operation separately.
*
* If separate instantiations are not desired, the callback can also take a function pointer with
* the following signature as input instead: float (*math_function)(float a).

View File

@ -120,8 +120,8 @@ class GatherLinkSearchOpParams {
/**
* This callback can be used for a node type when a few things are true about its inputs.
* To avoid creating more boilerplate, it is the default callback for node types.
* - Either all declared sockets are visible in the default state of the node, *OR* the node's
* type's declaration has been extended with #make_available functions for those sockets.
* - Either all declared sockets are visible in the default state of the node, *OR* the node's
* type's declaration has been extended with #make_available functions for those sockets.
*
* If a node type does not meet these criteria, the function will do nothing in a release build.
* In a debug build, an assert will most likely be hit.

View File

@ -627,7 +627,7 @@ static void calc_dual_mesh(GeometrySet &geometry_set,
calc_boundaries(mesh_in, vertex_types, edge_types);
/* Stores the indices of the polygons connected to the vertex. Because the polygons are looped
* over in order of their indices, the polygon's indices will be sorted in ascending order.
(This can change once they are sorted using `sort_vertex_polys`). */
* (This can change once they are sorted using `sort_vertex_polys`). */
Array<Vector<int>> vertex_poly_indices(mesh_in.totvert);
Array<Array<int>> vertex_shared_edges(mesh_in.totvert);
Array<Array<int>> vertex_corners(mesh_in.totvert);

View File

@ -11,7 +11,7 @@
* strings more cumbersome as otherwise small expressions become multi-line code-blocks.
* Optional (ignored when NULL), otherwise this is a NULL terminated array of module names.
*
Failure to import any modules prevents any further execution.
* Failure to import any modules prevents any further execution.
*
* - `err_info` #BPy_RunErrInfo is passed to some functions so errors can be forwarded to the UI.
* Option (when NULL errors are printed to the `stdout` and cleared).

View File

@ -189,7 +189,7 @@ static PyObject *bpy_flip_name(PyObject *UNUSED(self), PyObject *args, PyObject
}
/* Worst case we gain one extra byte (besides null-terminator) by changing
"Left" to "Right", because only the first appearance of "Left" gets replaced. */
* "Left" to "Right", because only the first appearance of "Left" gets replaced. */
const size_t size = name_src_len + 2;
char *name_dst = PyMem_MALLOC(size);
const size_t name_dst_len = BLI_string_flip_side_name(name_dst, name_src, strip_digits, size);

View File

@ -49,10 +49,11 @@
* Function:
* All images created during rendering are added to cache, even if the cache is already full.
* This is because:
* - one image may be needed multiple times during rendering.
* - keeping the last rendered frame allows us for faster re-render when user edits strip in stack
* - we can decide if we keep frame only when it's completely rendered. Otherwise we risk having
* "holes" in the cache, which can be annoying
* - One image may be needed multiple times during rendering.
* - Keeping the last rendered frame allows us for faster re-render when user edits strip in stack.
* - We can decide if we keep frame only when it's completely rendered. Otherwise we risk having
* "holes" in the cache, which can be annoying.
*
* If the cache is full all entries for pending frame will have is_temp_cache set.
*
* Linking: We use links to reduce number of iterations over entries needed to manage cache.