Cleanup: spelling in comments

This commit is contained in:
Campbell Barton
2022-10-07 10:32:02 +11:00
parent b04b87b322
commit ecc404ea1a
12 changed files with 33 additions and 35 deletions

View File

@@ -239,7 +239,7 @@ ccl_device bool integrator_init_from_bake(KernelGlobals kg,
}
/* We don't want to bake the back face, so make sure the ray direction never
* goes behind the geometry (flat) normal. This is a failsafe, and should rarely happen. */
* goes behind the geometry (flat) normal. This is a fail-safe, and should rarely happen. */
const float true_normal_epsilon = 0.00001f;
if (dot(D, Ng) <= true_normal_epsilon) {

View File

@@ -198,7 +198,7 @@ static DerivedMesh *cdDM_from_mesh_ex(Mesh *mesh,
DM_TYPE_CDDM,
mesh->totvert,
mesh->totedge,
0 /* mesh->totface */,
0 /* `mesh->totface` */,
mesh->totloop,
mesh->totpoly);
@@ -213,7 +213,7 @@ static DerivedMesh *cdDM_from_mesh_ex(Mesh *mesh,
&dm->faceData,
cddata_masks.fmask | CD_MASK_ORIGINDEX,
alloctype,
0 /* mesh->totface */);
0 /* `mesh->totface` */);
CustomData_merge(&mesh->ldata, &dm->loopData, cddata_masks.lmask, alloctype, mesh->totloop);
CustomData_merge(&mesh->pdata, &dm->polyData, cddata_masks.pmask, alloctype, mesh->totpoly);

View File

@@ -988,7 +988,7 @@ void BKE_main_view_layers_synced_ensure(const Main *bmain)
BKE_scene_view_layers_synced_ensure(scene);
}
/* NOTE: This is not (yet?) covered by the dirty tag and deffered resync system */
/* NOTE: This is not (yet?) covered by the dirty tag and differed re-sync system */
BKE_layer_collection_local_sync_all(bmain);
}

View File

@@ -1389,7 +1389,7 @@ bool BKE_lib_override_library_create(Main *bmain,
id_hierarchy_root_reference = id_root_reference;
}
/* While in theory it _should_ be enough to ensure sync of given viewlayer (if any), or at least
/* While in theory it _should_ be enough to ensure sync of given view-layer (if any), or at least
* of given scene, think for now it's better to get a fully synced Main at this point, this code
* may do some very wide remapping/data access in some cases. */
BKE_main_view_layers_synced_ensure(bmain);

View File

