Cleanup: spelling in comments & variables

This commit is contained in:
Campbell Barton 2022-06-09 10:16:26 +10:00
parent 3bdf1c11fb
commit 132e58610d
13 changed files with 25 additions and 24 deletions

View File

@ -2019,7 +2019,7 @@ GHOST_TSuccess GHOST_SystemWayland::setCursorGrab(const GHOST_TGrabCursorMode mo
const bool was_lock = MODE_NEEDS_LOCK(mode_current);
const bool use_lock = MODE_NEEDS_LOCK(mode);
/* Check for wrap as #supportsCursorWarp isn't supproted. */
/* Check for wrap as #supportsCursorWarp isn't supported. */
const bool was_hide = MODE_NEEDS_HIDE(mode_current) || (mode_current == GHOST_kGrabWrap);
const bool use_hide = MODE_NEEDS_HIDE(mode) || (mode == GHOST_kGrabWrap);

View File

@ -209,11 +209,11 @@ template<typename Key, Key EmptyValue, Key RemovedValue> struct TemplatedKeyInfo
};
/**
* 0xffff...ffff indicates an empty slot.
* 0xffff...fffe indicates a removed slot.
* `0xffff...ffff` indicates an empty slot.
* `0xffff...fffe` indicates a removed slot.
*
* Those specific values are used, because with them a single comparison is enough to check whether
* a slot is occupied. The keys 0x0000...0000 and 0x0000...0001 also satisfy this constraint.
* a slot is occupied. The keys `0x0000...0000` and `0x0000...0001` also satisfy this constraint.
* However, nullptr is much more likely to be used as valid key.
*/
template<typename Pointer> struct PointerKeyInfo {

View File

@ -81,8 +81,8 @@ class TonemapOperation : public MultiThreadedOperation {
};
/**
* \brief class of tonemap, implementing the photoreceptor tonemap
* most parts have already been done in TonemapOperation
* \brief class of tone-map, implementing the photo-receptor tone-map
* most parts have already been done in #TonemapOperation.
* \ingroup operation
*/

View File

@ -41,7 +41,7 @@ class ShadingView {
/** Matrix to apply to the viewmat. */
const float (*face_matrix_)[4];
/** Post-fx modules. */
/** Post-FX modules. */
// DepthOfField dof_;
// MotionBlur mb_;
VelocityView velocity_;

View File

@ -1431,7 +1431,7 @@ static int poselib_preview_handle_event(bContext *UNUSED(C), wmOperator *op, con
ret = OPERATOR_PASS_THROUGH;
break;
/* quicky compare to original */
/* Quickly compare to original. */
case EVT_TABKEY:
pld->flag &= ~PL_PREVIEW_SHOWORIGINAL;
pld->redraw = PL_PREVIEW_REDRAWALL;

View File

@ -80,9 +80,9 @@ typedef enum eDrawStrokeFlags {
GP_DRAWDATA_ONLYI2D = (1 << 3),
/** special hack for drawing strokes in Image Editor (weird coordinates) */
GP_DRAWDATA_IEDITHACK = (1 << 4),
/** don't draw xray in 3D view (which is default) */
/** Don't draw XRAY in 3D view (which is default). */
GP_DRAWDATA_NO_XRAY = (1 << 5),
/** no onionskins should be drawn (for animation playback) */
/** No onion-skins should be drawn (for animation playback). */
GP_DRAWDATA_NO_ONIONS = (1 << 6),
/** draw strokes as "volumetric" circular billboards */
GP_DRAWDATA_VOLUMETRIC = (1 << 7),

View File

@ -1701,7 +1701,7 @@ static int gpencil_circle_select_exec(bContext *C, wmOperator *op)
const bool select = (sel_op != SEL_OP_SUB);
bool changed = false;
/* for bounding rect around circle (for quicky intersection testing) */
/* For bounding `rect` around circle (for quickly intersection testing). */
rcti rect = {0};
rect.xmin = mx - radius;
rect.ymin = my - radius;

View File

@ -458,7 +458,7 @@ static bool object_transfer_mode_to_base(bContext *C, wmOperator *op, Base *base
return false;
}
bool mode_transfered = false;
bool mode_transferred = false;
ED_undo_group_begin(C);
@ -480,11 +480,11 @@ static bool object_transfer_mode_to_base(bContext *C, wmOperator *op, Base *base
WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
WM_toolsystem_update_from_context_view3d(C);
mode_transfered = true;
mode_transferred = true;
}
ED_undo_group_end(C);
return mode_transfered;
return mode_transferred;
}
static int object_transfer_mode_invoke(bContext *C, wmOperator *op, const wmEvent *event)
@ -493,8 +493,8 @@ static int object_transfer_mode_invoke(bContext *C, wmOperator *op, const wmEven
const eObjectMode src_mode = (eObjectMode)ob_src->mode;
Base *base_dst = ED_view3d_give_base_under_cursor(C, event->mval);
const bool mode_transfered = object_transfer_mode_to_base(C, op, base_dst);
if (!mode_transfered) {
const bool mode_transferred = object_transfer_mode_to_base(C, op, base_dst);
if (!mode_transferred) {
return OPERATOR_CANCELLED;
}

View File

@ -256,7 +256,7 @@ bool MTLBackend::metal_is_supported()
NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
/* Metal Viewport requires macOS Version 10.15 onwards. */
/* Metal Viewport requires macOS Version 10.15 onward. */
bool supported_os_version = version.majorVersion >= 11 ||
(version.majorVersion == 10 ? version.minorVersion >= 15 : false);
if (!supported_os_version) {

View File

@ -19,7 +19,7 @@ namespace blender::io::stl {
class Triangle {
public:
int v1, v2, v3;
/* Based on an old version of Python's frozenset hash
/* Based on an old version of Python's frozen-set hash
* https://web.archive.org/web/20220520211017/https://stackoverflow.com/questions/20832279/python-frozenset-hashing-algorithm-implementation
*/
uint64_t hash() const

View File

@ -532,7 +532,7 @@ struct StructRNA {
/* property to iterate over properties */
PropertyRNA *iteratorproperty;
/* struct this is derivedfrom */
/** Struct this is derived from. */
struct StructRNA *base;
/* only use for nested structs, where both the parent and child access

View File

@ -176,7 +176,8 @@ static void nurbs_to_bezier_assign(const Span<T> src,
dst.last() = src.last();
break;
default:
/* Every 3rd NURBS position (starting from index 1) should have its attributes transfered. */
/* Every 3rd NURBS position (starting from index 1) should have its attributes transferred.
*/
scale_input_assign<T>(src, 3, 1, dst);
}
}
@ -448,7 +449,7 @@ static void convert_to_bezier(const CurveComponent &src_component,
Vector<float3> nurbs_positions_vector;
if (src_cyclic[i] && is_nurbs_to_bezier_one_to_one(knots_mode)) {
/* For conversion treat this as periodic closed curve. Extend NURBS hull to first and
* second point which will act as a sceleton for placing Bezier handles. */
* second point which will act as a skeleton for placing Bezier handles. */
nurbs_positions_vector.extend(src_curve_positions);
nurbs_positions_vector.append(src_curve_positions[0]);
nurbs_positions_vector.append(src_curve_positions[1]);

View File

@ -981,7 +981,7 @@ static void render_result_uncrop(Render *re)
render_result_free(re->result);
re->result = rres;
/* weak... the display callback wants an active renderlayer pointer... */
/* Weak, the display callback wants an active render-layer pointer. */
re->result->renlay = render_get_active_layer(re, re->result);
BLI_rw_mutex_unlock(&re->resultmutex);
@ -1313,8 +1313,8 @@ static void do_render_sequencer(Render *re)
true,
&context);
/* the renderresult gets destroyed during the rendering, so we first collect all ibufs
* and then we populate the final renderesult */
/* The render-result gets destroyed during the rendering, so we first collect all ibufs
* and then we populate the final render-result. */
for (view_id = 0; view_id < tot_views; view_id++) {
context.view_id = view_id;