Cleanup: spelling in comments

This commit is contained in:
Campbell Barton
2021-09-29 07:29:15 +10:00
parent efe3a13b55
commit 79290f5160
20 changed files with 38 additions and 41 deletions

View File

@@ -110,8 +110,7 @@ class BlenderSession {
BL::RenderSettings b_render;
BL::Depsgraph b_depsgraph;
/* NOTE: Blender's scene might become invalid after call
* free_blender_memory_if_possible().
*/
* #free_blender_memory_if_possible(). */
BL::Scene b_scene;
BL::SpaceView3D b_v3d;
BL::RegionView3D b_rv3d;
@@ -147,7 +146,7 @@ class BlenderSession {
protected:
void stamp_view_layer_metadata(Scene *scene, const string &view_layer_name);
/* Check whether session error happenned.
/* Check whether session error happened.
* If so, it is reported to the render engine and true is returned.
* Otherwise false is returned. */
bool check_and_report_session_error();

View File

@@ -79,7 +79,7 @@ typedef unsigned long long uint64_t;
#define ccl_gpu_global_id_x() (ccl_gpu_block_idx_x * ccl_gpu_block_dim_x + ccl_gpu_thread_idx_x)
#define ccl_gpu_global_size_x() (ccl_gpu_grid_dim_x * ccl_gpu_block_dim_x)
/* GPU warp synchronizaton */
/* GPU warp synchronization */
#define ccl_gpu_syncthreads() __syncthreads()
#define ccl_gpu_ballot(predicate) __ballot(predicate)

View File

@@ -302,7 +302,7 @@ class AssetCatalog {
* When this catalog's path is equal to the given path, return true as well.
*
* Note that non-normalized paths (so for example starting or ending with a slash) are not
* supported, and result in undefined behaviour.
* supported, and result in undefined behavior.
*/
bool is_contained_in(const CatalogPath &other_path) const;

View File

@@ -18,7 +18,7 @@
/** \file
* \ingroup bke
* \brief Volume datablock.
* \brief Volume data-block.
*/
#ifdef __cplusplus
extern "C" {
@@ -37,7 +37,7 @@ struct VolumeGridVector;
void BKE_volumes_init(void);
/* Datablock Management */
/* Data-block Management */
void BKE_volume_init_grids(struct Volume *volume);
void *BKE_volume_add(struct Main *bmain, const char *name);
@@ -122,13 +122,13 @@ void BKE_volume_grid_transform_matrix(const struct VolumeGrid *grid, float mat[4
/* Volume Editing
*
* These are intended for modifiers to use on evaluated datablocks.
* These are intended for modifiers to use on evaluated data-blocks.
*
* new_for_eval creates a volume datablock with no grids or file path, but
* new_for_eval creates a volume data-block with no grids or file path, but
* preserves other settings such as viewport display options.
*
* copy_for_eval creates a volume datablock preserving everything except the
* file path. Grids are shared with the source datablock, not copied. */
* copy_for_eval creates a volume data-block preserving everything except the
* file path. Grids are shared with the source data-block, not copied. */
struct Volume *BKE_volume_new_for_eval(const struct Volume *volume_src);
struct Volume *BKE_volume_copy_for_eval(struct Volume *volume_src, bool reference);

View File

@@ -175,7 +175,7 @@ TEST_F(AssetCatalogTest, load_single_file)
AssetCatalogService service(asset_library_root_);
service.load_from_disk(asset_library_root_ + "/" + "blender_assets.cats.txt");
// Test getting a non-existant catalog ID.
// Test getting a non-existent catalog ID.
EXPECT_EQ(nullptr, service.find_catalog(BLI_uuid_generate_random()));
// Test getting an invalid catalog (without path definition).
@@ -677,7 +677,7 @@ TEST_F(AssetCatalogTest, delete_catalog_leaf)
{"character/Ružena", 1},
{"character/Ružena/poselib", 2},
{"character/Ružena/poselib/face", 3},
// {"character/Ružena/poselib/hand", 3}, // this is the deleted one
// {"character/Ružena/poselib/hand", 3}, // This is the deleted one.
{"path", 0},
{"path/without", 1},
{"path/without/simplename", 2},
@@ -754,7 +754,7 @@ TEST_F(AssetCatalogTest, merge_catalog_files)
TestableAssetCatalogService service(asset_library_root_);
service.load_from_disk(cdf_dir);
// Copy a modified file, to mimick a situation where someone changed the CDF after we loaded it.
// Copy a modified file, to mimic a situation where someone changed the CDF after we loaded it.
ASSERT_EQ(0, BLI_copy(modified_cdf_file.c_str(), temp_cdf_file.c_str()));
// Overwrite the modified file. This should merge the on-disk file with our catalogs.

View File

@@ -1962,7 +1962,7 @@ bool BLI_path_contains(const char *container_path, const char *containee_path)
}
/* Add a trailing slash to prevent same-prefix directories from matching.
* e.g. "/some/path" doesn't contain "/some/pathlib". */
* e.g. "/some/path" doesn't contain "/some/path_lib". */
BLI_path_slash_ensure(container_native);
return BLI_str_startswith(containee_native, container_native);

View File

@@ -695,8 +695,9 @@ class MemoryBuffer {
return y >= m_rect.ymin && y < m_rect.ymax;
}
/* Fast floor functions. The caller should check result is within buffer bounds. It ceils in near
* cases and when given coordinate is negative and less than buffer rect `min - 1`. */
/* Fast `floor(..)` functions. The caller should check result is within buffer bounds.
* It `ceil(..)` in near cases and when given coordinate
* is negative and less than buffer rect `min - 1`. */
int floor_x(float x) const
{
return (int)(x + to_positive_x_stride_) - to_positive_x_stride_;

View File

@@ -228,7 +228,7 @@ void BlurBaseOperation::determine_canvas(const rcti &preferred_area, rcti &r_are
}
case eExecutionModel::FullFrame: {
/* Setting a modifier ensures all non main inputs have extended bounds as preferred
* canvas, avoiding unnecessary canvas convertions that would hide constant
* canvas, avoiding unnecessary canvas conversions that would hide constant
* operations. */
set_determined_canvas_modifier([=](rcti &canvas) {
/* Rounding to even prevents jiggling in backdrop while switching size values. */

View File

@@ -1563,7 +1563,7 @@ static void node_composit_buts_antialiasing(uiLayout *layout, bContext *UNUSED(C
uiItemR(col, ptr, "corner_rounding", 0, nullptr, ICON_NONE);
}
/* qdn: glare node */
/* glare node */
static void node_composit_buts_glare(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "glare_type", DEFAULT_FLAGS, "", ICON_NONE);

View File

@@ -855,7 +855,7 @@ typedef struct NodeVertexCol {
char name[64];
} NodeVertexCol;
/* qdn: Defocus blur node */
/** Defocus blur node. */
typedef struct NodeDefocus {
char bktype, _pad0, preview, gamco;
short samples, no_zbuf;
@@ -871,7 +871,7 @@ typedef struct NodeScriptDict {
void *node;
} NodeScriptDict;
/* qdn: glare node */
/** glare node. */
typedef struct NodeGlare {
char quality, type, iter;
/* XXX angle is only kept for backward/forward compatibility,
@@ -882,14 +882,14 @@ typedef struct NodeGlare {
char _pad1[4];
} NodeGlare;
/* qdn: tonemap node */
/** Tonemap node. */
typedef struct NodeTonemap {
float key, offset, gamma;
float f, m, a, c;
int type;
} NodeTonemap;
/* qdn: lens distortion node */
/** Lens distortion node. */
typedef struct NodeLensDist {
short jit, proj, fit;
char _pad[2];

View File

@@ -315,7 +315,7 @@ void ntreeCompositTagRender(Scene *scene)
if (node->id == (ID *)scene || node->type == CMP_NODE_COMPOSITE) {
nodeUpdate(sce_iter->nodetree, node);
}
else if (node->type == CMP_NODE_TEXTURE) /* uses scene sizex/sizey */ {
else if (node->type == CMP_NODE_TEXTURE) /* uses scene size_x/size_y */ {
nodeUpdate(sce_iter->nodetree, node);
}
}

View File

@@ -23,7 +23,7 @@
#include "node_composite_util.hh"
/* **************** Brigh and contrsast ******************** */
/* **************** Bright and Contrast ******************** */
static bNodeSocketTemplate cmp_node_brightcontrast_in[] = {
{SOCK_RGBA, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},

View File

@@ -25,7 +25,7 @@
/* **************** CURVE Time ******************** */
/* custom1 = sfra, custom2 = efra */
/* custom1 = start_frame, custom2 = end_frame */
static bNodeSocketTemplate cmp_node_time_out[] = {
{SOCK_FLOAT, N_("Fac")},
{-1, ""},

View File

@@ -25,7 +25,7 @@
#include <climits>
/* ************ qdn: Defocus node ****************** */
/* ************ Defocus Node ****************** */
static bNodeSocketTemplate cmp_node_defocus_in[] = {
{SOCK_RGBA, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},
{SOCK_FLOAT, N_("Z"), 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
@@ -38,7 +38,7 @@ static bNodeSocketTemplate cmp_node_defocus_out[] = {
static void node_composit_init_defocus(bNodeTree *UNUSED(ntree), bNode *node)
{
/* qdn: defocus node */
/* defocus node */
NodeDefocus *nbd = (NodeDefocus *)MEM_callocN(sizeof(NodeDefocus), "node defocus data");
nbd->bktype = 0;
nbd->rotation = 0.0f;

View File

@@ -140,8 +140,7 @@ static void cmp_node_image_create_outputs(bNodeTree *ntree,
*
* So we manually construct image user to be sure first
* image from sequence (that one which is set as filename
* for image datablock) is used for sockets detection
*/
* for image data-block) is used for sockets detection. */
load_iuser.ok = 1;
load_iuser.framenr = offset;

View File

@@ -39,7 +39,7 @@ static void node_composit_init_vecblur(bNodeTree *UNUSED(ntree), bNode *node)
nbd->fac = 1.0f;
}
/* custom1: iterations, custom2: maxspeed (0 = nolimit) */
/* custom1: iterations, custom2: max_speed (0 = no_limit). */
void register_node_type_cmp_vecblur(void)
{
static bNodeType ntype;

View File

@@ -404,7 +404,7 @@ static void transfer_attribute_nearest(const GeometrySet &src_geometry,
data_type);
for (const int i : IndexRange(tot_samples)) {
if (pointcloud_distances_sq[i] < mesh_distances_sq[i]) {
/* Pointcloud point is closer. */
/* Point-cloud point is closer. */
const int index = pointcloud_indices[i];
pointcloud_src_attribute.varray->get(index, buffer);
dst_attribute->set_by_relocate(i, buffer);

View File

@@ -198,7 +198,7 @@ void node_group_update(struct bNodeTree *ntree, struct bNode *node)
nodeRemoveAllSockets(ntree, node);
}
else if ((ID_IS_LINKED(node->id) && (node->id->tag & LIB_TAG_MISSING))) {
/* Missing datablock, leave sockets unchanged so that when it comes back
/* Missing data-block, leave sockets unchanged so that when it comes back
* the links remain valid. */
}
else {

View File

@@ -19,7 +19,7 @@
#include "node_shader_util.h"
/* **************** Brigh and contrsast ******************** */
/* **************** Bright and contrast ******************** */
static bNodeSocketTemplate sh_node_brightcontrast_in[] = {
{SOCK_RGBA, N_("Color"), 1.0f, 1.0f, 1.0f, 1.0f},

View File

@@ -1958,13 +1958,11 @@ int imagewraposa(Tex *tex,
}
if (texres->nor && (tex->imaflag & TEX_NORMALMAP)) {
/* qdn: normal from color
* The invert of the red channel is to make
* the normal map compliant with the outside world.
* It needs to be done because in Blender
* the normal used in the renderer points inward. It is generated
* this way in calc_vertexnormals(). Should this ever change
* this negate must be removed. */
/* Normal from color:
* The invert of the red channel is to make the normal map compliant with the outside world.
* It needs to be done because in Blender the normal used in the renderer points inward.
* It is generated this way in #calc_vertexnormals().
* Should this ever change this negate must be removed. */
texres->nor[0] = -2.0f * (texres->tr - 0.5f);
texres->nor[1] = 2.0f * (texres->tg - 0.5f);
texres->nor[2] = 2.0f * (texres->tb - 0.5f);