Cleanup: spelling in comments, minor formatting tweaks

This commit is contained in:
Campbell Barton 2022-06-07 21:22:11 +10:00
parent 1e0e1ad20f
commit 2918a3a2a3
12 changed files with 21 additions and 23 deletions

View File

@ -263,14 +263,14 @@ struct FCurve *BKE_fcurve_iter_step(struct FCurve *fcu_iter, const char rna_path
* If there is an action assigned to the `id`'s #AnimData, it will be searched for a matching
* F-curve first. Drivers are searched only if no valid action F-curve could be found.
*
* \note: Return pointer parameter (`r_driven`) is optional and may be NULL.
* \note Return pointer parameter (`r_driven`) is optional and may be NULL.
*
* \warning: In case no animation (from an Action) F-curve is found, returned value is always NULL.
* \warning In case no animation (from an Action) F-curve is found, returned value is always NULL.
* This means that this function will set `r_driven` to True in case a valid driver F-curve is
* found, but will not return said F-curve. In other words:
* - Animated with FCurve: returns the `FCurve*` and `*r_driven = false`.
* - Animated with driver: returns `NULL` and `*r_driven = true`.
* - Not animated: returns `NULL` and `*r_driven = false`.
* - Animated with FCurve: returns the `FCurve*` and `*r_driven = false`.
* - Animated with driver: returns `NULL` and `*r_driven = true`.
* - Not animated: returns `NULL` and `*r_driven = false`.
*/
struct FCurve *id_data_find_fcurve(
ID *id, void *data, struct StructRNA *type, const char *prop_name, int index, bool *r_driven);
@ -296,11 +296,11 @@ int BKE_fcurves_filter(ListBase *dst, ListBase *src, const char *dataPrefix, con
* If there is an action assigned to the `animdata`, it will be searched for a matching F-curve
* first. Drivers are searched only if no valid action F-curve could be found.
*
* \note: Typically, indices in RNA arrays are stored separately in F-curves, so the rna_path
* \note Typically, indices in RNA arrays are stored separately in F-curves, so the rna_path
* should not include them (e.g. `rna_path='location[0]'` will not match any F-Curve on an Object,
* but `rna_path='location', rna_index=0` will if it exists).
*
* \note: Return pointer parameters (`r_action`, `r_driven` and `r_special`) are all optional and
* \note Return pointer parameters (`r_action`, `r_driven` and `r_special`) are all optional and
* may be NULL.
*/
struct FCurve *BKE_animadata_fcurve_find_by_rna_path(struct AnimData *animdata,

View File

@ -926,11 +926,9 @@ static void ccgDM_copyFinalVertArray(DerivedMesh *dm, MVert *mvert)
int x;
for (x = 1; x < edgeSize - 1; x++) {
/* This gives errors with -debug-fpe
* the normals don't seem to be unit length.
* this is most likely caused by edges with no
* faces which are now zerod out, see comment in:
* ccgSubSurf__calcVertNormals(), - campbell */
/* NOTE(@campbellbarton): This gives errors with `--debug-fpe` the normals don't seem to be
* unit length. This is most likely caused by edges with no faces which are now zeroed out,
* see comment in: `ccgSubSurf__calcVertNormals()`. */
vd = ccgSubSurf_getEdgeData(ss, e, x);
ccgDM_to_MVert(&mvert[i++], &key, vd);
}

View File

@ -136,7 +136,7 @@ bool is_quad_convex_v2(const float v1[2], const float v2[2], const float v3[2],
bool is_poly_convex_v2(const float verts[][2], unsigned int nr);
/**
* Check if either of the diagonals along this quad create flipped triangles
* (normals pointing away from eachother).
* (normals pointing away from each other).
* - (1 << 0): (v1-v3) is flipped.
* - (1 << 1): (v2-v4) is flipped.
*/

View File

@ -374,7 +374,7 @@ void invert_m3_m3_safe_ortho(float Ainv[3][3], const float A[3][3]);
* A safe version of invert that uses valid axes, calculating the zero'd axis
* based on the non-zero ones.
*
* This works well for transformation matrices, when a single axis is zerod.
* This works well for transformation matrices, when a single axis is zeroed.
*/
void invert_m4_m4_safe_ortho(float Ainv[4][4], const float A[4][4]);

View File

@ -21,7 +21,7 @@
* (100, 3) -> [16, 49, 83]
* (100, 100) -> [0..99]
* </pre>
* \note this is mainly useful for numbers that might not divide evenly into eachother.
* \note this is mainly useful for numbers that might not divide evenly into each other.
*/
#define BLI_FOREACH_SPARSE_RANGE(src, dst, i) \
for (int _src = (src), _src2 = _src * 2, _dst2 = (dst)*2, _error = _dst2 - _src, i = 0, _delta; \

View File

@ -460,7 +460,7 @@ void BM_mesh_edgeloops_calc_order(BMesh *UNUSED(bm), ListBase *eloops, const boo
for (el_store = eloops->first; el_store; el_store = el_store->next) {
float len_sq;
if (use_normals) {
/* scale the length by how close the loops are to pointing at eachother */
/* Scale the length by how close the loops are to pointing at each other. */
float dir[3];
sub_v3_v3v3(dir, co, el_store->co);
len_sq = normalize_v3(dir);

View File

@ -35,7 +35,7 @@ typedef struct CurvesEvalFinalCache {
GPUVertBuf *proc_buf;
GPUTexture *proc_tex;
/**Just contains a huge index buffer used to draw the final curves. */
/** Just contains a huge index buffer used to draw the final curves. */
GPUBatch *proc_hairs[MAX_THICKRES];
/** Points per curve, at least 2. */

View File

@ -1147,7 +1147,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op)
}
if (axis_delta == 0.0f) {
/* both mirrored bones exist and point to eachother and overlap exactly.
/* Both mirrored bones exist and point to each other and overlap exactly.
*
* in this case there's no well defined solution, so de-select both and skip.
*/

View File

@ -1480,9 +1480,9 @@ static void ui_multibut_states_create(uiBut *but_active, uiHandleButtonData *dat
}
}
/* edit buttons proportionally to eachother
/* Edit buttons proportionally to each other.
* NOTE: if we mix buttons which are proportional and others which are not,
* this may work a bit strangely */
* this may work a bit strangely. */
if ((but_active->rnaprop && (RNA_property_flag(but_active->rnaprop) & PROP_PROPORTIONAL)) ||
ELEM(but_active->unit_type, RNA_SUBTYPE_UNIT_VALUE(PROP_UNIT_LENGTH))) {
if (data->origvalue != 0.0) {

View File

@ -154,7 +154,7 @@ const EnumPropertyItem rna_enum_property_flag_items[] = {
{PROP_SKIP_SAVE, "SKIP_SAVE", 0, "Skip Save", ""},
{PROP_ANIMATABLE, "ANIMATABLE", 0, "Animatable", ""},
{PROP_LIB_EXCEPTION, "LIBRARY_EDITABLE", 0, "Library Editable", ""},
{PROP_PROPORTIONAL, "PROPORTIONAL", 0, "Adjust values proportionally to eachother", ""},
{PROP_PROPORTIONAL, "PROPORTIONAL", 0, "Adjust values proportionally to each other", ""},
{PROP_TEXTEDIT_UPDATE,
"TEXTEDIT_UPDATE",
0,

View File

@ -674,7 +674,7 @@ static wmGizmo *gizmo_find_intersected_3d(bContext *C,
* This way we always use the first hit. */
if (has_3d) {
/* The depth buffer is needed for for gizmos to obscure eachother. */
/* The depth buffer is needed for for gizmos to obscure each other. */
GPUViewport *viewport = WM_draw_region_get_viewport(CTX_wm_region(C));
/* When switching between modes and the mouse pointer is over a gizmo, the highlight test is

View File

@ -1096,7 +1096,7 @@ void wm_homefile_read_ex(bContext *C,
const bool reset_app_template = ((!app_template && U.app_template[0]) ||
(app_template && !STREQ(app_template, U.app_template)));
/* options exclude eachother */
/* Options exclude each other. */
BLI_assert((use_factory_settings && filepath_startup_override) == 0);
if ((G.f & G_FLAG_SCRIPT_OVERRIDE_PREF) == 0) {