Cleanup: spelling, use term polygons in polygon callbacks

This commit is contained in:
Campbell Barton 2023-05-05 09:25:45 +10:00
parent 49c09d7640
commit ba3d7499fa
41 changed files with 67 additions and 63 deletions

View file

@ -20,7 +20,7 @@
#define GPU_KERNEL_BLOCK_NUM_THREADS 1024
#define GPU_KERNEL_MAX_REGISTERS 64
/* For performance tuning of hiprt kernels we might have to change the number
/* For performance tuning of HIPRT kernels we might have to change the number
* that's why we don't use GPU_KERNEL_BLOCK_NUM_THREADS. */
#define GPU_HIPRT_KERNEL_BLOCK_NUM_THREADS 1024

View file

@ -595,7 +595,7 @@ static FCurve *testcurve_with_duplicates()
/* Create a curve with some duplicate keys. The first ones are all with Y=1, the later repeats
* increase Y-coordinates on every repeat. */
FCurve *fcu = BKE_fcurve_create();
ED_keyframes_add(fcu, 10); /* Avoid `insert_vert_fcurve`, that deduplicates the keys. */
ED_keyframes_add(fcu, 10); /* Avoid `insert_vert_fcurve`, that de-duplicates the keys. */
set_key(fcu, 0, 1.0f, 1.0f);
set_key(fcu, 1, 327.16f, 1.0f);
set_key(fcu, 2, 7.0f, 1.0f);

View file

