Cleanup: spelling in comments, minor reformatting changes

This commit is contained in:
Campbell Barton 2022-04-07 14:48:00 +10:00
parent 792a481bee
commit 7cd6bda206
13 changed files with 19 additions and 20 deletions

View File

@ -51,7 +51,8 @@ typedef enum AttributeDomainMask {
bool BKE_id_attributes_supported(struct ID *id); bool BKE_id_attributes_supported(struct ID *id);
/** Create a new attribute layer. /**
* Create a new attribute layer.
*/ */
struct CustomDataLayer *BKE_id_attribute_new( struct CustomDataLayer *BKE_id_attribute_new(
struct ID *id, const char *name, int type, AttributeDomain domain, struct ReportList *reports); struct ID *id, const char *name, int type, AttributeDomain domain, struct ReportList *reports);
@ -103,11 +104,11 @@ void BKE_id_attribute_subset_active_set(struct ID *id,
CustomDataMask mask); CustomDataMask mask);
/** /**
* Sets up a temporary ID with arbitrary CustomData domains. r_id will * Sets up a temporary ID with arbitrary CustomData domains. `r_id` will
* be zero initialized with ID type id_type and any non-nullptr * be zero initialized with ID type id_type and any non-nullptr
* CustomData parameter will be copied into the appropriate struct members. * CustomData parameter will be copied into the appropriate struct members.
* *
* \param r_id Pointer to storage sufficient for ID typecode id_type. * \param r_id: Pointer to storage sufficient for ID type-code id_type.
*/ */
void BKE_id_attribute_copy_domains_temp(short id_type, void BKE_id_attribute_copy_domains_temp(short id_type,
const struct CustomData *vdata, const struct CustomData *vdata,

View File

@ -4018,7 +4018,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex(
treeData->tree, ray_start, ray_dir, 0.0f, &hit, mesh_tris_spherecast_dp, treeData); treeData->tree, ray_start, ray_dir, 0.0f, &hit, mesh_tris_spherecast_dp, treeData);
if (hit.index != -1) { if (hit.index != -1) {
/* Add factor on supersample filter */ /* Add factor on super-sample filter. */
volume_factor = 1.0f; volume_factor = 1.0f;
hit_found = HIT_VOLUME; hit_found = HIT_VOLUME;

View File

@ -292,7 +292,7 @@ static ccd_Mesh *ccd_mesh_make(Object *ob)
pccd_M->bbmax[0] = pccd_M->bbmax[1] = pccd_M->bbmax[2] = -1e30f; pccd_M->bbmax[0] = pccd_M->bbmax[1] = pccd_M->bbmax[2] = -1e30f;
pccd_M->mprevvert = NULL; pccd_M->mprevvert = NULL;
/* blow it up with forcefield ranges */ /* Blow it up with force-field ranges. */
hull = max_ff(ob->pd->pdef_sbift, ob->pd->pdef_sboft); hull = max_ff(ob->pd->pdef_sbift, ob->pd->pdef_sboft);
/* Allocate and copy verts. */ /* Allocate and copy verts. */

View File

@ -99,7 +99,7 @@ static void workbench_studiolight_data_update(WORKBENCH_PrivateData *wpd, WORKBE
if (sl && sl->flag) { if (sl && sl->flag) {
copy_v3_v3(light->light_direction, sl->vec); copy_v3_v3(light->light_direction, sl->vec);
mul_mat3_m4_v3(rot_matrix, light->light_direction); mul_mat3_m4_v3(rot_matrix, light->light_direction);
/* We should predivide the power by PI but that makes the lights really dim. */ /* We should pre-divide the power by PI but that makes the lights really dim. */
copy_v3_v3(light->specular_color, sl->spec); copy_v3_v3(light->specular_color, sl->spec);
copy_v3_v3(light->diffuse_color, sl->col); copy_v3_v3(light->diffuse_color, sl->col);
light->wrapped = sl->smooth; light->wrapped = sl->smooth;

View File

@ -450,7 +450,7 @@ static int poselib_add_menu_invoke(bContext *C, wmOperator *op, const wmEvent *U
"frame", "frame",
CFRA); CFRA);
/* replace existing - submenu */ /* Replace existing - sub-menu. */
uiItemMenuF( uiItemMenuF(
layout, IFACE_("Replace Existing..."), 0, poselib_add_menu_invoke__replacemenu, NULL); layout, IFACE_("Replace Existing..."), 0, poselib_add_menu_invoke__replacemenu, NULL);
} }

View File

@ -722,7 +722,7 @@ bool ui_but_rna_equals_ex(const uiBut *but,
return true; return true;
} }
/* NOTE: if but->poin is allocated memory for every defbut, things fail... */ /* NOTE: if `but->poin` is allocated memory for every `uiDefBut*`, things fail. */
static bool ui_but_equals_old(const uiBut *but, const uiBut *oldbut) static bool ui_but_equals_old(const uiBut *but, const uiBut *oldbut)
{ {
/* various properties are being compared here, hopefully sufficient /* various properties are being compared here, hopefully sufficient

View File

@ -70,7 +70,7 @@ static bool checkbmp(const uchar *mem, const size_t size)
BMPINFOHEADER bmi; BMPINFOHEADER bmi;
uint u; uint u;
/* skip fileheader */ /* Skip file-header. */
mem += BMP_FILEHEADER_SIZE; mem += BMP_FILEHEADER_SIZE;
/* for systems where an int needs to be 4 bytes aligned */ /* for systems where an int needs to be 4 bytes aligned */

View File

@ -272,7 +272,7 @@ int IMB_indexer_get_frame_index(struct anim_index *idx, int frameno)
int middle; int middle;
int first = 0; int first = 0;
/* bsearch (lower bound) the right index */ /* Binary-search (lower bound) the right index. */
while (len > 0) { while (len > 0) {
half = len >> 1; half = len >> 1;

View File

@ -633,8 +633,8 @@ BLI_INLINE int DOWNSAMPLE_FLOAT_TO_16BIT(const float _val)
/* ****************************** COPIED FROM image_to_j2k.c */ /* ****************************** COPIED FROM image_to_j2k.c */
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
#define CINEMA_24_CS 1302083 /* Codestream length for 24fps. */ #define CINEMA_24_CS 1302083 /* Code-stream length for 24fps. */
#define CINEMA_48_CS 651041 /* Codestream length for 48fps. */ #define CINEMA_48_CS 651041 /* Code-stream length for 48fps. */
#define COMP_24_CS 1041666 /* Maximum size per color component for 2K & 4K @ 24fps. */ #define COMP_24_CS 1041666 /* Maximum size per color component for 2K & 4K @ 24fps. */
#define COMP_48_CS 520833 /* Maximum size per color component for 2K @ 48fps. */ #define COMP_48_CS 520833 /* Maximum size per color component for 2K @ 48fps. */
@ -673,7 +673,7 @@ static void cinema_parameters(opj_cparameters_t *parameters)
parameters->image_offset_x0 = 0; parameters->image_offset_x0 = 0;
parameters->image_offset_y0 = 0; parameters->image_offset_y0 = 0;
/* Codeblock size = 32 * 32. */ /* Code-block size = 32 * 32. */
parameters->cblockw_init = 32; parameters->cblockw_init = 32;
parameters->cblockh_init = 32; parameters->cblockh_init = 32;
parameters->csty |= 0x01; parameters->csty |= 0x01;

View File

@ -614,8 +614,7 @@ void BoneExtended::set_bone_layers(std::string layerString, std::vector<std::str
} }
/* If numeric layers and labeled layers are used in parallel (unlikely), /* If numeric layers and labeled layers are used in parallel (unlikely),
* we get a potential mixup. Just leave as is for now. * we get a potential mix-up. Just leave as is for now. */
*/
this->bone_layers = bc_set_layer(this->bone_layers, pos); this->bone_layers = bc_set_layer(this->bone_layers, pos);
} }
} }

View File

@ -22,7 +22,6 @@ typedef struct TextLine {
char *line; char *line;
/** May be NULL if syntax is off or not yet formatted. */ /** May be NULL if syntax is off or not yet formatted. */
char *format; char *format;
/** Blen unused. */
int len; int len;
char _pad0[4]; char _pad0[4];
} TextLine; } TextLine;

View File

@ -1156,12 +1156,12 @@ typedef struct wmDrag {
} wmDrag; } wmDrag;
/** /**
* Dropboxes are like keymaps, part of the screen/area/region definition. * Drop-boxes are like key-maps, part of the screen/area/region definition.
* Allocation and free is on startup and exit. * Allocation and free is on startup and exit.
* *
* The operator is polled and invoked with the current context (#WM_OP_INVOKE_DEFAULT), there is no * The operator is polled and invoked with the current context (#WM_OP_INVOKE_DEFAULT), there is no
* way to override that (by design, since dropboxes should act on the exact mouse position). So the * way to override that (by design, since drop-boxes should act on the exact mouse position).
* drop-boxes are supposed to check the required area and region context in their poll. * So the drop-boxes are supposed to check the required area and region context in their poll.
*/ */
typedef struct wmDropBox { typedef struct wmDropBox {
struct wmDropBox *next, *prev; struct wmDropBox *next, *prev;

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* These define have its origin at sgi, where all device defines were written down in device.h. * These define have its origin at SGI, where all device defines were written down in device.h.
* Blender copied the conventions quite some, and expanded it with internal new defines (ton) * Blender copied the conventions quite some, and expanded it with internal new defines (ton)
*/ */