@@ -69,8 +69,8 @@ void multires_customdata_delete(Mesh *me)
if (me->edit_mesh) {
BMEditMesh *em = me->edit_mesh;
/* CustomData_external_remove is used here only to mark layer
* as non-external for further free-ing, so zero element count
* looks safer than em->totface */
* as non-external for further freeing, so zero element count
* looks safer than `em->bm->totface`. */
CustomData_external_remove(&em->bm->ldata, &me->id, CD_MDISPS, 0);
if (CustomData_has_layer(&em->bm->ldata, CD_MDISPS)) {
@@ -1359,11 +1359,9 @@ static void multires_sync_levels(Scene *scene, Object *ob_src, Object *ob_dst)
MultiresModifierData *mmd_dst = get_multires_modifier(scene, ob_dst, true);
if (!mmd_src) {
/* object could have MDISP even when there is no multires modifier
* this could lead to troubles due to i've got no idea how mdisp could be
* up-sampled correct without modifier data.
* just remove mdisps if no multires present (nazgul) */
/* NOTE(@sergey): object could have MDISP even when there is no multires modifier
* this could lead to troubles due to I've got no idea how mdisp could be
* up-sampled correct without modifier data. Just remove mdisps if no multires present. */
multires_customdata_delete(static_cast<Mesh *>(ob_src->data));
}
@@ -1404,9 +1402,8 @@ static void multires_apply_smat(struct Depsgraph * /*depsgraph*/,
multires_apply_uniform_scale(object, scale);
}
else {
/* TODO(sergey): This branch of code actually requires more work to
* preserve all the details.
*/
/* TODO(@sergey): This branch of code actually requires more work to
* preserve all the details. */
const float scale = mat3_to_scale(smat);
multires_apply_uniform_scale(object, scale);
}

View File

@@ -61,7 +61,8 @@ struct ShrinkwrapCalcData {
MVert *vert; /* Array of verts being projected. */
const float (*vert_normals)[3];
float (*vertexCos)[3]; /* vertexs being shrinkwraped */
/* Vertices being shrink-wrapped. */
float (*vertexCos)[3];
int numVerts;
const MDeformVert *dvert; /* Pointer to mdeform array */
@@ -332,8 +333,8 @@ void BKE_shrinkwrap_compute_boundary_data(Mesh *mesh)
/**
* Shrink-wrap to the nearest vertex
*
* it builds a #BVHTree of vertices we can attach to and then
* for each vertex performs a nearest vertex search on the tree
* it builds a BVH-tree of vertices we can attach to and then
* for each vertex performs a nearest vertex search on the tree.
*/
static void shrinkwrap_calc_nearest_vertex_cb_ex(void *__restrict userdata,
const int i,
@@ -535,12 +536,12 @@ static void shrinkwrap_calc_normal_projection_cb_ex(void *__restrict userdata,
hit->index = -1;
/* TODO: we should use FLT_MAX here, but sweepsphere code isn't prepared for that */
/* TODO: we should use FLT_MAX here, but sweep-sphere code isn't prepared for that. */
hit->dist = BVH_RAYCAST_DIST_MAX;
bool is_aux = false;
/* Project over positive direction of axis */
/* Project over positive direction of axis. */
if (calc->smd->shrinkOpts & MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR) {
if (aux_tree) {
if (BKE_shrinkwrap_project_normal(0, tmp_co, tmp_no, 0.0, local2aux, aux_tree, hit)) {
@@ -1091,10 +1092,10 @@ void BKE_shrinkwrap_find_nearest_surface(ShrinkwrapTreeData *tree,
}
}
/*
* Shrinkwrap moving vertexs to the nearest surface point on the target
/**
* Shrink-wrap moving vertices to the nearest surface point on the target.
*
* it builds a BVHTree from the target mesh and then performs a
* It builds a #BVHTree from the target mesh and then performs a
* NN matches for each vertex
*/
static void shrinkwrap_calc_nearest_surface_point_cb_ex(void *__restrict userdata,
@@ -1408,11 +1409,11 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd,
calc.aux_target = DEG_get_evaluated_object(ctx->depsgraph, smd->auxTarget);
if (mesh != nullptr && smd->shrinkType == MOD_SHRINKWRAP_PROJECT) {
/* Setup arrays to get vertexs positions, normals and deform weights */
/* Setup arrays to get vertices position, normals and deform weights. */
calc.vert = BKE_mesh_verts_for_write(mesh);
calc.vert_normals = BKE_mesh_vertex_normals_ensure(mesh);
/* Using vertexs positions/normals as if a subsurface was applied */
/* Using vertices positions/normals as if a subsurface was applied */
if (smd->subsurfLevels) {
SubsurfModifierData ssmd = {{nullptr}};
ssmd.subdivType = ME_CC_SUBSURF; /* catmull clark */

View File

@@ -363,7 +363,7 @@ static int *static_or_heap_storage_get(StaticOrHeapIntStorage *storage, int heap
if (heap_len <= storage->static_storage_len) {
return storage->static_storage;
}
/* Make sure heap ius big enough. */
/* Make sure heap is big enough. */
if (heap_len > storage->heap_storage_len) {
MEM_SAFE_FREE(storage->heap_storage);
storage->heap_storage = static_cast<int *>(
@@ -1708,7 +1708,7 @@ static int adjacent_edge_point_index_from_coord(const SubdivCCG *subdiv_ccg,
directional_edge_vertex_index = edge_vertices_indices[1];
}
/* Flip the index if the edde points opposite direction. */
/* Flip the index if the edge points opposite direction. */
if (adjacent_vertex_index != directional_edge_vertex_index) {
const int num_edge_points = subdiv_ccg->grid_size * 2;
adjacent_edge_point_index = num_edge_points - adjacent_edge_point_index - 1;

View File

@@ -708,7 +708,7 @@ double BM_mesh_calc_volume(BMesh *bm, bool is_signed) ATTR_WARN_UNUSED_RESULT AT
* Calculate isolated groups of faces with optional filtering.
*
* \param bm: the BMesh.
* \param r_groups_array: Array of ints to fill in, length of bm->totface
* \param r_groups_array: Array of integers to fill in, length of `bm->totface`
* (or when hflag_test is set, the number of flagged faces).
* \param r_group_index: index, length pairs into \a r_groups_array, size of return value
* int pairs: (array_start, array_length).

View File

@@ -729,7 +729,7 @@ struct PBVHBatches {
GPUVertBufRaw access;
GPU_vertbuf_attr_get_raw_data(vbo.vert_buf, 0, &access);
#if 0 /* Enable to fuzz gpu data (to check for overallocation). */
#if 0 /* Enable to fuzz GPU data (to check for over-allocation). */
existing_data = GPU_vertbuf_get_data(vbo.vert_buf);
uchar *c = static_cast<uchar *>(existing_data);
for (int i : IndexRange(vert_count * access.stride)) {

View File

@@ -6250,8 +6250,8 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op)
err_out);
if (!ibuf) {
/* Mostly happens when OpenGL offscreen buffer was failed to create, */
/* but could be other reasons. Should be handled in the future. nazgul */
/* NOTE(@sergey): Mostly happens when OpenGL off-screen buffer was failed to create, */
/* but could be other reasons. Should be handled in the future. */
BKE_reportf(op->reports, RPT_ERROR, "Failed to create OpenGL off-screen buffer: %s", err_out);
return OPERATOR_CANCELLED;
}

View File

@@ -212,7 +212,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
MultiresRuntimeData *runtime_data = multires_ensure_runtime(mmd);
Subdiv *subdiv = subdiv_descriptor_ensure(mmd, &subdiv_settings, mesh);
if (subdiv == nullptr) {
/* Happens on bad topology, ut also on empty input mesh. */
/* Happens on bad topology, also on empty input mesh. */
return result;
}
const bool use_clnors = mmd->flags & eMultiresModifierFlag_UseCustomNormals &&
@@ -308,7 +308,7 @@ static void deformMatrices(ModifierData *md,
MultiresRuntimeData *runtime_data = multires_ensure_runtime(mmd);
Subdiv *subdiv = subdiv_descriptor_ensure(mmd, &subdiv_settings, mesh);
if (subdiv == nullptr) {
/* Happens on bad topology, ut also on empty input mesh. */
/* Happens on bad topology, also on empty input mesh. */
return;
}
BKE_subdiv_displacement_attach_from_multires(subdiv, mesh, mmd);

View File

@@ -43,7 +43,7 @@ void SEQ_timeline_boundbox(const struct Scene *scene,
const struct ListBase *seqbase,
struct rctf *rect);
/**
* Get FPS rate of source media. Movie, scene and movieclip strips are supported.
* Get FPS rate of source media. Movie, scene and movie-clip strips are supported.
* Returns 0 for unsupported strip or if media can't be loaded.
*/
float SEQ_time_sequence_get_fps(struct Scene *scene, struct Sequence *seq);
@@ -132,7 +132,7 @@ float SEQ_time_content_end_frame_get(const struct Scene *scene, const struct Seq
*/
void SEQ_time_start_frame_set(const struct Scene *scene, struct Sequence *seq, int timeline_frame);
/**
* Update length of metastrip after any contained strip length or position has changed.
* Update length of meta-strip after any contained strip length or position has changed.
* \note this function is currently only used internally and in versioning code.
*/
void SEQ_time_update_meta_strip_range(const struct Scene *scene, struct Sequence *seq_meta);