Cleanup: spelling in comments (make check_spelling_*)

Also use doxgen doc-strings.
This commit is contained in:
Campbell Barton
2025-06-03 10:01:04 +10:00
parent 440c6c8b6f
commit 87fb14fc42
4 changed files with 29 additions and 25 deletions

View File

@@ -142,7 +142,7 @@ bool operator==(const Error &left, const Error &right);
*
* \return On success, returns the template variables for the property. If no
* property is provided or if the property doesn't support path templates,
* returns nullopt.
* returns #std::nullopt.
*/
std::optional<blender::bke::path_templates::VariableMap> BKE_build_template_variables_for_prop(
const bContext *C, PointerRNA *ptr, PropertyRNA *prop);

View File

@@ -138,7 +138,7 @@ static void morph_points_to_curve(Span<float2> src, Span<float2> target, Mutable
dst.last() = src.last();
}
/* Creates a temporary brush with the fill guide settings. */
/** Creates a temporary brush with the fill guide settings. */
static Brush *create_fill_guide_brush()
{
Brush *fill_guides_brush = BKE_id_new_nomain<Brush>("Draw Fill Guides");
@@ -185,37 +185,39 @@ class PaintOperation : public GreasePencilStrokeOperation {
int frame_number_;
Vector<ed::greasepencil::MutableDrawingInfo> multi_frame_drawings_;
/* Screen space coordinates from input samples. */
/** Screen space coordinates from input samples. */
Vector<float2> screen_space_coords_orig_;
/* Temporary vector of curve fitted screen space coordinates per input sample from the active
* smoothing window. The length of this depends on `active_smooth_start_index_`. */
/**
* Temporary vector of curve fitted screen space coordinates per input sample from the active
* smoothing window. The length of this depends on `active_smooth_start_index_`.
*/
Vector<Vector<float2>> screen_space_curve_fitted_coords_;
/* Temporary vector of screen space offsets. */
/** Temporary vector of screen space offsets. */
Vector<float2> screen_space_jitter_offsets_;
/* Projection planes for every point in "Stroke" placement mode. */
/** Projection planes for every point in "Stroke" placement mode. */
Vector<std::optional<float>> stroke_placement_depths_;
/* Screen space coordinates after smoothing. */
/** Screen space coordinates after smoothing. */
Vector<float2> screen_space_smoothed_coords_;
/* Screen space coordinates after smoothing and jittering. */
/** Screen space coordinates after smoothing and jittering. */
Vector<float2> screen_space_final_coords_;
/* The start index of the smoothing window. */
/** The start index of the smoothing window. */
int active_smooth_start_index_ = 0;
blender::float4x2 texture_space_ = float4x2::identity();
/* Helper class to project screen space coordinates to 3d. */
/** Helper class to project screen space coordinates to 3d. */
ed::greasepencil::DrawingPlacement placement_;
/* Last valid stroke intersection, for use in Stroke projection mode. */
/** Last valid stroke intersection, for use in Stroke projection mode. */
std::optional<float> last_stroke_placement_depth_;
/* Point index of the last valid stroke placement. */
/** Point index of the last valid stroke placement. */
std::optional<int> last_stroke_placement_point_;
/* Direction the pen is moving in smoothed over time. */
/** Direction the pen is moving in smoothed over time. */
float2 smoothed_pen_direction_ = float2(0.0f);
/* Accumulated distance along the stroke. */
/** Accumulated distance along the stroke. */
float accum_distance_ = 0.0f;
RandomNumberGenerator rng_;
@@ -228,12 +230,12 @@ class PaintOperation : public GreasePencilStrokeOperation {
float stroke_random_sat_factor_;
float stroke_random_val_factor_;
/* The current time at which the paint operation begins. */
/** The current time at which the paint operation begins. */
double start_time_;
/* Current delta time from #start_time_, updated after each extension sample. */
/** Current delta time from #start_time_, updated after each extension sample. */
double delta_time_;
/* Set to true when the painr operation is used to draw fill guides. */
/** Set to true when the paint operation is used to draw fill guides. */
bool do_fill_guides_;
friend struct PaintOperationExecutor;
@@ -249,7 +251,7 @@ class PaintOperation : public GreasePencilStrokeOperation {
PaintOperation(const bool do_fill_guides = false) : do_fill_guides_(do_fill_guides) {}
bool update_stroke_depth_placement(const bContext &C, const InputSample &sample);
/* Returns the range of actually reprojected points. */
/** Returns the range of actually reprojected points. */
IndexRange interpolate_stroke_depth(const bContext &C,
std::optional<int> start_point,
float from_depth,

View File

@@ -177,8 +177,8 @@ bool SVGExporter::export_scene(Scene &scene, StringRefNull filepath)
this->write_document_header();
pugi::xml_node main_node = this->write_main_node();
/* Put frames in a hidden group. They are referenced later by a <use>-node that displays
* them in order. Use a group rather than a <defs>-node because some graphics applications
/* Put frames in a hidden group. They are referenced later by a `<use>-node` that displays
* them in order. Use a group rather than a `<defs>-node` because some graphics applications
* don't expose those to users making it hard for them to work with the file.
*/
pugi::xml_node frames_group_node = main_node.append_child("g");

View File

@@ -29,15 +29,17 @@ static Mutex source_image_cache_mutex;
struct SourceImageCache {
struct FrameEntry {
ImBuf *image = nullptr;
/* Frame in timeline, relative to strip start. Used to determine which
* entries to evict (furthest from the playhead). Due to reversed
/**
* Frame in timeline, relative to strip start. Used to determine which
* entries to evict (furthest from the play-head). Due to reversed
* frames, playback rate, retiming the relationship between source frame
* index and timeline frame is not a simple one. */
* index and timeline frame is not a simple one.
*/
float strip_frame = 0;
};
struct StripEntry {
/* Map key is {source media frame index (i.e. movie frame), view ID}. */
/** Map key is {source media frame index (i.e. movie frame), view ID}. */
Map<std::pair<int, int>, FrameEntry> frames;
};