Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-01-18 06:27:29 +0300
committerCampbell Barton <campbell@blender.org>2022-01-18 06:27:29 +0300
commitdb496a0b7dcf1ab024aece9858257c40529138e4 (patch)
treee11de882ccca27cca20ab35a221120dbce69c02e /source
parent20df402adc871a76cd98f7de116c48bebd151ce3 (diff)
Cleanup: spelling in comments
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/lib_remap_test.cc2
-rw-r--r--source/blender/blenlib/tests/BLI_any_test.cc2
-rw-r--r--source/blender/blenloader/intern/versioning_250.c7
-rw-r--r--source/blender/blenloader/intern/versioning_userdef.c4
-rw-r--r--source/blender/editors/screen/glutil.c6
-rw-r--r--source/blender/gpu/intern/gpu_shader_create_info.cc4
-rw-r--r--source/blender/gpu/intern/gpu_shader_create_info.hh8
-rw-r--r--source/blender/gpu/intern/gpu_shader_create_info_private.hh2
-rw-r--r--source/blender/gpu/intern/gpu_shader_dependency.cc2
-rw-r--r--source/blender/gpu/intern/gpu_shader_shared_utils.h7
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c2
-rw-r--r--source/blender/render/intern/texture_margin.cc18
12 files changed, 29 insertions, 35 deletions
diff --git a/source/blender/blenkernel/intern/lib_remap_test.cc b/source/blender/blenkernel/intern/lib_remap_test.cc
index f803e600787..2faf9265ea6 100644
--- a/source/blender/blenkernel/intern/lib_remap_test.cc
+++ b/source/blender/blenkernel/intern/lib_remap_test.cc
@@ -227,7 +227,7 @@ TEST(lib_remap, delete_when_remap_to_self_not_allowed)
/** \} */
/* -------------------------------------------------------------------- */
-/** \name Userref counting
+/** \name User Reference Counting
* \{ */
TEST(lib_remap, users_are_decreased_when_not_skipping_never_null)
diff --git a/source/blender/blenlib/tests/BLI_any_test.cc b/source/blender/blenlib/tests/BLI_any_test.cc
index 3a5cbee6d72..dc72affd610 100644
--- a/source/blender/blenlib/tests/BLI_any_test.cc
+++ b/source/blender/blenlib/tests/BLI_any_test.cc
@@ -54,7 +54,7 @@ TEST(any, AssignMap)
Any<> c = std::move(a);
/* Test valid state after self assignment. Clang emits `-Wself-assign-overloaded` with `c=c;`.
- * And pragma suppression creates warnings on other compilers. */
+ * And `pragma` suppression creates warnings on other compilers. */
c = static_cast<decltype(a) &>(c);
EXPECT_TRUE(c);
EXPECT_EQ((c.get<Map<int, int>>().lookup(4)), 2);
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index bee8bb757e4..52737950ea3 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -856,10 +856,9 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
if (!ts->uv_selectmode || ts->vgroup_weight == 0.0f) {
ts->selectmode = SCE_SELECT_VERTEX;
- /* autokeying - setting should be taken from the user-prefs
- * but the userprefs version may not have correct flags set
- * (i.e. will result in blank box when enabled)
- */
+ /* The auto-keying setting should be taken from the user-preferences
+ * but the user-preferences version may not have correct flags set
+ * (i.e. will result in blank box when enabled). */
ts->autokey_mode = U.autokey_mode;
if (ts->autokey_mode == 0) {
ts->autokey_mode = 2; /* 'add/replace' but not on */
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index 3338d2f658c..064d7977c68 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -569,8 +569,8 @@ void blo_do_versions_userdef(UserDef *userdef)
}
if (!USER_VERSION_ATLEAST(257, 0)) {
- /* clear "AUTOKEY_FLAG_ONLYKEYINGSET" flag from userprefs,
- * so that it doesn't linger around from old configs like a ghost */
+ /* Clear #AUTOKEY_FLAG_ONLYKEYINGSET flag from user-preferences,
+ * so that it doesn't linger around from old configurations like a ghost. */
userdef->autokey_flag &= ~AUTOKEY_FLAG_ONLYKEYINGSET;
}
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 03e817c467d..63b7fbc14a7 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -89,9 +89,9 @@ void immDrawPixelsTexScaledFullSize(const IMMDrawPixelsTexState *state,
static const float white[4] = {1.0f, 1.0f, 1.0f, 1.0f};
const float draw_width = img_w * scaleX * xzoom;
const float draw_height = img_h * scaleY * yzoom;
- /* Downscaling with regular bilinear interpolation (i.e. #GL_LINEAR) doesn't give good filtering
- * results. Mipmaps can be used to get better results (i.e. #GL_LINEAR_MIPMAP_LINEAR), so always
- * use mipmaps when filtering. */
+ /* Down-scaling with regular bi-linear interpolation (i.e. #GL_LINEAR) doesn't give good
+ * filtering results. Mipmaps can be used to get better results (i.e. #GL_LINEAR_MIPMAP_LINEAR),
+ * so always use mipmaps when filtering. */
const bool use_mipmap = use_filter && ((draw_width < img_w) || (draw_height < img_h));
GPUTexture *tex = GPU_texture_create_2d("immDrawPixels", img_w, img_h, 1, gpu_format, NULL);
diff --git a/source/blender/gpu/intern/gpu_shader_create_info.cc b/source/blender/gpu/intern/gpu_shader_create_info.cc
index e4e5034026f..3d4f27d2278 100644
--- a/source/blender/gpu/intern/gpu_shader_create_info.cc
+++ b/source/blender/gpu/intern/gpu_shader_create_info.cc
@@ -20,7 +20,7 @@
/** \file
* \ingroup gpu
*
- * Descriptior type used to define shader structure, resources and interfaces.
+ * Descriptor type used to define shader structure, resources and interfaces.
*/
#include "BLI_map.hh"
@@ -165,7 +165,7 @@ bool gpu_shader_create_info_compile_all()
return true;
}
-/* Runtime create infos are not registered in the dictionnary and cannot be searched. */
+/* Runtime create infos are not registered in the dictionary and cannot be searched. */
const GPUShaderCreateInfo *gpu_shader_create_info_get(const char *info_name)
{
ShaderCreateInfo *info = g_create_infos->lookup(info_name);
diff --git a/source/blender/gpu/intern/gpu_shader_create_info.hh b/source/blender/gpu/intern/gpu_shader_create_info.hh
index ced7f7039e7..b4bd58630d5 100644
--- a/source/blender/gpu/intern/gpu_shader_create_info.hh
+++ b/source/blender/gpu/intern/gpu_shader_create_info.hh
@@ -20,7 +20,7 @@
/** \file
* \ingroup gpu
*
- * Descriptior type used to define shader structure, resources and interfaces.
+ * Descriptor type used to define shader structure, resources and interfaces.
*
* Some rule of thumb:
* - Do not include anything else than this file in each info file.
@@ -214,9 +214,9 @@ struct StageInterfaceInfo {
struct ShaderCreateInfo {
/** Shader name for debugging. */
StringRefNull name_;
- /** True if the shader is static and can be precompiled at compile time. */
+ /** True if the shader is static and can be pre-compiled at compile time. */
bool do_static_compilation_ = false;
- /** If true, all additionaly linked create info will be merged into this one. */
+ /** If true, all additionally linked create info will be merged into this one. */
bool finalized_ = false;
/**
* Maximum length of all the resource names including each null terminator.
@@ -297,7 +297,7 @@ struct ShaderCreateInfo {
};
/**
* Resources are grouped by frequency of change.
- * Pass resources are meants to be valid for the whole pass.
+ * Pass resources are meant to be valid for the whole pass.
* Batch resources can be changed in a more granular manner (per object/material).
* Mis-usage will only produce suboptimal performance.
*/
diff --git a/source/blender/gpu/intern/gpu_shader_create_info_private.hh b/source/blender/gpu/intern/gpu_shader_create_info_private.hh
index 7010fa5e3a2..6d2878377ad 100644
--- a/source/blender/gpu/intern/gpu_shader_create_info_private.hh
+++ b/source/blender/gpu/intern/gpu_shader_create_info_private.hh
@@ -20,7 +20,7 @@
/** \file
* \ingroup gpu
*
- * Descriptior type used to define shader structure, resources and interfaces.
+ * Descriptor type used to define shader structure, resources and interfaces.
*
* Some rule of thumb:
* - Do not include anything else than this file in each descriptor file.
diff --git a/source/blender/gpu/intern/gpu_shader_dependency.cc b/source/blender/gpu/intern/gpu_shader_dependency.cc
index a866e9f1fda..2d56e1cec05 100644
--- a/source/blender/gpu/intern/gpu_shader_dependency.cc
+++ b/source/blender/gpu/intern/gpu_shader_dependency.cc
@@ -140,7 +140,7 @@ struct GPUSource {
};
}
- /* Returns the final string with all inlcudes done. */
+ /* Returns the final string with all includes done. */
void build(std::string &str, shader::BuiltinBits &out_builtins)
{
for (auto *dep : dependencies) {
diff --git a/source/blender/gpu/intern/gpu_shader_shared_utils.h b/source/blender/gpu/intern/gpu_shader_shared_utils.h
index 1097547e5ae..f061f0f968a 100644
--- a/source/blender/gpu/intern/gpu_shader_shared_utils.h
+++ b/source/blender/gpu/intern/gpu_shader_shared_utils.h
@@ -24,16 +24,16 @@
* We use the same vector and matrix types as Blender C++. Some math functions are defined to use
* the float version to match the GLSL syntax.
* This file can be used for C & C++ code and the syntax used should follow the same rules.
- * Some preprocessing is done by the GPU backend to make it GLSL compatible.
+ * Some preprocessing is done by the GPU back-end to make it GLSL compatible.
*
* IMPORTANT:
- * - Don't add trailing comma at the end of the enum. Our custom pre-processor will noy trim it
+ * - Don't add trailing comma at the end of the enum. Our custom pre-processor will now trim it
* for GLSL.
* - Always use `u` suffix for enum values. GLSL do not support implicit cast.
* - Define all values. This is in order to simplify custom pre-processor code.
* - Always use uint32_t as underlying type.
* - Use float suffix by default for float literals to avoid double promotion in C++.
- * - Pack one float or int after a vec3/ivec3 to fullfil alligment rules.
+ * - Pack one float or int after a vec3/ivec3 to fulfill alignment rules.
*
* NOTE: Due to alignment restriction and buggy drivers, do not try to use mat3 inside structs.
* NOTE: (UBO only) Do not use arrays of float. They are padded to arrays of vec4 and are not worth
@@ -81,7 +81,6 @@
# ifdef __cplusplus
# include "BLI_float4x4.hh"
-# include "BLI_float4x4.hh"
# else
typedef float float2[2];
typedef float float3[3];
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index d3175c445a9..0e2b64fbca4 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -1014,7 +1014,7 @@ static void rna_FKeyframe_points_add(ID *id, FCurve *fcu, Main *bmain, int tot)
fcu->totvert += tot;
while (tot--) {
- /* defaults, no userprefs gives predictable results for API */
+ /* Defaults, ignoring user-preference gives predictable results for API. */
bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
bezt->ipo = BEZT_IPO_BEZ;
bezt->h1 = bezt->h2 = HD_AUTO_ANIM;
diff --git a/source/blender/render/intern/texture_margin.cc b/source/blender/render/intern/texture_margin.cc
index 31aa16ac3f4..9ce5a0f9f01 100644
--- a/source/blender/render/intern/texture_margin.cc
+++ b/source/blender/render/intern/texture_margin.cc
@@ -121,8 +121,7 @@ class TextureMarginMap {
void rasterize_tri(float *v1, float *v2, float *v3, uint32_t value, char *mask)
{
/* NOTE: This is not thread safe, because the value to be written by the rasterizer is
- * a class member. If this is ever made multithreaded each therad needs to get it's own.
- */
+ * a class member. If this is ever made multi-threaded each thread needs to get it's own. */
value_to_store_ = value;
mask_ = mask;
zspan_scanconvert(
@@ -323,8 +322,7 @@ class TextureMarginMap {
/* Find which edge of the src_poly is closest to x,y. Look up it's adjacent UV-edge and polygon.
* Then return the location of the equivalent pixel in the other polygon.
* Returns true if a new pixel location was found, false if it wasn't, which can happen if the
- * margin pixel is on a corner, or the UV-edge doesnt have an adjacent polygon.
- */
+ * margin pixel is on a corner, or the UV-edge doesn't have an adjacent polygon. */
bool lookup_pixel(
float x, float y, int src_poly, float *r_destx, float *r_desty, int *r_other_poly)
{
@@ -386,7 +384,7 @@ class TextureMarginMap {
return false;
}
- /* Get the 'other' edge. I.E. the UV edge from the neighbour polygon. */
+ /* Get the 'other' edge. I.E. the UV edge from the neighbor polygon. */
int other_edge = loop_adjacency_map_[found_edge];
if (other_edge < 0) {
@@ -407,7 +405,7 @@ class TextureMarginMap {
float2 other_edgepoint1 = uv_to_xy(mloopuv_[other_edge]);
float2 other_edgepoint2 = uv_to_xy(mloopuv_[other_edge2]);
- /* Calculate the vector from the oder edges last point to it's first point. */
+ /* Calculate the vector from the order edges last point to it's first point. */
float2 other_ab = other_edgepoint1 - other_edgepoint2;
float2 other_reflect_point = other_edgepoint2 + (found_t * other_ab);
float2 perpendicular_other_ab;
@@ -486,9 +484,8 @@ static void generate_margin(ImBuf *ibuf,
TextureMarginMap map(ibuf->x, ibuf->y, mpoly, mloop, mloopuv, totpoly, totloop, totedge);
bool draw_new_mask = false;
- /* Now the map contains 3 sorts of values: 0xFFFFFFFF for empty pixels, 0x80000000 + polyindex
- * for margin pixels, just polyindex for poly pixels.
- */
+ /* Now the map contains 3 sorts of values: 0xFFFFFFFF for empty pixels, `0x80000000 + polyindex`
+ * for margin pixels, just `polyindex` for poly pixels. */
if (mask) {
mask = (char *)MEM_dupallocN(mask);
}
@@ -525,8 +522,7 @@ static void generate_margin(ImBuf *ibuf,
map.grow_dijkstra(margin);
/* Looking further than 3 polygons away leads to so much cumulative rounding
- * that it isn't worth it. So hardcode it to 3.
- */
+ * that it isn't worth it. So hard-code it to 3. */
map.lookup_pixels(ibuf, mask, 3);
/* Use the extend filter to fill in the missing pixels at the corners, not strictly correct, but