Cleanup: spelling in comments

This commit is contained in:
Campbell Barton
2024-12-09 09:14:44 +11:00
parent 2a0a6d38df
commit 083b690fb5
17 changed files with 43 additions and 41 deletions

View File

@@ -1527,12 +1527,12 @@ void action_fcurve_move(Action &action_dst,
/**
* Moves all F-Curves from one Channelbag to the other.
*
* The Channelbags do not need to be part of the same action, or even belong to
* The Channel-bags do not need to be part of the same action, or even belong to
* an action at all.
*
* If the F-Curves belonged to channel groups, the group membership also carries
* over to the destination Channelbag. If groups with the same names don't
* exist, they are created. \see blender::animrig::action_fcurve_detach
* exist, they are created. \see #blender::animrig::action_fcurve_detach
*
* The order of existing channel groups in the destination Channelbag are not
* changed, and any new groups are placed after those in the order they appeared

View File

@@ -916,7 +916,7 @@ static void blf_font_boundbox_ex(FontBLF *font,
const ft_pix pen_x_next = pen_x + g->advance_x;
const ft_pix gbox_xmin = std::min(pen_x, pen_x + g->box_xmin);
/* Monspaced characters should only use advance. #130385. */
/* Mono-spaced characters should only use advance. See #130385. */
const ft_pix gbox_xmax = (font->flags & BLF_MONOSPACED) ?
pen_x_next :
std::max(pen_x_next, pen_x + g->box_xmax);

View File

@@ -427,7 +427,7 @@ struct ARegionRuntime {
/** Callbacks for this region type. */
struct ARegionType *type;
/** Runtime for partial redraw, same or smaller than winrct. */
/** Runtime for partial redraw, same or smaller than #ARegion::winrct. */
rcti drawrct = {};
/**

View File

@@ -902,7 +902,7 @@ static void sound_start_play_scene(Scene *scene)
static double get_cur_time(Scene *scene)
{
/* We divide by the current framelen to take into account time remapping.
/* We divide by the current `framelen` to take into account time remapping.
* Otherwise we will get the wrong starting time which will break A/V sync.
* See #74111 for further details. */
return FRA2TIME((scene->r.cfra + scene->r.subframe) / double(scene->r.framelen));
@@ -920,14 +920,12 @@ void BKE_sound_play_scene(Scene *scene)
if (scene->sound_scrub_handle &&
AUD_Handle_getStatus(scene->sound_scrub_handle) != AUD_STATUS_INVALID)
{
/* If the audio scrub handle is playbing back, stop to make sure it is not active.
* Otherwise, it will trigger a callback that will stop audio playback.
*/
/* If the audio scrub handle is playing back, stop to make sure it is not active.
* Otherwise, it will trigger a callback that will stop audio playback. */
AUD_Handle_stop(scene->sound_scrub_handle);
scene->sound_scrub_handle = nullptr;
/* The scrub_handle started playback with playback_handle, stop it so we can
* properly restart it.
*/
* properly restart it. */
AUD_Handle_pause(scene->playback_handle);
}
@@ -945,9 +943,7 @@ void BKE_sound_play_scene(Scene *scene)
if (status != AUD_STATUS_PLAYING) {
/* Seeking the synchronizer will also seek the playback handle.
* Even if we don't have A/V sync on, keep the synchronizer and handle
* seek time in sync.
*/
* Even if we don't have A/V sync on, keep the synchronizer and handle seek time in sync. */
AUD_seekSynchronizer(scene->playback_handle, cur_time);
AUD_Handle_resume(scene->playback_handle);
}

View File

@@ -300,7 +300,7 @@ class JsonFormatter : public Formatter {
public:
void serialize(std::ostream &os, const Value &value) override;
/**
* \return The deserialized value or null on failure to parse the JSON contents. Typically this
* \return The de-serialized value or null on failure to parse the JSON contents. Typically this
* indicates a malformed file.
*/
std::unique_ptr<Value> deserialize(std::istream &is) override;

View File

@@ -2274,32 +2274,32 @@ void vec_apply_track(float vec[3], short axis)
copy_v3_v3(tvec, vec);
switch (axis) {
case 0: /* pos-x */
case 0: /* POS-X. */
// vec[0] = 0.0;
vec[1] = tvec[2];
vec[2] = -tvec[1];
break;
case 1: /* pos-y */
case 1: /* POS-Y. */
// vec[0] = tvec[0];
// vec[1] = 0.0;
// vec[2] = tvec[2];
break;
case 2: /* pos-z */
case 2: /* POS-Z. */
// vec[0] = tvec[0];
// vec[1] = tvec[1];
// vec[2] = 0.0;
break;
case 3: /* neg-x */
case 3: /* NEG-X. */
// vec[0] = 0.0;
vec[1] = tvec[2];
vec[2] = -tvec[1];
break;
case 4: /* neg-y */
case 4: /* NEG-Y. */
vec[0] = -tvec[2];
// vec[1] = 0.0;
vec[2] = tvec[0];
break;
case 5: /* neg-z */
case 5: /* NEG-Z. */
vec[0] = -tvec[0];
vec[1] = -tvec[1];
// vec[2] = 0.0;

View File

@@ -147,7 +147,7 @@ struct PolyFill {
#endif
};
/* based on libgdx 2013-11-28, apache 2.0 licensed */
/* Based on LIBGDX 2013-11-28, APACHE 2.0 licensed. */
static void pf_coord_sign_calc(const PolyFill *pf, PolyIndex *pi);

View File

@@ -124,7 +124,7 @@ static void convert_action_in_place(blender::animrig::Action &action)
const int16_t idtype = action.idroot;
action.idroot = 0;
/* Initialise the Action's last_slot_handle field to its default value, before
/* Initialize the Action's last_slot_handle field to its default value, before
* we create a new slot. */
action.last_slot_handle = DNA_DEFAULT_ACTION_LAST_SLOT_HANDLE;

View File

@@ -9,14 +9,18 @@
namespace blender::realtime_compositor {
/* Gamma corrects the inputs in its straight alpha form and writes the result to the output. The
/**
* Gamma corrects the inputs in its straight alpha form and writes the result to the output. The
* gamma factor is assumes to be 2. The output will be allocated internally and is thus expected
* not to be previously allocated. */
* not to be previously allocated.
*/
void gamma_correct(Context &context, const Result &input, Result &output);
/* Gamma uncorrects the inputs in its straight alpha form and writes the result to the output. The
/**
* Gamma un-corrects the inputs in its straight alpha form and writes the result to the output. The
* gamma factor is assumes to be 2. The output will be allocated internally and is thus expected
* not to be previously allocated. */
* not to be previously allocated.
*/
void gamma_uncorrect(Context &context, const Result &input, Result &output);
} // namespace blender::realtime_compositor

View File

@@ -63,7 +63,7 @@ LocalStatistics local_statistics_get(ivec2 texel, vec3 center_radiance)
/* Weight corners less to avoid box artifacts.
* Same idea as in "High Quality Temporal Supersampling" by Brian Karis at SIGGRAPH 2014
* (Slide 32) Simple clamp to min/max of 8 neighbors results in 3x3 box artifacts. */
/* TODO(fclem): Evaluate if beneficial. Currrently not use to soak more noise? Unsure. */
/* TODO(@fclem): Evaluate if beneficial. Currently not use to soak more noise? Unsure. */
// float weight = (abs(x) == abs(y)) ? 0.25 : 1.0;
/* Use YCoCg for clamping and accumulation to avoid color shift artifacts. */
vec3 radiance_YCoCg = colorspace_YCoCg_from_scene_linear(radiance.rgb);

View File

@@ -10,7 +10,7 @@
* DRW Instance Data Manager
* This is a special memory manager that keeps memory blocks ready to send as VBO data in one
* continuous allocation. This way we avoid feeding #gpu::Batch each instance data one by one and
* unnecessary memcpy. Since we lose which memory block was used each #DRWShadingGroup we need to
* unnecessary `memcpy`. Since we lose which memory block was used each #DRWShadingGroup we need to
* redistribute them in the same order/size to avoid to realloc each frame. This is why
* #DRWInstanceDatas are sorted in a list for each different data size.
*/

View File

@@ -650,8 +650,11 @@ void ED_view3d_win_to_3d_int(const View3D *v3d,
float r_out[3]);
/**
* Calculate a 3D location from 2D window coordinates including camera shift.
* \note Does the same as ED_view3d_win_to_3d by using the persinv translation instead of viewinv,
* but that function cannot be changed without breaking lots of operators.
*
* \note Does the same as #ED_view3d_win_to_3d by using the #RegionView3D::persinv translation
* instead of #RegionView3D::viewinv, but that function cannot be changed
* without breaking lots of operators.
*
* \param region: The region (used for the window width and height).
* \param depth_pt: The reference location used to calculate the Z depth.
* \param mval: The area relative location (such as `event->mval` converted to floats).

View File

@@ -437,7 +437,7 @@ static void ui_item_position(uiItem *item, const int x, const int y, const int w
bitem->but->rect.xmax = x + w;
bitem->but->rect.ymax = y + h;
ui_but_update(bitem->but); /* for strlen */
ui_but_update(bitem->but); /* For `strlen`. */
}
else {
uiLayout *litem = static_cast<uiLayout *>(item);
@@ -457,7 +457,7 @@ static void ui_item_move(uiItem *item, const int delta_xmin, const int delta_xma
bitem->but->rect.xmin += delta_xmin;
bitem->but->rect.xmax += delta_xmax;
ui_but_update(bitem->but); /* for strlen */
ui_but_update(bitem->but); /* For `strlen`. */
}
else {
uiLayout *litem = static_cast<uiLayout *>(item);

View File

@@ -5619,10 +5619,9 @@ static void SCREEN_OT_animation_step(wmOperatorType *ot)
void ED_reset_audio_device(bContext *C)
{
/* If sound was playing back when we changed any sound settings, we need to make sure that
* we reinitalize the playback state properly. Audaspace pauses playback on re-initializing
* the playback device, so we need to make sure we re-initalize the playback state on our
* end as well. (Otherwise the sound device might be in a weird state and crashes Blender)
*/
* we reinitialize the playback state properly. Audaspace pauses playback on re-initializing
* the playback device, so we need to make sure we reinitialize the playback state on our
* end as well. (Otherwise the sound device might be in a weird state and crashes Blender). */
bScreen *screen = ED_screen_animation_playing(CTX_wm_manager(C));
wmWindow *timer_win = nullptr;
const bool is_playing = screen != nullptr;
@@ -5639,7 +5638,7 @@ void ED_reset_audio_device(bContext *C)
ED_screen_animation_play(C, 0, 0);
}
Main *bmain = CTX_data_main(C);
/* Re-initalize the audio device. */
/* Re-initialize the audio device. */
BKE_sound_init(bmain);
if (is_playing) {
/* We need to set the context window to the window that was playing back previously.

View File

@@ -152,7 +152,7 @@ void GLImmediate::end()
glUnmapBuffer(GL_ARRAY_BUFFER);
if (vertex_len == 0) {
/* Noop. Nothing to draw. */
/* NOOP. Nothing to draw. */
}
else if (unwrap(this->shader)->is_polyline) {
GLintptr offset = buffer_offset();

View File

@@ -1036,9 +1036,8 @@ static int ffmpeg_seek_to_key_frame(ImBufAnim *anim,
AVFormatContext *format_ctx = anim->pFormatCtx;
/* This used to check if the codec implemented "read_seek" or "read_seek2". However this is
* now hidden from us in ffmpeg 7.0. While not as accurate, usually the AVFMT_TS_DISCONT is
* set for formats where we need to apply the seek workaround to (like in mpegts).
*/
* now hidden from us in FFMPEG 7.0. While not as accurate, usually the AVFMT_TS_DISCONT is
* set for formats where we need to apply the seek workaround to (like in MPEGTS). */
if (!(format_ctx->iformat->flags & AVFMT_TS_DISCONT)) {
ret = av_seek_frame(anim->pFormatCtx, anim->videoStream, seek_pos, AVSEEK_FLAG_BACKWARD);
}

View File

@@ -39,6 +39,7 @@ dict_custom = {
"adjugate",
"affectable",
"alignable",
"bindable",
"branchless",
"allocatable",
"allocator",