@ -2448,7 +2448,7 @@ static bool lib_override_resync_tagging_finalize_recurse(
BLI_assert(id_root->override_library != nullptr);
/* This address a very intricated case. It can happen that the current (non-hierarchy root)
/* This address a very intricate case. It can happen that the current (non-hierarchy root)
* override is not currently part of any liboverride hierarchy (it lost its parent(s) in it).
*
* For example, an object may have been moved from one sub-collection to another in the

View file

@ -769,7 +769,7 @@ static bool lib_query_unused_ids_tag_recurse(Main *bmain,
/* This ID is not being processed anymore.
*
* However, we can only tag is as sucessfully processed if either it was detected as part of a
* However, we can only tag is as successfully processed if either it was detected as part of a
* valid usage hierarchy, or, if detected as unused, if it was not part of a dependency loop.
*
* Otherwise, this is an undecided state, it will be resolved at the entry point of this

View file

@ -70,7 +70,7 @@ uint BKE_mask_spline_feather_resolution(MaskSpline *spline, int width, int heigh
uint resol = BKE_mask_spline_resolution(spline, width, height);
float max_jump = 0.0f;
/* avoid checking the featrher if we already hit the maximum value */
/* Avoid checking the feather if we already hit the maximum value. */
if (resol >= MASK_RESOL_MAX) {
return MASK_RESOL_MAX;
}
@ -365,7 +365,7 @@ void BKE_mask_spline_feather_collapse_inner_loops(MaskSpline *spline,
}
}
/* prevent divisionsby zero by ensuring bounding box is not collapsed */
/* Prevent divisions by zero by ensuring bounding box is not collapsed. */
if (max[0] - min[0] < FLT_EPSILON) {
max[0] += 0.01f;
min[0] -= 0.01f;

View file

@ -363,7 +363,7 @@ static void propagate_data_requirements_from_right_to_left(
const Span<const bNode *> toposort_result = tree.toposort_right_to_left();
while (true) {
/* Node updates may require sevaral passes due to cyclic dependencies caused by simulation
/* Node updates may require several passes due to cyclic dependencies caused by simulation
* input/output nodes. */
bool need_update = false;
@ -497,7 +497,7 @@ static void propagate_field_status_from_left_to_right(
const Span<const bNode *> toposort_result = tree.toposort_left_to_right();
while (true) {
/* Node updates may require sevaral passes due to cyclic dependencies. */
/* Node updates may require several passes due to cyclic dependencies. */
bool need_update = false;
for (const bNode *node : toposort_result) {

View file

@ -25,7 +25,7 @@ namespace blender::bke::sim {
/**
* Turn the name into something that can be used as file name. It does not necessarily have to be
* human readible, but it can help if it is at least partially readible.
* human readable, but it can help if it is at least partially readable.
*/
static std::string escape_name(const StringRef name)
{

View file

@ -459,7 +459,7 @@ void EEVEE_volumes_draw_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
NULL);
/* Final integration: We compute for each froxel the
* amount of scattered light and extinction coef at this
* amount of scattered light and extinction coefficient at this
* given depth. We use these textures as double buffer
* for the volumetric history. */
txl->volume_scatter_history = DRW_texture_create_3d_ex(tex_size[0],

View file

@ -114,7 +114,7 @@ void ForwardPipeline::sync()
/* Textures. */
prepass_ps_.bind_texture(RBUFS_UTILITY_TEX_SLOT, inst_.pipelines.utility_tx);
/* Uniform Buf. */
/* Uniform Buffer. */
prepass_ps_.bind_ubo(CAMERA_BUF_SLOT, inst_.camera.ubo_get());
inst_.velocity.bind_resources(&prepass_ps_);
@ -150,11 +150,11 @@ void ForwardPipeline::sync()
opaque_ps_.bind_image(RBUFS_AOV_VALUE_SLOT, &inst_.render_buffers.aov_value_tx);
/* Cryptomatte. */
opaque_ps_.bind_image(RBUFS_CRYPTOMATTE_SLOT, &inst_.render_buffers.cryptomatte_tx);
/* Storage Buf. */
/* Storage Buffer. */
opaque_ps_.bind_ssbo(RBUFS_AOV_BUF_SLOT, &inst_.film.aovs_info);
/* Textures. */
opaque_ps_.bind_texture(RBUFS_UTILITY_TEX_SLOT, inst_.pipelines.utility_tx);
/* Uniform Buf. */
/* Uniform Buffer. */
opaque_ps_.bind_ubo(CAMERA_BUF_SLOT, inst_.camera.ubo_get());
inst_.lights.bind_resources(&opaque_ps_);
@ -180,7 +180,7 @@ void ForwardPipeline::sync()
/* Textures. */
sub.bind_texture(RBUFS_UTILITY_TEX_SLOT, inst_.pipelines.utility_tx);
/* Uniform Buf. */
/* Uniform Buffer. */
sub.bind_ubo(CAMERA_BUF_SLOT, inst_.camera.ubo_get());
inst_.lights.bind_resources(&sub);

View file

@ -621,8 +621,8 @@ bool ED_mask_selected_minmax(const bContext *C,
}
/* Use evaluated mask to take animation into account.
* The animation of splies is not "flushed" back to original, so need to explicitly
* use evaluated datablock here. */
* The animation of splines is not "flushed" back to original, so need to explicitly
* use evaluated data-block here. */
Mask *mask_eval = (Mask *)DEG_get_evaluated_id(depsgraph, &mask->id);
INIT_MINMAX2(min, max);

View file

@ -897,7 +897,7 @@ static int mask_select_more_less(bContext *C, bool more)
const bool cyclic = (spline->flag & MASK_SPLINE_CYCLIC) != 0;
bool start_sel, end_sel, prev_sel, cur_sel;
/* reselect point if any handle is selected to make the result more predictable */
/* Re-select point if any handle is selected to make the result more predictable. */
for (int i = 0; i < spline->tot_point; i++) {
BKE_mask_point_select_set(spline->points + i, MASKPOINT_ISSEL_ANY(spline->points + i));
}

View file

@ -564,8 +564,8 @@ inline bool is_builtin_type(std::string type)
/* Add Types as needed. */
/* TODO(Metal): Consider replacing this with a switch and `constexpr` hash and switch.
* Though most efficient and maintainable approach to be determined.
* NOTE: Some duplicate types exit for Metal and GLSL representations, as generated typenames
* from createinfo may use GLSL signature. */
* NOTE: Some duplicate types exit for Metal and GLSL representations, as generated type-names
* from #shader::ShaderCreateInfo may use GLSL signature. */
static std::map<std::string, eMTLDataType> glsl_builtin_types = {
{"float", MTL_DATATYPE_FLOAT},
{"vec2", MTL_DATATYPE_FLOAT2},

View file

@ -35,7 +35,7 @@ class MTLStorageBuf : public StorageBuf {
} storage_source_ = MTL_STORAGE_BUF_TYPE_DEFAULT;
union {
/* Own alloation. */
/** Own allocation. */
gpu::MTLBuffer *metal_buffer_;
/* Wrapped type. */
MTLUniformBuf *uniform_buffer_;

View file

@ -251,7 +251,7 @@ void MTLStorageBuf::read(void *data)
id<MTLBlitCommandEncoder> blit_encoder = ctx->main_command_buffer.ensure_begin_blit_encoder();
[blit_encoder synchronizeResource:metal_buffer_->get_metal_buffer()];
/* Ensure sync has occured. */
/* Ensure sync has occurred. */
GPU_finish();
}

View file

@ -79,9 +79,10 @@ enum eImbFileType {
/* Only for readability. */
#define IMB_FTYPE_NONE 0
/* ibuf->foptions flag, type specific options.
* Some formats include compression rations on some bits */
/**
* #ImBuf::foptions.flag, type specific options.
* Some formats include compression rations on some bits.
*/
#define OPENEXR_HALF (1 << 8)
/* careful changing this, it's used in DNA as well */
#define OPENEXR_COMPRESS (15)

View file

@ -850,12 +850,11 @@ static AVFrame *ffmpeg_double_buffer_frame_fallback_get(struct anim *anim)
return nullptr;
}
/* postprocess the image in anim->pFrame and do color conversion
* and deinterlacing stuff.
/**
* Postprocess the image in anim->pFrame and do color conversion and de-interlacing stuff.
*
* Output is anim->cur_frame_final
* Output is `anim->cur_frame_final`.
*/
static void ffmpeg_postprocess(struct anim *anim, AVFrame *input)
{
ImBuf *ibuf = anim->cur_frame_final;

View file

@ -205,7 +205,7 @@ typedef struct ColormanageCacheKey {
typedef struct ColormanageCacheData {
int flag; /* view flags of cached buffer */
int look; /* Additional artistics transform */
int look; /* Additional artistic transform. */
float exposure; /* exposure value cached buffer is calculated with */
float gamma; /* gamma value cached buffer is calculated with */
float dither; /* dither value cached buffer is calculated with */

View file

@ -806,7 +806,7 @@ void IMB_rectblend(ImBuf *dbuf,
}
dmaskrect += origskip;
}
/* no destination mask buffer, do regular blend with masktexture if present */
/* No destination mask buffer, do regular blend with mask-texture if present. */
else {
for (x = width; x > 0; x--, dr++, outr++, sr++, cmr++) {
uchar *src = (uchar *)sr;
@ -905,7 +905,7 @@ void IMB_rectblend(ImBuf *dbuf,
}
dmaskrect += origskip;
}
/* no destination mask buffer, do regular blend with masktexture if present */
/* No destination mask buffer, do regular blend with mask-texture if present. */
else {
for (x = width; x > 0; x--, drf += 4, orf += 4, srf += 4, cmr++) {
float mask = float(mask_max) * float(*cmr);

View file

@ -337,7 +337,7 @@ static ImBuf *thumb_create_ex(const char *file_path,
if (get_thumb_dir(tdir, size)) {
BLI_snprintf(tpath, FILE_MAX, "%s%s", tdir, thumb);
// thumb[8] = '\0'; /* shorten for tempname, not needed anymore */
// thumb[8] = '\0'; /* shorten for `temp` name, not needed anymore */
BLI_snprintf(temp, FILE_MAX, "%sblender_%d_%s.png", tdir, abs(getpid()), thumb);
if (BLI_path_ncmp(file_path, tdir, sizeof(tdir)) == 0) {
return nullptr;
@ -400,7 +400,7 @@ static ImBuf *thumb_create_ex(const char *file_path,
/* Scaling down must never assign zero width/height, see: #89868. */
short ex = MAX2(1, short(img->x * scale));
short ey = MAX2(1, short(img->y * scale));
/* Save some time by only scaling byte buf */
/* Save some time by only scaling byte buffer. */
if (img->rect_float) {
if (img->rect == nullptr) {
IMB_rect_from_float(img);

View file

@ -448,7 +448,8 @@ int rna_Mesh_loop_triangles_lookup_int(PointerRNA *ptr, int index, PointerRNA *r
return true;
}
static void rna_Mesh_loop_triangle_faces_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
static void rna_Mesh_loop_triangle_polygons_begin(CollectionPropertyIterator *iter,
PointerRNA *ptr)
{
const Mesh *mesh = rna_mesh(ptr);
rna_iterator_array_begin(iter,
@ -459,7 +460,7 @@ static void rna_Mesh_loop_triangle_faces_begin(CollectionPropertyIterator *iter,
NULL);
}
int rna_Mesh_loop_triangle_faces_lookup_int(PointerRNA *ptr, int index, PointerRNA *r_ptr)
int rna_Mesh_loop_triangle_polygons_lookup_int(PointerRNA *ptr, int index, PointerRNA *r_ptr)
{
const Mesh *mesh = rna_mesh(ptr);
if (index < 0 || index >= BKE_mesh_runtime_looptri_len(mesh)) {
@ -4376,12 +4377,12 @@ static void rna_def_mesh(BlenderRNA *brna)
prop = RNA_def_property(srna, "loop_triangle_polygons", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop,
"rna_Mesh_loop_triangle_faces_begin",
"rna_Mesh_loop_triangle_polygons_begin",
"rna_iterator_array_next",
"rna_iterator_array_end",
"rna_iterator_array_get",
"rna_Mesh_loop_triangles_length",
"rna_Mesh_loop_triangle_faces_lookup_int",
"rna_Mesh_loop_triangle_polygons_lookup_int",
NULL,
NULL);
RNA_def_property_struct_type(prop, "ReadOnlyInteger");

View file

@ -67,7 +67,7 @@ static void copyData(const ModifierData *md, ModifierData *target, const int fla
static void requiredDataMask(ModifierData * /*md*/, CustomData_MeshMasks *r_cddata_masks)
{
/* ask for vertexgroups */
/* Ask for vertex-groups. */
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -68,7 +68,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
BevelModifierData *bmd = (BevelModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (bmd->defgrp_name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -48,7 +48,7 @@ static void initData(ModifierData *md)
MEMCPY_STRUCT_AFTER(cmd, DNA_struct_default_get(CastModifierData), modifier);
}
static bool isDisabled(const Scene * /*scene*/, ModifierData *md, bool /*useRenderParams*/)
static bool isDisabled(const Scene * /*scene*/, ModifierData *md, bool /*useRenderParams*/)
{
CastModifierData *cmd = (CastModifierData *)md;
short flag;
@ -66,7 +66,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
CastModifierData *cmd = (CastModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (cmd->defgrp_name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}
@ -119,9 +119,9 @@ static void sphere_do(CastModifierData *cmd,
ctrl_ob = cmd->object;
/* spherify's center is {0, 0, 0} (the ob's own center in its local
* space), by default, but if the user defined a control object,
* we use its location, transformed to ob's local space */
/* The spheres center is {0, 0, 0} (the ob's own center in its local space),
* by default, but if the user defined a control object,
* we use its location, transformed to ob's local space. */
if (ctrl_ob) {
if (flag & MOD_CAST_USE_OB_TRANSFORM) {
invert_m4_m4(imat, ctrl_ob->object_to_world);
@ -482,7 +482,7 @@ static void deformVerts(ModifierData *md,
static void deformVertsEM(ModifierData *md,
const ModifierEvalContext *ctx,
BMEditMesh *editData,
BMEditMesh *editData,
Mesh *mesh,
float (*vertexCos)[3],
int verts_num)

View file

@ -55,7 +55,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
CurveModifierData *cmd = (CurveModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (cmd->name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -58,7 +58,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
DecimateModifierData *dmd = (DecimateModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (dmd->defgrp_name[0] != '\0' && (dmd->defgrp_factor > 0.0f)) {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -63,7 +63,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
DisplaceModifierData *dmd = (DisplaceModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (dmd->defgrp_name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -72,7 +72,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
HookModifierData *hmd = (HookModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (hmd->name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -495,7 +495,7 @@ static void required_data_mask(ModifierData *md, CustomData_MeshMasks *r_cddata_
{
LaplacianSmoothModifierData *smd = (LaplacianSmoothModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (smd->defgrp_name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -51,7 +51,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
LatticeModifierData *lmd = (LatticeModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (lmd->name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -123,7 +123,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
MeshDeformModifierData *mmd = (MeshDeformModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (mmd->defgrp_name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -628,7 +628,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
r_cddata_masks->lmask |= CD_MASK_CUSTOMLOOPNORMAL;
/* Ask for vertexgroups if we need them. */
/* Ask for vertex-groups if we need them. */
if (enmd->defgrp_name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -52,7 +52,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
ShrinkwrapModifierData *smd = (ShrinkwrapModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (smd->vgroup_name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -270,7 +270,7 @@ static void simple_helper(void *__restrict userdata,
}
copy_v3_v3_unmap(co, co_remap, axis_map);
/* Use vertex weight has coef of linear interpolation */
/* Use vertex weight coefficient of the linear interpolation. */
interp_v3_v3v3(
curr_deform_data->vertexCos[iter], curr_deform_data->vertexCos[iter], co, weight);
@ -416,7 +416,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
SimpleDeformModifierData *smd = (SimpleDeformModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (smd->vgroup_name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -65,7 +65,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
SmoothModifierData *smd = (SmoothModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (smd->defgrp_name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -57,7 +57,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
SolidifyModifierData *smd = (SolidifyModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (smd->defgrp_name[0] != '\0' || smd->shell_defgrp_name[0] != '\0' ||
smd->rim_defgrp_name[0] != '\0')
{

View file

@ -62,7 +62,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
UVWarpModifierData *umd = (UVWarpModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (umd->vgroup_name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -74,7 +74,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
WarpModifierData *wmd = (WarpModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (wmd->defgrp_name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -112,7 +112,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
r_cddata_masks->fmask |= CD_MASK_MTFACE;
}
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (wmd->defgrp_name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -147,7 +147,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
WeldModifierData *wmd = (WeldModifierData *)md;
/* Ask for vertexgroups if we need them. */
/* Ask for vertex-groups if we need them. */
if (wmd->defgrp_name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -45,7 +45,7 @@ static void requiredDataMask(ModifierData *md, CustomData_MeshMasks *r_cddata_ma
{
WireframeModifierData *wmd = (WireframeModifierData *)md;
/* ask for vertexgroups if we need them */
/* Ask for vertex-groups if we need them. */
if (wmd->defgrp_name[0] != '\0') {
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
}

View file

@ -75,6 +75,7 @@ dict_custom = {
"deallocate",
"deallocated",
"deallocating",
"decompressor",
"decorrelated",
"decrement",
"decrementing",
@ -278,6 +279,7 @@ dict_custom = {
"reprojection",
"reprojections",
"repurpose",
"rescaled",
"respecialized",
"resynced",
"resyncing",
@ -311,6 +313,7 @@ dict_custom = {
"tertiarily",
"tokenize",
"tokenizing",
"transcode",
"transmissive",
"triangulations",
"triangulator",