Cleanup: spelling in comments

This commit is contained in:
Campbell Barton 2022-03-30 11:38:24 +11:00
parent be8270bc76
commit 9ae98f305a
18 changed files with 36 additions and 36 deletions

View File

@ -15,7 +15,7 @@ CCL_NAMESPACE_BEGIN
#define TEX_IMAGE_MISSING_A 1
/* Interpolation types for textures
* cuda also use texture space to store other objects */
* CUDA also use texture space to store other objects. */
typedef enum InterpolationType {
INTERPOLATION_NONE = -1,
INTERPOLATION_LINEAR = 0,

View File

@ -601,7 +601,8 @@ bool BKE_id_can_be_asset(const struct ID *id);
*
* NOTE: Execution of this function can be somewhat expensive currently. If this becomes an issue,
* we should either cache that status info also in virtual override IDs, or address the
* long-standing TODO of geting an efficient 'owner_id' access for all embeded ID types. */
* long-standing TODO of getting an efficient 'owner_id' access for all embedded ID types.
*/
bool BKE_id_is_editable(struct Main *bmain, struct ID *id);
/**

View File

@ -352,7 +352,7 @@ static void setup_app_data(bContext *C,
do_versions_ipos_to_animato(bmain);
}
/* NOTE: readfile's `do_version` does not allow to create new IDs, and only operates on a single
/* NOTE: readfile's `do_versions` does not allow to create new IDs, and only operates on a single
* library at a time. This code needs to operate on the whole Main at once. */
/* NOTE: Check bmain version (i.e. current blend file version), AND the versions of all the
* linked libraries. */

View File

@ -3184,7 +3184,7 @@ static void calchandleNurb_intern(BezTriple *bezt,
len *= 2.5614f;
if (len != 0.0f) {
/* only for fcurves */
/* Only for F-curves. */
bool leftviolate = false, rightviolate = false;
if (!is_fcurve || fcurve_smoothing == FCURVE_SMOOTH_NONE) {

View File

@ -1027,11 +1027,11 @@ bool BKE_gpencil_stroke_smooth_point(bGPDstroke *gps,
* smooth. To solve that problem, choose a different n/2, which does not match the range and
* normalize the weights on finish. This may cause some artifacts at low values.
*
* keep_shape is a new option to stop the stroke from severly deforming.
* keep_shape is a new option to stop the stroke from severely deforming.
* It uses different partially negative weights.
* w = 2 * (nCr(n, j + n/2) / 2^n) - (nCr(3*n, j + n) / 2^(3*n))
* ~ 2 * sqrt(2/(pi*n)) * exp(-2*j*j/n) - sqrt(2/(pi*3*n)) * exp(-2*j*j/(3*n))
* All weigths still sum up to 1.
* All weights still sum up to 1.
* Note these weights only work because the averaging is done in relative coordinates.
*/
float sco[3] = {0.0f, 0.0f, 0.0f};

View File

@ -122,7 +122,7 @@ IDOverrideLibrary *BKE_lib_override_library_init(ID *local_id, ID *reference_id)
local_id->override_library->reference = reference_id;
id_us_plus(local_id->override_library->reference);
local_id->tag &= ~LIB_TAG_OVERRIDE_LIBRARY_REFOK;
/* By default initialized libioverrides are 'system overrides', higher-level code is responsible
/* By default initialized liboverrides are 'system overrides', higher-level code is responsible
* to unset this flag for specific IDs. */
local_id->override_library->flag |= IDOVERRIDE_LIBRARY_FLAG_SYSTEM_DEFINED;
/* TODO: do we want to add tag or flag to referee to mark it as such? */

View File

@ -139,7 +139,7 @@ static void scene_init_data(ID *id)
scene->toolsettings->autokey_mode = (uchar)U.autokey_mode;
/* grease pencil multiframe falloff curve */
/* Grease pencil multi-frame falloff curve. */
scene->toolsettings->gp_sculpt.cur_falloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
CurveMapping *gp_falloff_curve = scene->toolsettings->gp_sculpt.cur_falloff;
BKE_curvemapping_init(gp_falloff_curve);
@ -423,7 +423,7 @@ static void scene_free_data(ID *id)
scene->display.shading.prop = nullptr;
}
/* These are freed on doversion. */
/* These are freed on `do_versions`. */
BLI_assert(scene->layer_properties == nullptr);
}
@ -967,7 +967,7 @@ static void scene_blend_write(BlendWriter *writer, ID *id, const void *id_addres
if (tos->gp_interpolate.custom_ipo) {
BKE_curvemapping_blend_write(writer, tos->gp_interpolate.custom_ipo);
}
/* write grease-pencil multiframe falloff curve to file */
/* write grease-pencil multi-frame falloff curve to file */
if (tos->gp_sculpt.cur_falloff) {
BKE_curvemapping_blend_write(writer, tos->gp_sculpt.cur_falloff);
}
@ -1058,7 +1058,7 @@ static void scene_blend_write(BlendWriter *writer, ID *id, const void *id_addres
BKE_collection_blend_write_nolib(writer, sce->master_collection);
}
/* Eevee Lightcache */
/* Eevee Light-cache */
if (sce->eevee.light_cache_data && !BLO_write_is_undo(writer)) {
BLO_write_struct(writer, LightCache, sce->eevee.light_cache_data);
EEVEE_lightcache_blend_write(writer, sce->eevee.light_cache_data);
@ -1066,7 +1066,7 @@ static void scene_blend_write(BlendWriter *writer, ID *id, const void *id_addres
BKE_screen_view3d_shading_blend_write(writer, &sce->display.shading);
/* Freed on doversion. */
/* Freed on `do_versions()`. */
BLI_assert(sce->layer_properties == nullptr);
}
@ -1147,23 +1147,23 @@ static void scene_blend_read_data(BlendDataReader *reader, ID *id)
sce->toolsettings->particle.object = nullptr;
sce->toolsettings->gp_sculpt.paintcursor = nullptr;
/* relink grease pencil interpolation curves */
/* Relink grease pencil interpolation curves. */
BLO_read_data_address(reader, &sce->toolsettings->gp_interpolate.custom_ipo);
if (sce->toolsettings->gp_interpolate.custom_ipo) {
BKE_curvemapping_blend_read(reader, sce->toolsettings->gp_interpolate.custom_ipo);
}
/* relink grease pencil multiframe falloff curve */
/* Relink grease pencil multi-frame falloff curve. */
BLO_read_data_address(reader, &sce->toolsettings->gp_sculpt.cur_falloff);
if (sce->toolsettings->gp_sculpt.cur_falloff) {
BKE_curvemapping_blend_read(reader, sce->toolsettings->gp_sculpt.cur_falloff);
}
/* relink grease pencil primitive curve */
/* Relink grease pencil primitive curve. */
BLO_read_data_address(reader, &sce->toolsettings->gp_sculpt.cur_primitive);
if (sce->toolsettings->gp_sculpt.cur_primitive) {
BKE_curvemapping_blend_read(reader, sce->toolsettings->gp_sculpt.cur_primitive);
}
/* Relink toolsettings curve profile */
/* Relink toolsettings curve profile. */
BLO_read_data_address(reader, &sce->toolsettings->custom_bevel_profile_preset);
if (sce->toolsettings->custom_bevel_profile_preset) {
BKE_curveprofile_blend_read(reader, sce->toolsettings->custom_bevel_profile_preset);
@ -1729,7 +1729,7 @@ ToolSettings *BKE_toolsettings_copy(ToolSettings *toolsettings, const int flag)
/* duplicate Grease Pencil interpolation curve */
ts->gp_interpolate.custom_ipo = BKE_curvemapping_copy(ts->gp_interpolate.custom_ipo);
/* Duplicate Grease Pencil multiframe falloff. */
/* Duplicate Grease Pencil multi-frame falloff. */
ts->gp_sculpt.cur_falloff = BKE_curvemapping_copy(ts->gp_sculpt.cur_falloff);
ts->gp_sculpt.cur_primitive = BKE_curvemapping_copy(ts->gp_sculpt.cur_primitive);
@ -1786,7 +1786,7 @@ void BKE_toolsettings_free(ToolSettings *toolsettings)
if (toolsettings->gp_interpolate.custom_ipo) {
BKE_curvemapping_free(toolsettings->gp_interpolate.custom_ipo);
}
/* free Grease Pencil multiframe falloff curve */
/* free Grease Pencil multi-frame falloff curve */
if (toolsettings->gp_sculpt.cur_falloff) {
BKE_curvemapping_free(toolsettings->gp_sculpt.cur_falloff);
}
@ -2030,7 +2030,7 @@ void BKE_scene_set_background(Main *bmain, Scene *scene)
/* check for cyclic sets, for reading old files but also for definite security (py?) */
BKE_scene_validate_setscene(bmain, scene);
/* deselect objects (for dataselect) */
/* Deselect objects (for data select). */
LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
ob->flag &= ~SELECT;
}
@ -2625,7 +2625,7 @@ void BKE_scene_graph_update_for_newframe_ex(Depsgraph *depsgraph, const bool cle
BKE_sound_set_cfra(scene->r.cfra);
DEG_graph_relations_update(depsgraph);
/* Update all objects: drivers, matrices, #DispList, etc. flags set
* by depgraph or manual, no layer check here, gets correct flushed.
* by depsgraph or manual, no layer check here, gets correct flushed.
*
* NOTE: Only update for new frame on first iteration. Second iteration is for ensuring user
* edits from callback are properly taken into account. Doing a time update on those would

View File

@ -2437,7 +2437,7 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (!MAIN_VERSION_ATLEAST(bmain, 302, 7)) {
/* Generate 'system' liboverrides IDs.
* NOTE: This is a fairly rough process, based on very basic euristics. Should be enough for a
* NOTE: This is a fairly rough process, based on very basic heuristics. Should be enough for a
* do_version code though, this is a new optional feature, not a critical conversion. */
ID *id;
FOREACH_MAIN_ID_BEGIN (bmain, id) {

View File

@ -1254,7 +1254,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
}
cam = cam->id.next;
}
/* Force oops draw if depgraph was set. */
/* Force oops draw if depsgraph was set. */
/* Set time line var. */
/* softbody init new vars */

View File

@ -1839,9 +1839,8 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
/* We do not have to update the objects final transform after the simulation if it is
* passive or controlled by the animation system in blender.
* (Bullet doesn't move the object at all in these cases).
* But we can't update the depgraph when the animated property in changed during playback.
* So always assume that active bodies needs updating.
*/
* But we can't update the depsgraph when the animated property in changed during playback.
* So always assume that active bodies needs updating. */
OperationKey rb_transform_copy_key(
&object->id, NodeType::TRANSFORM, OperationCode::RIGIDBODY_TRANSFORM_COPY);
/* Rigid body synchronization depends on the actual simulation. */

View File

@ -1401,7 +1401,7 @@ static void gpencil_primitive_interaction_end(bContext *C,
BKE_gpencil_stroke_geometry_update(tgpi->gpd, gps);
}
/* In Multiframe mode, duplicate the stroke in other frames. */
/* In Multi-frame mode, duplicate the stroke in other frames. */
if (GPENCIL_MULTIEDIT_SESSIONS_ON(tgpi->gpd)) {
const bool tail = (ts->gpencil_flags & GP_TOOL_FLAG_PAINT_ONBACK);
BKE_gpencil_stroke_copy_to_keyframes(tgpi->gpd, tgpi->gpl, gpf, gps, tail);

View File

@ -1423,7 +1423,7 @@ void ED_gpencil_add_defaults(bContext *C, Object *ob)
/* ensure a color exists and is assigned to object */
BKE_gpencil_object_material_ensure_from_active_input_toolsettings(bmain, ob, ts);
/* ensure multiframe falloff curve */
/* Ensure multi-frame falloff curve. */
if (ts->gp_sculpt.cur_falloff == NULL) {
ts->gp_sculpt.cur_falloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
CurveMapping *gp_falloff_curve = ts->gp_sculpt.cur_falloff;

View File

@ -738,7 +738,7 @@ static bool gpencil_vertexpaint_brush_init(bContext *C, wmOperator *op)
/* Save mask. */
gso->mask = ts->gpencil_selectmode_vertex;
/* Multiframe settings. */
/* Multi-frame settings. */
gso->is_multiframe = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gso->gpd);
gso->use_multiframe_falloff = (ts->gp_sculpt.flag & GP_SCULPT_SETT_FLAG_FRAME_FALLOFF) != 0;

View File

@ -38,10 +38,10 @@
/**
* The code below uses a prefix naming convention to indicate the coordinate space:
* cu: Local space of the curves object that is being edited.
* su: Local space of the surface object.
* wo: World space.
* re: 2D coordinates within the region.
* - `cu`: Local space of the curves object that is being edited.
* - `su`: Local space of the surface object.
* - `wo`: World space.
* - `re`: 2D coordinates within the region.
*/
namespace blender::ed::sculpt_paint {

View File

@ -1115,7 +1115,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
initSelectConstraint(t);
/* Use #TREDRAW_SOFT so that #selectConstraint is only called on the next event.
* This allows us to "deselect" the contraint. */
* This allows us to "deselect" the constraint. */
t->redraw = TREDRAW_SOFT;
}
}

View File

@ -33,7 +33,7 @@
#include "ED_transverts.h" /* own include */
/* copied from editobject.c, now uses (almost) proper depgraph */
/* copied from editobject.c, now uses (almost) proper depsgraph. */
void ED_transverts_update_obedit(TransVertStore *tvs, Object *obedit)
{
const int mode = tvs->mode;

View File

@ -1113,7 +1113,7 @@ typedef struct GP_Sculpt_Settings {
/** Threshold for intersections */
float isect_threshold;
char _pad[4];
/** Multiframe edit falloff effect by frame. */
/** Multi-frame edit falloff effect by frame. */
struct CurveMapping *cur_falloff;
/** Curve used for primitive tools. */
struct CurveMapping *cur_primitive;

View File

@ -540,7 +540,7 @@ enum {
AREA_FLAG_STACKED_FULLSCREEN = (1 << 7),
/** Update action zones (even if the mouse is not intersecting them). */
AREA_FLAG_ACTIONZONES_UPDATE = (1 << 8),
/** For offscreen areas. */
/** For off-screen areas. */
AREA_FLAG_OFFSCREEN = (1 << 9),
};