diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-02-05 08:23:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-02-05 08:23:34 +0300 |
commit | 17e1e2bfd8dfbd6f6fc42cc305e93393342020f7 (patch) | |
tree | 8a164422f7eb7d3aa9f7473c19c80da535c29a05 /source/blender | |
parent | b62b923f544fa1df0aecd56f3568dd5185601306 (diff) |
Cleanup: correct spelling in comments
Diffstat (limited to 'source/blender')
341 files changed, 686 insertions, 674 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index aed97d4708f..d6b6ffd425e 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -59,7 +59,7 @@ typedef struct Global { short moving; - /** To indicate render is busy, prevent renderwindow events etc. */ + /** To indicate render is busy, prevent render-window events etc. */ bool is_rendering; /** diff --git a/source/blender/blenkernel/BKE_gpencil_modifier.h b/source/blender/blenkernel/BKE_gpencil_modifier.h index 61ccf3d60f6..c066c161f46 100644 --- a/source/blender/blenkernel/BKE_gpencil_modifier.h +++ b/source/blender/blenkernel/BKE_gpencil_modifier.h @@ -248,7 +248,7 @@ typedef struct GpencilModifierTypeInfo { #define GPENCIL_MODIFIER_TYPE_PANEL_PREFIX "MOD_PT_gpencil_" -/* Initialize modifier's global data (type info and some common global storages). */ +/* Initialize modifier's global data (type info and some common global storage). */ void BKE_gpencil_modifier_init(void); void BKE_gpencil_modifierType_panel_id(GpencilModifierType type, char *r_idname); diff --git a/source/blender/blenkernel/BKE_keyconfig.h b/source/blender/blenkernel/BKE_keyconfig.h index ab42d5742ea..1cacbf61976 100644 --- a/source/blender/blenkernel/BKE_keyconfig.h +++ b/source/blender/blenkernel/BKE_keyconfig.h @@ -43,10 +43,10 @@ typedef struct wmKeyConfigPrefType_Runtime { typedef struct wmKeyConfigPrefType_Runtime wmKeyConfigPrefType_Runtime; #endif -/* KeyConfig preferenes (UserDef). */ +/* KeyConfig preferences (UserDef). */ struct wmKeyConfigPref *BKE_keyconfig_pref_ensure(struct UserDef *userdef, const char *kc_idname); -/* KeyConfig preferenes (RNA). */ +/* KeyConfig preferences (RNA). */ struct wmKeyConfigPrefType_Runtime *BKE_keyconfig_pref_type_find(const char *idname, bool quiet); void BKE_keyconfig_pref_type_add(struct wmKeyConfigPrefType_Runtime *kpt_rt); void BKE_keyconfig_pref_type_remove(const struct wmKeyConfigPrefType_Runtime *kpt_rt); diff --git a/source/blender/blenkernel/BKE_lib_id.h b/source/blender/blenkernel/BKE_lib_id.h index cfd1db1317c..5a8d36b94ec 100644 --- a/source/blender/blenkernel/BKE_lib_id.h +++ b/source/blender/blenkernel/BKE_lib_id.h @@ -219,7 +219,7 @@ void id_fake_user_set(struct ID *id); void id_fake_user_clear(struct ID *id); void BKE_id_clear_newpoin(struct ID *id); -/** Flags to control make local code behaviour. */ +/** Flags to control make local code behavior. */ enum { /** Making that ID local is part of making local a whole library. */ LIB_ID_MAKELOCAL_FULL_LIBRARY = 1 << 0, diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index 685a8ed98e2..32b74d161b2 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -399,7 +399,7 @@ typedef struct ModifierTypeInfo { /* Used to find a modifier's panel type. */ #define MODIFIER_TYPE_PANEL_PREFIX "MOD_PT_" -/* Initialize modifier's global data (type info and some common global storages). */ +/* Initialize modifier's global data (type info and some common global storage). */ void BKE_modifier_init(void); const ModifierTypeInfo *BKE_modifier_get_info(ModifierType type); diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 0a35658464a..4369f332c35 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -365,7 +365,7 @@ typedef struct SculptBoundaryEditInfo { /* How many steps were needed to reach this vertex from the boundary. */ int num_propagation_steps; - /* Stregth that is used to deform this vertex. */ + /* Strength that is used to deform this vertex. */ float strength_factor; } SculptBoundaryEditInfo; @@ -530,7 +530,7 @@ typedef struct SculptSession { float gesture_initial_normal[3]; bool gesture_initial_hit; - /* TODO(jbakker): Replace rv3d adn v3d with ViewContext */ + /* TODO(jbakker): Replace rv3d and v3d with ViewContext */ struct RegionView3D *rv3d; struct View3D *v3d; struct Scene *scene; diff --git a/source/blender/blenkernel/BKE_shader_fx.h b/source/blender/blenkernel/BKE_shader_fx.h index 23bd62c70bc..e385f77565b 100644 --- a/source/blender/blenkernel/BKE_shader_fx.h +++ b/source/blender/blenkernel/BKE_shader_fx.h @@ -149,7 +149,7 @@ typedef struct ShaderFxTypeInfo { #define SHADERFX_TYPE_PANEL_PREFIX "FX_PT_" -/* Initialize global data (type info and some common global storages). */ +/* Initialize global data (type info and some common global storage). */ void BKE_shaderfx_init(void); void BKE_shaderfxType_panel_id(ShaderFxType type, char *r_idname); diff --git a/source/blender/blenkernel/BKE_softbody.h b/source/blender/blenkernel/BKE_softbody.h index d1cffd26432..4f8b21141b6 100644 --- a/source/blender/blenkernel/BKE_softbody.h +++ b/source/blender/blenkernel/BKE_softbody.h @@ -49,7 +49,7 @@ typedef struct BodyPoint { /* allocates and initializes general main data */ extern struct SoftBody *sbNew(struct Scene *scene); -/* frees internal data and softbody itself */ +/* frees internal data and soft-body itself */ extern void sbFree(struct Object *ob); /* frees simulation data to reset simulation */ @@ -66,7 +66,7 @@ extern void sbObjectStep(struct Depsgraph *depsgraph, /* makes totally fresh start situation, resets time */ extern void sbObjectToSoftbody(struct Object *ob); -/* links the softbody module to a 'test for Interrupt' function */ +/* links the soft-body module to a 'test for Interrupt' function */ /* pass NULL to unlink again */ extern void sbSetInterruptCallBack(int (*f)(void)); diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c index 8c666597276..8f74b8ff054 100644 --- a/source/blender/blenkernel/intern/armature_update.c +++ b/source/blender/blenkernel/intern/armature_update.c @@ -428,8 +428,8 @@ static void splineik_evaluate_bone( if (fabsf(scaleFac) != 0.0f) { scale = 1.0f / fabsf(scaleFac); - /* we need to clamp this within sensible values */ - /* NOTE: these should be fine for now, but should get sanitised in future */ + /* We need to clamp this within sensible values. */ + /* NOTE: these should be fine for now, but should get sanitized in future. */ CLAMP(scale, 0.0001f, 100000.0f); } else { @@ -483,7 +483,7 @@ static void splineik_evaluate_bone( final_scale = 1.0f; } - /* apply the scaling (assuming normalised scale) */ + /* Apply the scaling (assuming normalized scale). */ mul_v3_fl(poseMat[0], final_scale); mul_v3_fl(poseMat[2], final_scale); break; diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 31860bbe0b4..4a25b0e9d98 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -3419,7 +3419,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, break; } - /* Set output format, png in case exr isn't supported */ + /* Set output format, PNG in case EXR isn't supported. */ #ifdef WITH_OPENEXR if (format == R_IMF_IMTYPE_OPENEXR) { /* OpenEXR 32-bit float */ ibuf->ftype = IMB_FTYPE_OPENEXR; diff --git a/source/blender/blenkernel/intern/multires_unsubdivide.c b/source/blender/blenkernel/intern/multires_unsubdivide.c index e3d670f7c39..02b9bb852d6 100644 --- a/source/blender/blenkernel/intern/multires_unsubdivide.c +++ b/source/blender/blenkernel/intern/multires_unsubdivide.c @@ -201,8 +201,8 @@ static void unsubdivide_face_center_vertex_tag(BMesh *bm, BMVert *initial_vertex /* Repeat a similar operation for all vertices in the queue. */ /* In this case, add to the queue the vertices connected by 2 steps using the diagonals in any - * direction. If a solution exists and intial_vertex was a pole, this is guaranteed that will tag - * all the (0,0) vertices of the grids, and nothing else. */ + * direction. If a solution exists and `initial_vertex` was a pole, this is guaranteed that will + * tag all the (0,0) vertices of the grids, and nothing else. */ /* If it was not a pole, it may or may not find a solution, even if the solution exists. */ while (!BLI_gsqueue_is_empty(queue)) { BMVert *from_v; diff --git a/source/blender/blenkernel/tracking_private.h b/source/blender/blenkernel/tracking_private.h index c8e7fea6601..35c5221efa3 100644 --- a/source/blender/blenkernel/tracking_private.h +++ b/source/blender/blenkernel/tracking_private.h @@ -125,7 +125,7 @@ float *tracking_track_get_mask_for_region(int frame_width, const float region_max[2], MovieTrackingTrack *track); -/*********************** Frame accessr *************************/ +/*********************** Frame Accessor *************************/ struct libmv_FrameAccessor; diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h index 9f144a0ddaa..df80e720363 100644 --- a/source/blender/blenlib/BLI_fileops.h +++ b/source/blender/blenlib/BLI_fileops.h @@ -88,10 +88,10 @@ typedef enum eFileAttributes { FILE_ATTR_TEMPORARY = 1 << 7, /* Used for temporary storage. */ FILE_ATTR_SPARSE_FILE = 1 << 8, /* Sparse File. */ FILE_ATTR_OFFLINE = 1 << 9, /* Data is not immediately available. */ - FILE_ATTR_ALIAS = 1 << 10, /* Mac Alias or Windows Lnk. File-based redirection. */ - FILE_ATTR_REPARSE_POINT = 1 << 11, /* File has associated reparse point. */ + FILE_ATTR_ALIAS = 1 << 10, /* Mac Alias or Windows LNK. File-based redirection. */ + FILE_ATTR_REPARSE_POINT = 1 << 11, /* File has associated re-parse point. */ FILE_ATTR_SYMLINK = 1 << 12, /* Reference to another file. */ - FILE_ATTR_JUNCTION_POINT = 1 << 13, /* Folder Symlink. */ + FILE_ATTR_JUNCTION_POINT = 1 << 13, /* Folder Symbolic-link. */ FILE_ATTR_MOUNT_POINT = 1 << 14, /* Volume mounted as a folder. */ FILE_ATTR_HARDLINK = 1 << 15, /* Duplicated directory entry. */ } eFileAttributes; diff --git a/source/blender/blenlib/BLI_math_rotation.h b/source/blender/blenlib/BLI_math_rotation.h index f45a4d6fdef..fe995b2e46e 100644 --- a/source/blender/blenlib/BLI_math_rotation.h +++ b/source/blender/blenlib/BLI_math_rotation.h @@ -177,7 +177,7 @@ typedef enum eEulerRotationOrders { EULER_ORDER_YZX, EULER_ORDER_ZXY, EULER_ORDER_ZYX, - /* there are 6 more entries with dulpicate entries included */ + /* There are 6 more entries with duplicate entries included. */ } eEulerRotationOrders; void eulO_to_quat(float quat[4], const float eul[3], const short order); diff --git a/source/blender/blenlib/BLI_mesh_intersect.hh b/source/blender/blenlib/BLI_mesh_intersect.hh index ddda3edf2ff..a7996939bb1 100644 --- a/source/blender/blenlib/BLI_mesh_intersect.hh +++ b/source/blender/blenlib/BLI_mesh_intersect.hh @@ -95,7 +95,7 @@ struct Plane { /* Test equality on the exact fields. */ bool operator==(const Plane &other) const; - /* Hash onthe exact fields. */ + /* Hash on the exact fields. */ uint64_t hash() const; void make_canonical(); @@ -144,7 +144,7 @@ struct Face : NonCopyable { /* Test equality of verts, in same positions. */ bool operator==(const Face &other) const; - /* Test equaliy faces allowing cyclic shifts. */ + /* Test equality faces allowing cyclic shifts. */ bool cyclic_equal(const Face &other) const; FacePos next_pos(FacePos p) const diff --git a/source/blender/blenlib/BLI_sys_types.h b/source/blender/blenlib/BLI_sys_types.h index ff1f6af9573..2740e3740f2 100644 --- a/source/blender/blenlib/BLI_sys_types.h +++ b/source/blender/blenlib/BLI_sys_types.h @@ -40,7 +40,7 @@ extern "C" { #if defined(__linux__) || defined(__GNU__) || defined(__NetBSD__) || defined(__OpenBSD__) || \ defined(__FreeBSD_kernel__) || defined(__HAIKU__) -/* Linux-i386, Linux-Alpha, Linux-ppc */ +/* Linux-i386, Linux-Alpha, Linux-PPC */ # include <stdint.h> /* XXX */ diff --git a/source/blender/blenlib/BLI_system.h b/source/blender/blenlib/BLI_system.h index 8dd0706e1e2..0d5b2e6e2df 100644 --- a/source/blender/blenlib/BLI_system.h +++ b/source/blender/blenlib/BLI_system.h @@ -49,7 +49,7 @@ void BLI_hostname_get(char *buffer, size_t bufsize); size_t BLI_system_memory_max_in_megabytes(void); int BLI_system_memory_max_in_megabytes_int(void); -/* getpid */ +/* For `getpid`. */ #ifdef WIN32 # define BLI_SYSTEM_PID_H <process.h> diff --git a/source/blender/blenlib/BLI_voronoi_2d.h b/source/blender/blenlib/BLI_voronoi_2d.h index 92c7d367b48..0e27229352f 100644 --- a/source/blender/blenlib/BLI_voronoi_2d.h +++ b/source/blender/blenlib/BLI_voronoi_2d.h @@ -50,7 +50,7 @@ typedef struct VoronoiEdge { /* point on Voronoi place on the right side of edge */ float right[2]; - /* directional coeffitients satisfying equation y = f * x + g (edge lies on this line) */ + /* Directional coefficients satisfying equation `y = f * x + g` (edge lies on this line). */ float f, g; /* some edges consist of two parts, diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h index dc4d6d8fce4..f771d26baab 100644 --- a/source/blender/blenlib/BLI_winstuff.h +++ b/source/blender/blenlib/BLI_winstuff.h @@ -64,7 +64,7 @@ extern "C" { # define S_ISDIR(x) (((x)&_S_IFDIR) == _S_IFDIR) #endif -/* defines for using ISO C++ conformant names */ +/* Defines for using ISO C++ conferment names. */ #if !defined(_MSC_VER) || _MSC_VER < 1900 # define snprintf _snprintf #endif diff --git a/source/blender/blenlib/intern/BLI_filelist.c b/source/blender/blenlib/intern/BLI_filelist.c index fe3ec368379..cc01693422c 100644 --- a/source/blender/blenlib/intern/BLI_filelist.c +++ b/source/blender/blenlib/intern/BLI_filelist.c @@ -369,7 +369,7 @@ void BLI_filelist_entry_datetime_to_string(const struct stat *st, int yesterday_yday = 0; if (r_is_today || r_is_yesterday) { - /* Localtime() has only one buffer so need to get data out before called again. */ + /* `localtime()` has only one buffer so need to get data out before called again. */ const time_t ts_now = time(NULL); struct tm *today = localtime(&ts_now); diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 0f90ad3a490..e1e71b02615 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -94,7 +94,7 @@ struct BVHTree { BVHNode *nodearray; /* pre-alloc branch nodes */ BVHNode **nodechild; /* pre-alloc children for nodes */ float *nodebv; /* pre-alloc bounding-volumes for nodes */ - float epsilon; /* epslion is used for inflation of the k-dop */ + float epsilon; /* Epsilon is used for inflation of the K-DOP. */ int totleaf; /* leafs */ int totbranch; axis_t start_axis, stop_axis; /* bvhtree_kdop_axes array indices according to axis */ @@ -365,7 +365,7 @@ static void create_kdop_hull( int k; axis_t axis_iter; - /* don't init boudings for the moving case */ + /* Don't initialize bounds for the moving case */ if (!moving) { node_minmax_init(tree, node); } @@ -573,9 +573,9 @@ typedef struct BVHBuildHelper { int tree_type; int totleafs; - /** Min number of leafs that are archievable from a node at depth N */ + /** Min number of leafs that are achievable from a node at depth `N`. */ int leafs_per_child[32]; - /** Number of nodes at depth N (tree_type^N) */ + /** Number of nodes at depth `N (tree_type^N)`. */ int branches_on_level[32]; /** Number of leafs that are placed on the level that is not 100% filled */ diff --git a/source/blender/blenlib/intern/array_store.c b/source/blender/blenlib/intern/array_store.c index 847cb42186a..08164e75009 100644 --- a/source/blender/blenlib/intern/array_store.c +++ b/source/blender/blenlib/intern/array_store.c @@ -533,7 +533,7 @@ static void bchunk_list_calc_trim_len(const BArrayInfo *info, data_trim_len = data_trim_len - data_last_chunk_len; if (data_last_chunk_len) { if (data_last_chunk_len < info->chunk_byte_size_min) { - /* may be zero and thats OK */ + /* May be zero and that's OK. */ data_trim_len -= info->chunk_byte_size; data_last_chunk_len += info->chunk_byte_size; } diff --git a/source/blender/blenlib/intern/boxpack_2d.c b/source/blender/blenlib/intern/boxpack_2d.c index 3d010011a79..84b3f728884 100644 --- a/source/blender/blenlib/intern/boxpack_2d.c +++ b/source/blender/blenlib/intern/boxpack_2d.c @@ -385,7 +385,7 @@ void BLI_box_pack_2d(BoxPack *boxarray, const uint len, float *r_tot_x, float *r box++; /* next box, needed for the loop below */ /* ...done packing the first box */ - /* Main boxpacking loop */ + /* Main box-packing loop */ for (box_index = 1; box_index < len; box_index++, box++) { /* These floats are used for sorting re-sorting */ diff --git a/source/blender/blenlib/intern/delaunay_2d.cc b/source/blender/blenlib/intern/delaunay_2d.cc index f0b65a55816..c9315dab456 100644 --- a/source/blender/blenlib/intern/delaunay_2d.cc +++ b/source/blender/blenlib/intern/delaunay_2d.cc @@ -754,7 +754,7 @@ template<> CDTVert<double>::CDTVert(const vec2<double> &pt) { this->co.exact = pt; this->co.approx = pt; - this->co.abs_approx = pt; /* Not used, so does't matter. */ + this->co.abs_approx = pt; /* Not used, so doesn't matter. */ this->input_ids = nullptr; this->symedge = nullptr; this->index = -1; @@ -1411,12 +1411,12 @@ void dc_tri(CDTArrangement<T> *cdt, /* Guibas-Stolfi Divide-and_Conquer algorithm. */ template<typename T> void dc_triangulate(CDTArrangement<T> *cdt, Array<SiteInfo<T>> &sites) { - /* Compress sites in place to eliminted verts that merge to others. */ + /* Compress sites in place to eliminated verts that merge to others. */ int i = 0; int j = 0; int nsites = sites.size(); while (j < nsites) { - /* Invariante: sites[0..i-1] have non-merged verts from 0..(j-1) in them. */ + /* Invariant: `sites[0..i-1]` have non-merged verts from `0..(j-1)` in them. */ sites[i] = sites[j++]; if (sites[i].v->merge_to_index < 0) { i++; diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c index 301d9dc2296..e755a8e75b5 100644 --- a/source/blender/blenlib/intern/freetypefont.c +++ b/source/blender/blenlib/intern/freetypefont.c @@ -307,7 +307,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile *pf) /* Extract the first 256 character from TTF */ lcode = charcode = FT_Get_First_Char(face, &glyph_index); - /* No charmap found from the ttf so we need to figure it out */ + /* No `charmap` found from the TTF so we need to figure it out. */ if (glyph_index == 0) { FT_CharMap found = NULL; FT_CharMap charmap; diff --git a/source/blender/blenlib/intern/gsqueue.c b/source/blender/blenlib/intern/gsqueue.c index 118d19418d4..ae34074e804 100644 --- a/source/blender/blenlib/intern/gsqueue.c +++ b/source/blender/blenlib/intern/gsqueue.c @@ -41,7 +41,7 @@ struct QueueChunk { struct _GSQueue { struct QueueChunk *chunk_first; /* first active chunk to pop from */ - struct QueueChunk *chunk_last; /* flast active chunk to push onto */ + struct QueueChunk *chunk_last; /* last active chunk to push onto */ struct QueueChunk *chunk_free; /* free chunks to reuse */ size_t chunk_first_index; /* index into 'chunk_first' */ size_t chunk_last_index; /* index into 'chunk_last' */ diff --git a/source/blender/blenlib/intern/jitter_2d.c b/source/blender/blenlib/intern/jitter_2d.c index c92aeddb27d..068cb3d2f70 100644 --- a/source/blender/blenlib/intern/jitter_2d.c +++ b/source/blender/blenlib/intern/jitter_2d.c @@ -179,7 +179,7 @@ void BLI_jitter_init(float (*jitarr)[2], int num) MEM_freeN(jit2); - /* finally, move jittertab to be centered around (0, 0) */ + /* Finally, move jitter to be centered around (0, 0). */ for (i = 0; i < num; i++) { jitarr[i][0] -= 0.5f; jitarr[i][1] -= 0.5f; diff --git a/source/blender/blenlib/intern/kdtree_impl.h b/source/blender/blenlib/intern/kdtree_impl.h index 26b2228cdbc..c92dc2e95a3 100644 --- a/source/blender/blenlib/intern/kdtree_impl.h +++ b/source/blender/blenlib/intern/kdtree_impl.h @@ -158,7 +158,7 @@ static uint kdtree_balance(KDTreeNode *nodes, uint nodes_len, uint axis, const u return 0 + ofs; } - /* quicksort style sorting around median */ + /* Quick-sort style sorting around median. */ left = 0; right = nodes_len - 1; median = nodes_len / 2; diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index b332a0b2cb9..28aa81e5858 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -379,7 +379,7 @@ MINLINE float fractf(float a) return a - floorf(a); } -/* Adapted from godotengine math_funcs.h. */ +/* Adapted from godot-engine math_funcs.h. */ MINLINE float wrapf(float value, float max, float min) { float range = max - min; @@ -716,7 +716,7 @@ MALWAYS_INLINE __m128 _bli_math_improve_5throot_solution(const __m128 old_result __m128 approx2 = _mm_mul_ps(old_result, old_result); __m128 approx4 = _mm_mul_ps(approx2, approx2); __m128 t = _mm_div_ps(x, approx4); - __m128 summ = _mm_add_ps(_mm_mul_ps(_mm_set1_ps(4.0f), old_result), t); /* fma */ + __m128 summ = _mm_add_ps(_mm_mul_ps(_mm_set1_ps(4.0f), old_result), t); /* FMA. */ return _mm_mul_ps(summ, _mm_set1_ps(1.0f / 5.0f)); } diff --git a/source/blender/blenlib/intern/math_color_inline.c b/source/blender/blenlib/intern/math_color_inline.c index a1caf2fe02d..26828cb8717 100644 --- a/source/blender/blenlib/intern/math_color_inline.c +++ b/source/blender/blenlib/intern/math_color_inline.c @@ -41,7 +41,7 @@ MALWAYS_INLINE __m128 srgb_to_linearrgb_v4_simd(const __m128 c) __m128 cmp = _mm_cmplt_ps(c, _mm_set1_ps(0.04045f)); __m128 lt = _mm_max_ps(_mm_mul_ps(c, _mm_set1_ps(1.0f / 12.92f)), _mm_set1_ps(0.0f)); __m128 gtebase = _mm_mul_ps(_mm_add_ps(c, _mm_set1_ps(0.055f)), - _mm_set1_ps(1.0f / 1.055f)); /* fma */ + _mm_set1_ps(1.0f / 1.055f)); /* FMA. */ __m128 gte = _bli_math_fastpow24(gtebase); return _bli_math_blend_sse(cmp, lt, gte); } diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 0873dece864..5d78bb0b901 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -5233,7 +5233,7 @@ void map_to_sphere(float *r_u, float *r_v, const float x, const float y, const f len = sqrtf(x * x + y * y + z * z); if (len > 0.0f) { if (UNLIKELY(x == 0.0f && y == 0.0f)) { - *r_u = 0.0f; /* othwise domain error */ + *r_u = 0.0f; /* Otherwise domain error. */ } else { *r_u = (1.0f - atan2f(x, y) / (float)M_PI) / 2.0f; @@ -5836,7 +5836,7 @@ bool form_factor_visible_quad(const float p[3], return true; } -/* altivec optimization, this works, but is unused */ +/* `AltiVec` optimization, this works, but is unused. */ #if 0 # include <Accelerate/Accelerate.h> @@ -6125,7 +6125,7 @@ bool is_quad_convex_v3(const float v1[3], const float v2[3], const float v3[3], bool is_quad_convex_v2(const float v1[2], const float v2[2], const float v3[2], const float v4[2]) { - /* linetests, the 2 diagonals have to instersect to be convex */ + /* Line-tests, the 2 diagonals have to intersect to be convex. */ return (isect_seg_seg_v2(v1, v3, v2, v4) > 0); } @@ -6233,7 +6233,7 @@ float cubic_tangent_factor_circle_v3(const float tan_l[3], const float tan_r[3]) return (1.0f / 3.0f) * 0.75f; } if (tan_dot < -1.0f + eps) { - /* parallele tangents (half-circle) */ + /* Parallel tangents (half-circle). */ return (1.0f / 2.0f); } diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index f0d8bea52b9..57fe99ce019 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -594,7 +594,7 @@ float quat_split_swing_and_twist(const float q_in[4], int axis, float r_swing[4] BLI_assert(fabsf(r_swing[axis + 1]) < BLI_ASSERT_UNIT_EPSILON); } - /* Output twist last just in case q ovelaps r_twist. */ + /* Output twist last just in case q overlaps r_twist. */ if (r_twist) { r_twist[0] = cos_t; zero_v3(r_twist + 1); diff --git a/source/blender/blenlib/intern/math_vec.cc b/source/blender/blenlib/intern/math_vec.cc index 84fa6c69d17..1d138d0b0f4 100644 --- a/source/blender/blenlib/intern/math_vec.cc +++ b/source/blender/blenlib/intern/math_vec.cc @@ -104,7 +104,7 @@ mpq2::isect_result mpq2::isect_seg_seg(const mpq2 &v1, } else { ans.lambda = ((v1[1] - v3[1]) * (v4[0] - v3[0]) - (v1[0] - v3[0]) * (v4[1] - v3[1])) / div; - /* Avoid dividing mu by div: it is expensive in multiprecision. */ + /* Avoid dividing mu by div: it is expensive in multi-precision. */ mpq_class mudiv = ((v1[1] - v3[1]) * (v2[0] - v1[0]) - (v1[0] - v3[0]) * (v2[1] - v1[1])); if (ans.lambda >= 0 && ans.lambda <= 1 && ((div > 0 && mudiv >= 0 && mudiv <= div) || (div < 0 && mudiv <= 0 && mudiv >= div))) { diff --git a/source/blender/blenlib/intern/mesh_intersect.cc b/source/blender/blenlib/intern/mesh_intersect.cc index 85a6ab42013..04f86734b8a 100644 --- a/source/blender/blenlib/intern/mesh_intersect.cc +++ b/source/blender/blenlib/intern/mesh_intersect.cc @@ -1385,7 +1385,7 @@ static ITT_value itt_canon2(const mpq3 &p1, return ITT_value(ISEGMENT, intersect_1, intersect_2); } -/* Helper function for intersect_tri_tri. Args have been canonicalized for triangle 1. */ +/* Helper function for intersect_tri_tri. Arguments have been canonicalized for triangle 1. */ static ITT_value itt_canon1(const mpq3 &p1, const mpq3 &q1, @@ -2026,7 +2026,7 @@ class TriOverlaps { if (dbg_level > 0) { std::cout << "TriOverlaps construction\n"; } - /* Tree type is 8 => octtree; axis = 6 => using XYZ axes only. */ + /* Tree type is 8 => octree; axis = 6 => using XYZ axes only. */ tree_ = BLI_bvhtree_new(tm.face_size(), FLT_EPSILON, 8, 6); /* In the common case of a binary boolean and no self intersection in * each shape, we will use two trees and simple bounding box overlap. */ @@ -2378,7 +2378,7 @@ static CDT_data calc_cluster_subdivided(const CoplanarClusterInfo &clinfo, } } } - /* Use CDT to subdivide the cluster triangles and the points and segs in itts. */ + /* Use CDT to subdivide the cluster triangles and the points and segments in itts. */ CDT_data cd_data = prepare_cdt_input_for_cluster(tm, clinfo, c, itts); do_cdt(cd_data); return cd_data; diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 7cd7991b8d8..39f5abc4cd8 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -459,7 +459,7 @@ static wchar_t *next_slash(wchar_t *path) return slash; } -/* adds a slash if the unc path points sto a share */ +/* Adds a slash if the UNC path points to a share. */ static void BLI_path_add_slash_to_share(wchar_t *uncpath) { wchar_t *slash_after_server = next_slash(uncpath + 2); @@ -1279,7 +1279,7 @@ void BLI_setenv(const char *env, const char *val) uputenv(env, val); #else - /* linux/osx/bsd */ + /* Linux/macOS/BSD */ if (val) { setenv(env, val, 1); } diff --git a/source/blender/blenlib/intern/polyfill_2d.c b/source/blender/blenlib/intern/polyfill_2d.c index fe9fa514e08..dadef979b09 100644 --- a/source/blender/blenlib/intern/polyfill_2d.c +++ b/source/blender/blenlib/intern/polyfill_2d.c @@ -253,7 +253,7 @@ static uint kdtree2d_balance_recursive( return 0 + ofs; } - /* quicksort style sorting around median */ + /* Quick-sort style sorting around median. */ neg = 0; pos = totnode - 1; median = totnode / 2; @@ -284,7 +284,7 @@ static uint kdtree2d_balance_recursive( } } - /* set node and sort subnodes */ + /* Set node and sort sub-nodes. */ node = &nodes[median]; node->axis = axis; axis = !axis; diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index 2a520516418..8c9a229860e 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -526,10 +526,10 @@ static unsigned int scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int fl if (eve->poly_nr == nr) { if (eve->f != SF_VERT_ZERO_LEN) { verts++; - eve->f = SF_VERT_NEW; /* flag for connectedges later on */ + eve->f = SF_VERT_NEW; /* Flag for connect edges later on. */ sc->vert = eve; sc->edge_first = sc->edge_last = NULL; - /* Note, debug print only will work for curve polyfill, union is in use for mesh */ + /* Note, debug print only will work for curve poly-fill, union is in use for mesh. */ /* if (even->tmp.v == NULL) eve->tmp.u = verts; */ sc++; } @@ -609,7 +609,7 @@ static unsigned int scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int fl sc = scdata; for (a = 0; a < verts; a++) { /* printf("VERTEX %d index %d\n", a, sc->vert->tmp.u); */ - /* set connectflags */ + /* Set connect-flags. */ for (ed1 = sc->edge_first; ed1; ed1 = eed_next) { eed_next = ed1->next; if (ed1->v1->edge_tot == 1 || ed1->v2->edge_tot == 1) { diff --git a/source/blender/blenlib/intern/scanfill_utils.c b/source/blender/blenlib/intern/scanfill_utils.c index b49239547c2..ec0f8659395 100644 --- a/source/blender/blenlib/intern/scanfill_utils.c +++ b/source/blender/blenlib/intern/scanfill_utils.c @@ -244,7 +244,7 @@ static bool scanfill_preprocess_self_isect(ScanFillContext *sf_ctx, continue; } - /* maintain coorect terminating edge */ + /* Maintain correct terminating edge. */ if (pi->edge_last == eed) { pi->edge_last = NULL; } diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index d1e133318ba..bb00755e901 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -30,7 +30,7 @@ #include <sys/stat.h> #if defined(__NetBSD__) || defined(__DragonFly__) || defined(__HAIKU__) -/* Other modern unix os's should probably use this also */ +/* Other modern unix OS's should probably use this also. */ # include <sys/statvfs.h> # define USE_STATFS_STATVFS #endif @@ -113,7 +113,7 @@ double BLI_dir_free_space(const char *dir) char tmp[4]; tmp[0] = '\\'; - tmp[1] = 0; /* Just a failsafe */ + tmp[1] = 0; /* Just a fail-safe. */ if (ELEM(dir[0] == '/', '\\')) { tmp[0] = '\\'; tmp[1] = 0; diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c index a637a5f24e6..7aa5930b4ad 100644 --- a/source/blender/blenlib/intern/string_utf8.c +++ b/source/blender/blenlib/intern/string_utf8.c @@ -225,8 +225,7 @@ int BLI_utf8_invalid_strip(char *str, size_t length) return tot; } -/* compatible with BLI_strncpy, but esnure no partial utf8 chars */ - +/** Compatible with #BLI_strncpy, but ensure no partial UTF8 chars. */ #define BLI_STR_UTF8_CPY(dst, src, maxncpy) \ { \ size_t utf8_size; \ diff --git a/source/blender/blenlib/intern/system.c b/source/blender/blenlib/intern/system.c index 8e3d489fbb3..e32f310549c 100644 --- a/source/blender/blenlib/intern/system.c +++ b/source/blender/blenlib/intern/system.c @@ -71,7 +71,7 @@ int BLI_cpu_support_sse2(void) #endif } -/* Windows stackwalk lives in system_win32.c */ +/* Windows stack-walk lives in system_win32.c */ #if !defined(_MSC_VER) /** * Write a backtrace into a file for systems which support it. diff --git a/source/blender/blenlib/intern/threads.cc b/source/blender/blenlib/intern/threads.cc index b42c50803e0..35097013439 100644 --- a/source/blender/blenlib/intern/threads.cc +++ b/source/blender/blenlib/intern/threads.cc @@ -468,7 +468,7 @@ void BLI_spin_lock(SpinLock *spin) #elif defined(_MSC_VER) while (InterlockedExchangeAcquire(spin, 1)) { while (*spin) { - /* Spin-lock hint for processors with hyperthreading. */ + /* Spin-lock hint for processors with hyper-threading. */ YieldProcessor(); } } diff --git a/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc b/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc index 487afc095f9..d00e8bf55fd 100644 --- a/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc +++ b/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc @@ -1661,10 +1661,10 @@ void rand_delaunay_test(int test_kind, } } for (int i = 0; i < size; ++i) { - /* Horizontal edges: connect p(i,0) to p(i,size-1). */ + /* Horizontal edges: connect `p(i,0)` to `p(i,size-1)`. */ in.edge[i].first = i * size; in.edge[i].second = i * size + size - 1; - /* Vertical edges: conntect p(0,i) to p(size-1,i). */ + /* Vertical edges: connect `p(0,i)` to `p(size-1,i)`. */ in.edge[size + i].first = i; in.edge[size + i].second = (size - 1) * size + i; } @@ -1695,7 +1695,7 @@ void rand_delaunay_test(int test_kind, in.vert[ib][1] = T(sin(angle2)); in.vert[ic][0] = T((param * cos(angle3))); in.vert[ic][1] = T((param * sin(angle3))); - /* Put the coordinates in ccw order. */ + /* Put the coordinates in CCW order. */ in.face[i].append(ia); int orient = orient2d(in.vert[ia], in.vert[ib], in.vert[ic]); if (orient >= 0) { diff --git a/source/blender/blenlib/tests/BLI_polyfill_2d_test.cc b/source/blender/blenlib/tests/BLI_polyfill_2d_test.cc index 3c9d12c7178..6ef94bd62e3 100644 --- a/source/blender/blenlib/tests/BLI_polyfill_2d_test.cc +++ b/source/blender/blenlib/tests/BLI_polyfill_2d_test.cc @@ -291,7 +291,7 @@ static void test_polyfill_template_main(const char *id, (void)0 /* -------------------------------------------------------------------- */ -/* visualisation functions (not needed for testing) */ +/* visualization functions (not needed for testing) */ #ifdef USE_OBJ_PREVIEW static void polyfill_to_obj(const char *id, diff --git a/source/blender/blenloader/intern/blend_validate.c b/source/blender/blenloader/intern/blend_validate.c index ea3ecc21ecf..7261db5d3a6 100644 --- a/source/blender/blenloader/intern/blend_validate.c +++ b/source/blender/blenloader/intern/blend_validate.c @@ -23,7 +23,7 @@ * \note Does not *fix* anything, only reports found errors. */ -#include <string.h> /* for strrchr strncmp strstr */ +#include <string.h> /* for #strrchr #strncmp #strstr */ #include "BLI_utildefines.h" diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index a63d95c1823..89d4fe0b222 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1783,25 +1783,25 @@ BlendThumbnail *BLO_thumbnail_from_file(const char *filepath) /** \name Old/New Pointer Map * \{ */ -/* only direct databocks */ +/* Only direct data-blocks. */ static void *newdataadr(FileData *fd, const void *adr) { return oldnewmap_lookup_and_inc(fd->datamap, adr, true); } -/* only direct databocks */ +/* Only direct data-blocks. */ static void *newdataadr_no_us(FileData *fd, const void *adr) { return oldnewmap_lookup_and_inc(fd->datamap, adr, false); } -/* direct datablocks with global linking */ +/* Direct datablocks with global linking. */ void *blo_read_get_new_globaldata_address(FileData *fd, const void *adr) { return oldnewmap_lookup_and_inc(fd->globmap, adr, true); } -/* used to restore packed data after undo */ +/* Used to restore packed data after undo. */ static void *newpackedadr(FileData *fd, const void *adr) { if (fd->packedmap && adr) { diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index 767f24cf175..3b9ad64770d 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -339,7 +339,7 @@ static void do_versions_nodetree_multi_file_output_format_2_62_1(Scene *sce, bNo NodeImageMultiFile *nimf = node->storage; bNodeSocket *sock; - /* CMP_NODE_OUTPUT_MULTI_FILE has been redeclared as CMP_NODE_OUTPUT_FILE */ + /* CMP_NODE_OUTPUT_MULTI_FILE has been re-declared as CMP_NODE_OUTPUT_FILE */ node->type = CMP_NODE_OUTPUT_FILE; /* initialize the node-wide image format from render data, if available */ diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index df9268f0da1..e383d46858f 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -1190,7 +1190,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - /* Remove old deprecated region from filebrowsers */ + /* Remove old deprecated region from file-browsers. */ else if (sl->spacetype == SPACE_FILE) { LISTBASE_FOREACH (ARegion *, region, regionbase) { if (region->regiontype == RGN_TYPE_CHANNELS) { diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 7dc2c9e86ee..0e90d9b6045 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1390,7 +1390,7 @@ void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports)) } } - /* Cleanup deprecated flag from particlesettings data-blocks. */ + /* Cleanup deprecated flag from particle-settings data-blocks. */ for (ParticleSettings *part = bmain->particles.first; part; part = part->id.next) { part->draw &= ~PART_DRAW_EMITTER; } @@ -2110,7 +2110,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } for (Tex *tex = bmain->textures.first; tex; tex = tex->id.next) { - /* Removed envmap, pointdensity, voxeldata, ocean textures. */ + /* Removed environment map, point-density, voxel-data, ocean textures. */ if (ELEM(tex->type, 10, 14, 15, 16)) { tex->type = 0; } @@ -4303,7 +4303,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - /* Elatic deform brush */ + /* Elastic deform brush */ for (Brush *br = bmain->brushes.first; br; br = br->id.next) { if (br->ob_mode & OB_MODE_SCULPT && br->elastic_deform_volume_preservation == 0.0f) { br->elastic_deform_volume_preservation = 0.5f; diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index 2b630782806..f39883bc50d 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -658,7 +658,7 @@ static void do_versions_291_fcurve_handles_limit(FCurve *fcu) { uint i = 1; for (BezTriple *bezt = fcu->bezt; i < fcu->totvert; i++, bezt++) { - /* Only adjust bezier keyframes. */ + /* Only adjust bezier key-frames. */ if (bezt->ipo != BEZT_IPO_BEZ) { continue; } @@ -1097,10 +1097,10 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) } if (!MAIN_VERSION_ATLEAST(bmain, 291, 5)) { - /* Fix fcurves to allow for new bezier handles behaviour (T75881 and D8752). */ + /* Fix fcurves to allow for new bezier handles behavior (T75881 and D8752). */ for (bAction *act = bmain->actions.first; act; act = act->id.next) { for (FCurve *fcu = act->curves.first; fcu; fcu = fcu->next) { - /* Only need to fix Bezier curves with at least 2 keyframes. */ + /* Only need to fix Bezier curves with at least 2 key-frames. */ if (fcu->totvert < 2 || fcu->bezt == NULL) { continue; } diff --git a/source/blender/blenloader/intern/versioning_cycles.c b/source/blender/blenloader/intern/versioning_cycles.c index 631abe10ddc..816b90491aa 100644 --- a/source/blender/blenloader/intern/versioning_cycles.c +++ b/source/blender/blenloader/intern/versioning_cycles.c @@ -1420,7 +1420,7 @@ void do_versions_after_linking_cycles(Main *bmain) } if (!MAIN_VERSION_ATLEAST(bmain, 280, 64)) { - /* Unfiy Cycles and Eevee settings. */ + /* Unify Cycles and Eevee settings. */ Scene *scene = bmain->scenes.first; const char *engine = (scene) ? scene->r.engine : "CYCLES"; diff --git a/source/blender/blentranslation/intern/blt_lang.c b/source/blender/blentranslation/intern/blt_lang.c index 6de1d85a6a8..97a1a83792a 100644 --- a/source/blender/blentranslation/intern/blt_lang.c +++ b/source/blender/blentranslation/intern/blt_lang.c @@ -201,7 +201,7 @@ void BLT_lang_init(void) const char *const messagepath = BKE_appdir_folder_id(BLENDER_DATAFILES, "locale"); #endif - /* Make sure LANG is correct and wouldn't cause #std::rumtime_error. */ + /* Make sure LANG is correct and wouldn't cause #std::runtime_error. */ #ifndef _WIN32 /* TODO(sergey): This code only ensures LANG is set properly, so later when * Cycles will try to use file system API from boost there will be no runtime diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c index b913bdd12e4..cf907862120 100644 --- a/source/blender/bmesh/intern/bmesh_core.c +++ b/source/blender/bmesh/intern/bmesh_core.c @@ -2158,7 +2158,7 @@ BMFace *bmesh_kernel_join_face_kill_edge(BMesh *bm, BMFace *f1, BMFace *f2, BMEd l_f1->next->prev = l_f2->prev; l_f2->prev->next = l_f1->next; - /* if l_f1 was baseloop, make l_f1->next the base. */ + /* If `l_f1` was base-loop, make `l_f1->next` the base. */ if (BM_FACE_FIRST_LOOP(f1) == l_f1) { BM_FACE_FIRST_LOOP(f1) = l_f1->next; } diff --git a/source/blender/bmesh/intern/bmesh_edgeloop.c b/source/blender/bmesh/intern/bmesh_edgeloop.c index ec97ea51047..51a6ada6c42 100644 --- a/source/blender/bmesh/intern/bmesh_edgeloop.c +++ b/source/blender/bmesh/intern/bmesh_edgeloop.c @@ -450,7 +450,7 @@ void BM_mesh_edgeloops_calc_order(BMesh *UNUSED(bm), ListBase *eloops, const boo } mul_v3_fl(cent, 1.0f / (float)tot); - /* find far outest loop */ + /* Find the furthest out loop. */ { BMEdgeLoopStore *el_store_best = NULL; float len_best_sq = -1.0f; diff --git a/source/blender/bmesh/intern/bmesh_error.h b/source/blender/bmesh/intern/bmesh_error.h index 1837ad8dd71..fdec043ec48 100644 --- a/source/blender/bmesh/intern/bmesh_error.h +++ b/source/blender/bmesh/intern/bmesh_error.h @@ -33,7 +33,7 @@ void BMO_error_raise(BMesh *bm, BMOperator *owner, int errcode, const char *msg) int BMO_error_get(BMesh *bm, const char **msg, BMOperator **op); bool BMO_error_occurred(BMesh *bm); -/* same as geterror, only pops the error off the stack as well */ +/* Same as #BMO_error_get, only pops the error off the stack as well. */ int BMO_error_pop(BMesh *bm, const char **msg, BMOperator **op); void BMO_error_clear(BMesh *bm); diff --git a/source/blender/bmesh/intern/bmesh_iterators.c b/source/blender/bmesh/intern/bmesh_iterators.c index 44e3ef6e6ee..c81d4f9b67c 100644 --- a/source/blender/bmesh/intern/bmesh_iterators.c +++ b/source/blender/bmesh/intern/bmesh_iterators.c @@ -177,7 +177,7 @@ void *BM_iter_as_arrayN(BMesh *bm, BLI_assert(stack_array_size == 0 || (stack_array_size && stack_array)); - /* we can't rely on coun't being set */ + /* We can't rely on #BMIter.count being set. */ switch (itype) { case BM_VERTS_OF_MESH: iter.count = bm->totvert; diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index d8cdff1a4cc..a259d97379d 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -54,7 +54,8 @@ #include "DNA_modifier_types.h" -/* The formatting of these bmesh operators is parsed by +/** + * The formatting of these bmesh operators is parsed by * 'doc/python_api/rst_from_bmesh_opdefines.py' * for use in python docs, so reStructuredText may be used * rather than doxygen syntax. @@ -65,8 +66,7 @@ * """ * Region Extend. * - * paragraph1, Extends bleh bleh bleh. - * Bleh Bleh bleh. + * paragraph1, Extends on the title above. * * Another paragraph. * @@ -1268,7 +1268,7 @@ static BMOpDefine bmo_subdivide_edges_def = { {"quad_corner_type", BMO_OP_SLOT_INT, {(int)BMO_OP_SLOT_SUBTYPE_INT_ENUM}, bmo_enum_subdivide_edges_quad_corner_type}, /* quad corner type */ {"use_grid_fill", BMO_OP_SLOT_BOOL}, /* fill in fully-selected faces with a grid */ {"use_single_edge", BMO_OP_SLOT_BOOL}, /* tessellate the case of one edge selected in a quad or triangle */ - {"use_only_quads", BMO_OP_SLOT_BOOL}, /* only subdivide quads (for loopcut) */ + {"use_only_quads", BMO_OP_SLOT_BOOL}, /* Only subdivide quads (for loop-cut). */ {"use_sphere", BMO_OP_SLOT_BOOL}, /* for making new primitives only */ {"use_smooth_even", BMO_OP_SLOT_BOOL}, /* maintain even offset when smoothing */ {{'\0'}}, diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h index 2f7d91c78c4..2d9e244e54d 100644 --- a/source/blender/bmesh/intern/bmesh_operators.h +++ b/source/blender/bmesh/intern/bmesh_operators.h @@ -24,7 +24,7 @@ /*--------defines/enumerations for specific operators-------*/ -/*quad innervert values*/ +/* Quad `innervert` values. */ enum { SUBD_CORNER_INNERVERT, SUBD_CORNER_PATH, diff --git a/source/blender/bmesh/intern/bmesh_polygon_edgenet.c b/source/blender/bmesh/intern/bmesh_polygon_edgenet.c index 1d000b3b232..dcf9717465c 100644 --- a/source/blender/bmesh/intern/bmesh_polygon_edgenet.c +++ b/source/blender/bmesh/intern/bmesh_polygon_edgenet.c @@ -1566,7 +1566,7 @@ bool BM_face_split_edgenet_connect_islands(BMesh *bm, for (uint g_index = 1; g_index < group_arr_len; g_index++) { struct EdgeGroupIsland *g = group_arr[g_index]; - /* the range of verts this group uses in 'verts_arr' (not uncluding the last index) */ + /* The range of verts this group uses in 'verts_arr' (not including the last index). */ vert_range[0] = vert_range[1]; vert_range[1] += g->vert_len; diff --git a/source/blender/bmesh/intern/bmesh_structure.c b/source/blender/bmesh/intern/bmesh_structure.c index ef4a9c9de1c..cd230e76aca 100644 --- a/source/blender/bmesh/intern/bmesh_structure.c +++ b/source/blender/bmesh/intern/bmesh_structure.c @@ -537,7 +537,7 @@ int bmesh_radial_length(const BMLoop *l) do { if (UNLIKELY(!l_iter)) { - /* radial cycle is broken (not a circulat loop) */ + /* Radial cycle is broken (not a circular loop). */ BMESH_ASSERT(0); return 0; } diff --git a/source/blender/bmesh/intern/bmesh_walkers.h b/source/blender/bmesh/intern/bmesh_walkers.h index a973e12a4c7..22ee8809a19 100644 --- a/source/blender/bmesh/intern/bmesh_walkers.h +++ b/source/blender/bmesh/intern/bmesh_walkers.h @@ -122,7 +122,7 @@ enum { BMW_CONNECTED_VERTEX, /* end of array index enum vals */ - /* do not intitialze function pointers and struct size in BMW_init */ + /* Do not initialize function pointers and struct size in #BMW_init. */ BMW_CUSTOM, BMW_MAXWALKERS, }; diff --git a/source/blender/bmesh/operators/bmo_dissolve.c b/source/blender/bmesh/operators/bmo_dissolve.c index 8c2e820df63..da2603ad8cd 100644 --- a/source/blender/bmesh/operators/bmo_dissolve.c +++ b/source/blender/bmesh/operators/bmo_dissolve.c @@ -55,7 +55,7 @@ static bool UNUSED_FUNCTION(check_hole_in_region)(BMesh *bm, BMFace *f) BMLoop *l2, *l3; BMFace *f2; - /* checks if there are any unmarked boundary edges in the face regio */ + /* Checks if there are any unmarked boundary edges in the face region. */ BMW_init(®walker, bm, @@ -159,7 +159,7 @@ void bmo_dissolve_faces_exec(BMesh *bm, BMOperator *op) } BLI_array_clear(faces); - faces = NULL; /* forces different allocatio */ + faces = NULL; /* Forces different allocation. */ BMW_init(®walker, bm, diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c index 6e968d58631..c128872be07 100644 --- a/source/blender/bmesh/operators/bmo_dupe.c +++ b/source/blender/bmesh/operators/bmo_dupe.c @@ -109,7 +109,7 @@ static BMEdge *bmo_edge_copy(BMOperator *op, BMO_slot_map_elem_insert(op, slot_edgemap_out, e_src, e_dst); BMO_slot_map_elem_insert(op, slot_edgemap_out, e_dst, e_src); - /* add to new/old edge map if necassary */ + /* Add to new/old edge map if necessary. */ if (rlen < 2) { /* not sure what non-manifold cases of greater than three * radial should do. */ diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c index 009c4f1f2c5..3869a0678e2 100644 --- a/source/blender/bmesh/operators/bmo_inset.c +++ b/source/blender/bmesh/operators/bmo_inset.c @@ -967,7 +967,7 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op) is_mid = false; } - /* distable gives odd results at times, see T39288. */ + /* Disable since this gives odd results at times, see T39288. */ #if 0 else if (compare_v3v3(f_a->no, f_b->no, 0.001f) == false) { /* epsilon increased to fix T32329. */ diff --git a/source/blender/bmesh/operators/bmo_join_triangles.c b/source/blender/bmesh/operators/bmo_join_triangles.c index 1da4be57568..086114f64e9 100644 --- a/source/blender/bmesh/operators/bmo_join_triangles.c +++ b/source/blender/bmesh/operators/bmo_join_triangles.c @@ -66,7 +66,7 @@ static float quad_calc_error(const float v1[3], error += diff; } - /* Colinearity */ + /* Co-linearity */ { float edge_vecs[4][3]; float diff; diff --git a/source/blender/bmesh/operators/bmo_normals.c b/source/blender/bmesh/operators/bmo_normals.c index 8e7bfbb649d..3311ffefb0d 100644 --- a/source/blender/bmesh/operators/bmo_normals.c +++ b/source/blender/bmesh/operators/bmo_normals.c @@ -29,7 +29,7 @@ #include "intern/bmesh_operators_private.h" /* own include */ -/********* righthand faces implementation ****** */ +/********* Right-hand faces implementation ****** */ #define FACE_FLAG (1 << 0) #define FACE_FLIP (1 << 1) diff --git a/source/blender/bmesh/operators/bmo_primitive.c b/source/blender/bmesh/operators/bmo_primitive.c index d661859c8e3..8e088683d62 100644 --- a/source/blender/bmesh/operators/bmo_primitive.c +++ b/source/blender/bmesh/operators/bmo_primitive.c @@ -962,7 +962,7 @@ void bmo_create_uvsphere_exec(BMesh *bm, BMOperator *op) BM_mesh_calc_uvs_sphere(bm, FACE_MARK, cd_loop_uv_offset); } - /* and now do imat */ + /* Now apply the inverse matrix. */ BM_ITER_MESH (eve, &iter, bm, BM_VERTS_OF_MESH) { if (BMO_vert_flag_test(bm, eve, VERT_MARK)) { mul_m4_v3(mat, eve->co); @@ -1585,9 +1585,9 @@ void BM_mesh_calc_uvs_cone(BMesh *bm, float inv_mat[4][4]; int loop_index; - /* Transform the upvector like we did the cone itself, without location. */ + /* Transform the up-vector like we did the cone itself, without location. */ mul_mat3_m4_v3(mat, local_up); - /* Remove global scaling... */ + /* Remove global scaling. */ normalize_v3(local_up); invert_m4_m4(inv_mat, mat); diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c index 8b2f9478aab..be996e6ffe4 100644 --- a/source/blender/bmesh/operators/bmo_subdivide.c +++ b/source/blender/bmesh/operators/bmo_subdivide.c @@ -51,13 +51,13 @@ typedef struct SubDParams { BMOpSlot *slot_custom_patterns; /* BMO_slot_get(params->op->slots_in, "custom_patterns"); */ float fractal_ofs[3]; - /* rumtime storage for shape key */ + /* Runtime storage for shape key. */ struct { int cd_vert_shape_offset; int cd_vert_shape_offset_tmp; int totlayer; - /* shapekey holding displaced vertex coordinates for current geometry */ + /* Shape-key holding displaced vertex coordinates for current geometry. */ int tmpkey; } shape_info; @@ -1094,7 +1094,7 @@ void bmo_subdivide_edges_exec(BMesh *bm, BMOperator *op) } } - /* obvously don't test for other patterns matching */ + /* Obviously don't test for other patterns matching. */ continue; } diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index 36fe6ee655c..25459414cd7 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -3433,7 +3433,7 @@ static EdgeHalf *next_edgehalf_bev(BevelParams *bp, } normalize_v3(dir_new_edge); - /* Use this edge if it is the most parallel to the orignial so far. */ + /* Use this edge if it is the most parallel to the original so far. */ float new_dot = dot_v3v3(dir_new_edge, dir_start_edge); if (new_dot > best_dot) { second_best_dot = best_dot; /* For remembering if the choice was too close. */ @@ -4674,7 +4674,7 @@ static VMesh *pipe_adj_vmesh(BevelParams *bp, BevVert *bv, BoundVert *vpipe) f = (float)k / (float)ns; /* Ring runs along the pipe, so segment is used here. */ } - /* Place the vertex by interpolatin between the two profile points using the factor. */ + /* Place the vertex by interpolating between the two profile points using the factor. */ interp_v3_v3v3(mesh_vert(vm, i, j, k)->co, profile_point_pipe1, profile_point_pipe2, f); } else { @@ -6385,7 +6385,7 @@ static bool bev_rebuild_polygon(BMesh *bm, BevelParams *bp, BMFace *f) /* Edges in face are non-contiguous in our ordering around bv. * Which way should we go when going from eprev to e? */ if (count_ccw_edges_between(eprev, e) < count_ccw_edges_between(e, eprev)) { - /* Go counterclockewise from eprev to e. */ + /* Go counter-clockwise from eprev to e. */ go_ccw = true; } else { @@ -6419,7 +6419,7 @@ static bool bev_rebuild_polygon(BMesh *bm, BevelParams *bp, BMFace *f) BLI_array_append(ee, bme); } while (v != vend) { - /* Check for special case: multisegment 3rd face opposite a beveled edge with no vmesh. */ + /* Check for special case: multi-segment 3rd face opposite a beveled edge with no vmesh. */ bool corner3special = (vm->mesh_kind == M_NONE && v->ebev != e && v->ebev != eprev); if (go_ccw) { int i = v->index; @@ -7566,7 +7566,7 @@ void BM_mesh_bevel(BMesh *bm, } } - /* Perhaps clamp offset to avoid geometry colliisions. */ + /* Perhaps clamp offset to avoid geometry collisions. */ if (limit_offset) { bevel_limit_offset(&bp, bm); diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c index 6ae889fcee5..92ca8e38737 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c +++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c @@ -1318,9 +1318,9 @@ void BM_mesh_decimate_collapse(BMesh *bm, UNUSED_VARS(do_triangulate); #endif - /* alloc vars */ + /* Allocate variables. */ vquadrics = MEM_callocN(sizeof(Quadric) * bm->totvert, __func__); - /* since some edges may be degenerate, we might be over allocing a little here */ + /* Since some edges may be degenerate, we might be over allocating a little here. */ eheap = BLI_heap_new_ex(bm->totedge); eheap_table = MEM_mallocN(sizeof(HeapNode *) * bm->totedge, __func__); tot_edge_orig = bm->totedge; diff --git a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c index 94a578fe1d7..2254b46f860 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c +++ b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c @@ -188,7 +188,7 @@ static void mul_v2_m3v3_center(float r[2], static bool bm_loop_collapse_is_degenerate(BMLoop *l_ear) { - /* calculate relative to the centeral vertex for higher precision */ + /* Calculate relative to the central vertex for higher precision. */ const float *center = l_ear->v->co; float tri_2d[3][2]; diff --git a/source/blender/bmesh/tools/bmesh_edgenet.c b/source/blender/bmesh/tools/bmesh_edgenet.c index 1ab37ec0684..51af4d24e52 100644 --- a/source/blender/bmesh/tools/bmesh_edgenet.c +++ b/source/blender/bmesh/tools/bmesh_edgenet.c @@ -295,7 +295,7 @@ static LinkNode *bm_edgenet_path_calc(BMEdge *e, vn_1->flag = vn_2->flag = (f_index == -1) ? VNINFO_FLAG_IS_MIXFACE : 0; - /* prime the searchlist */ + /* Prime the search-list. */ BLI_linklist_prepend_pool(&v_ls_prev, e->v1, path_pool); BLI_linklist_prepend_pool(&v_ls_prev, e->v2, path_pool); diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c index db05abe0e48..81b016e9601 100644 --- a/source/blender/bmesh/tools/bmesh_intersect.c +++ b/source/blender/bmesh/tools/bmesh_intersect.c @@ -1036,7 +1036,7 @@ bool BM_mesh_intersect(BMesh *bm, #endif if (boolean_mode != BMESH_ISECT_BOOLEAN_NONE) { - /* keep original geometrty for raycast callbacks */ + /* Keep original geometry for ray-cast callbacks. */ float **cos; int i, j; @@ -1546,7 +1546,7 @@ bool BM_mesh_intersect(BMesh *bm, bool do_remove, do_flip; { - /* for now assyme this is an OK face to test with (not degenerate!) */ + /* For now assume this is an OK face to test with (not degenerate!) */ BMFace *f = ftable[groups_array[fg]]; float co[3]; int hits; diff --git a/source/blender/compositor/COM_compositor.h b/source/blender/compositor/COM_compositor.h index b308241ff34..6c8d372f587 100644 --- a/source/blender/compositor/COM_compositor.h +++ b/source/blender/compositor/COM_compositor.h @@ -268,8 +268,8 @@ extern "C" { * When an ExecutionGroup schedules a Chunk the schedule method of the WorkScheduler * The Workscheduler determines if the chunk can be run on an OpenCLDevice * (and that there are available OpenCLDevice). - * If this is the case the chunk will be added to the worklist for OpenCLDevice's - * otherwise the chunk will be added to the worklist of CPUDevices. + * If this is the case the chunk will be added to the work-list for OpenCLDevice's + * otherwise the chunk will be added to the work-list of CPUDevices. * * A thread will read the work-list and sends a workpackage to its device. * diff --git a/source/blender/compositor/nodes/COM_KeyingNode.cpp b/source/blender/compositor/nodes/COM_KeyingNode.cpp index 4e81a412c29..13bdabcdfd8 100644 --- a/source/blender/compositor/nodes/COM_KeyingNode.cpp +++ b/source/blender/compositor/nodes/COM_KeyingNode.cpp @@ -239,7 +239,7 @@ void KeyingNode::convertToOperations(NodeConverter &converter, converter.mapInputSocket(inputScreen, keyingOperation->getInputSocket(1)); if (keying_data->blur_pre) { - /* chroma preblur operation for input of keying operation */ + /* Chroma pre-blur operation for input of keying operation. */ NodeOperationOutput *preBluredImage = setupPreBlur( converter, inputImage, keying_data->blur_pre); converter.addLink(preBluredImage, keyingOperation->getInputSocket(0)); diff --git a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp index 29e18047578..52de0198a00 100644 --- a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp +++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp @@ -61,11 +61,10 @@ void ChromaMatteOperation::executePixelSampled(float output[4], this->m_inputImageProgram->readSampled(inImage, x, y, sampler); /* Store matte(alpha) value in [0] to go with - * COM_SetAlphaMultiplyOperation and the Value output. - */ + * #COM_SetAlphaMultiplyOperation and the Value output. */ - /* Algorithm from book "Video Demistified," does not include the spill reduction part */ - /* find theta, the angle that the color space should be rotated based on key */ + /* Algorithm from book "Video Demystified", does not include the spill reduction part. */ + /* Find theta, the angle that the color space should be rotated based on key. */ /* rescale to -1.0..1.0 */ // inImage[0] = (inImage[0] * 2.0f) - 1.0f; // UNUSED diff --git a/source/blender/compositor/operations/COM_CryptomatteOperation.cpp b/source/blender/compositor/operations/COM_CryptomatteOperation.cpp index 07466cdeccd..ccd291697cf 100644 --- a/source/blender/compositor/operations/COM_CryptomatteOperation.cpp +++ b/source/blender/compositor/operations/COM_CryptomatteOperation.cpp @@ -49,7 +49,7 @@ void CryptomatteOperation::executePixel(float output[4], int x, int y, void *dat for (size_t i = 0; i < inputs.size(); i++) { inputs[i]->read(input, x, y, data); if (i == 0) { - /* Write the frontmost object as false color for picking. */ + /* Write the front-most object as false color for picking. */ output[0] = input[0]; uint32_t m3hash; ::memcpy(&m3hash, &input[0], sizeof(uint32_t)); diff --git a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp index c47d3b52beb..4d3efec7c85 100644 --- a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp @@ -42,7 +42,8 @@ void *GaussianAlphaXBlurOperation::initializeTileData(rcti * /*rect*/) void GaussianAlphaXBlurOperation::initExecution() { - /* BlurBaseOperation::initExecution(); */ /* until we suppoer size input - comment this */ + /* Until we support size input - comment this. */ + // BlurBaseOperation::initExecution(); initMutex(); diff --git a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp index 7a0dff73941..a722a879b8d 100644 --- a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp @@ -42,7 +42,8 @@ void *GaussianAlphaYBlurOperation::initializeTileData(rcti * /*rect*/) void GaussianAlphaYBlurOperation::initExecution() { - /* BlurBaseOperation::initExecution(); */ /* until we suppoer size input - comment this */ + /* Until we support size input - comment this. */ + // BlurBaseOperation::initExecution(); initMutex(); diff --git a/source/blender/compositor/operations/COM_MixOperation.cpp b/source/blender/compositor/operations/COM_MixOperation.cpp index 948e69bf8eb..76a66727a75 100644 --- a/source/blender/compositor/operations/COM_MixOperation.cpp +++ b/source/blender/compositor/operations/COM_MixOperation.cpp @@ -705,7 +705,7 @@ void MixMultiplyOperation::executePixelSampled(float output[4], clampIfNeeded(output); } -/* ******** Mix Ovelray Operation ******** */ +/* ******** Mix Overlay Operation ******** */ MixOverlayOperation::MixOverlayOperation() { diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp index f7b908deaf4..d6894dfc8ad 100644 --- a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp @@ -589,7 +589,7 @@ void zbuf_accumulate_vecblur(NodeBlurData *nbd, printf("Found uninitialized speed in vector buffer... fixed.\n"); } - /* min speed? then copy speedbuffer to recalculate speed vectors */ + /* Min speed? then copy speed-buffer to recalculate speed vectors. */ if (nbd->minspeed) { float minspeed = (float)nbd->minspeed; float minspeedsq = minspeed * minspeed; @@ -619,7 +619,7 @@ void zbuf_accumulate_vecblur(NodeBlurData *nbd, SWAP(float *, minvecbufrect, vecbufrect); } - /* make vertex buffer with averaged speed and zvalues */ + /* Make vertex buffer with averaged speed and Z-values. */ rectvz = (float *)MEM_callocN(sizeof(float[4]) * (xsize + 1) * (ysize + 1), "vertices"); dvz = rectvz; for (y = 0; y <= ysize; y++) { @@ -728,7 +728,8 @@ void zbuf_accumulate_vecblur(NodeBlurData *nbd, antialias_tagbuf(xsize, ysize, rectmove); - /* has to become static, the init-jit calls a random-seed, screwing up texture noise node */ + /* Has to become static, the jitter initialization calls a random-seed, + * screwing up texture noise node. */ if (firsttime) { firsttime = 0; BLI_jitter_init(jit, 256); diff --git a/source/blender/draw/engines/eevee/eevee_data.c b/source/blender/draw/engines/eevee/eevee_data.c index 47068d0b843..b453df284ed 100644 --- a/source/blender/draw/engines/eevee/eevee_data.c +++ b/source/blender/draw/engines/eevee/eevee_data.c @@ -130,7 +130,7 @@ EEVEE_ObjectMotionData *EEVEE_motion_blur_object_data_get(EEVEE_MotionBlurData * } EEVEE_ObjectKey key, *key_p; - /* Small hack to avoid another comparisson. */ + /* Small hack to avoid another comparison. */ key.ob = (Object *)((char *)ob + hair); DupliObject *dup = DRW_object_get_dupli(ob); if (dup) { diff --git a/source/blender/draw/engines/eevee/eevee_effects.c b/source/blender/draw/engines/eevee/eevee_effects.c index ca583143572..698b959f1a9 100644 --- a/source/blender/draw/engines/eevee/eevee_effects.c +++ b/source/blender/draw/engines/eevee/eevee_effects.c @@ -242,7 +242,7 @@ void EEVEE_effects_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) } { - /* Perform min/max downsample */ + /* Perform min/max down-sample. */ DRW_PASS_CREATE(psl->maxz_downlevel_ps, downsample_write | DRW_STATE_DEPTH_ALWAYS); grp = DRW_shgroup_create(EEVEE_shaders_effect_maxz_downlevel_sh_get(), psl->maxz_downlevel_ps); DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &txl->maxzbuffer); diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c index c6760de5cfa..802b47b61a4 100644 --- a/source/blender/draw/engines/eevee/eevee_engine.c +++ b/source/blender/draw/engines/eevee/eevee_engine.c @@ -319,7 +319,7 @@ static void eevee_draw_scene(void *vedata) EEVEE_renderpasses_output_accumulate(sldata, vedata, false); /* Transparent */ - /* TODO(fclem): should be its own Framebuffer. + /* TODO(fclem): should be its own Frame-buffer. * This is needed because dualsource blending only works with 1 color buffer. */ GPU_framebuffer_texture_attach(fbl->main_color_fb, dtxl->depth, 0, 0); GPU_framebuffer_bind(fbl->main_color_fb); diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c index 040aa8c8d9c..c4973dc2e8b 100644 --- a/source/blender/draw/engines/eevee/eevee_lightcache.c +++ b/source/blender/draw/engines/eevee/eevee_lightcache.c @@ -99,9 +99,9 @@ typedef struct EEVEE_LightBake { GPUTexture *rt_color; /** Target cube depth texture. */ GPUTexture *rt_depth; - /** Target cube framebuffers. */ + /** Target cube frame-buffers. */ GPUFrameBuffer *rt_fb[6]; - /** Storage framebuffer. */ + /** Storage frame-buffer. */ GPUFrameBuffer *store_fb; /** Cube render target resolution. */ int rt_res; @@ -135,7 +135,7 @@ typedef struct EEVEE_LightBake { int grid_curr; /** The current light bounce being evaluated. */ int bounce_curr, bounce_len; - /** Resolution of the Visibility shadowmap. */ + /** Resolution of the Visibility shadow-map. */ float vis_res; /** Result of previous light bounce. */ GPUTexture *grid_prev; @@ -163,7 +163,7 @@ typedef struct EEVEE_LightBake { /** For only handling the resources. */ bool resource_only; bool own_resources; - /** If the lightcache was created for baking, it's first owned by the baker. */ + /** If the light-cache was created for baking, it's first owned by the baker. */ bool own_light_cache; /** ms. delay the start of the baking to not slowdown interactions (TODO remove) */ int delay; @@ -907,7 +907,7 @@ static void eevee_lightbake_cache_create(EEVEE_Data *vedata, EEVEE_LightBake *lb Scene *scene_eval = DEG_get_evaluated_scene(lbake->depsgraph); lbake->sldata = sldata; - /* Disable all effects BUT high bitdepth shadows. */ + /* Disable all effects BUT high bit-depth shadows. */ scene_eval->eevee.flag &= SCE_EEVEE_SHADOW_HIGH_BITDEPTH; scene_eval->eevee.taa_samples = 1; scene_eval->eevee.gi_irradiance_smoothing = 0.0f; @@ -980,7 +980,7 @@ static void eevee_lightbake_copy_irradiance(EEVEE_LightBake *lbake, LightCache * { DRW_TEXTURE_FREE_SAFE(lbake->grid_prev); - /* Copy texture by reading back and reuploading it. */ + /* Copy texture by reading back and re-uploading it. */ float *tex = GPU_texture_read(lcache->grid_tx.tex, GPU_DATA_FLOAT, 0); lbake->grid_prev = DRW_texture_create_2d_array(lbake->irr_size[0], lbake->irr_size[1], @@ -1330,7 +1330,7 @@ void EEVEE_lightbake_update(void *custom_data) EEVEE_LightBake *lbake = (EEVEE_LightBake *)custom_data; Scene *scene_orig = lbake->scene; - /* If a new lightcache was created, free the old one and reference the new. */ + /* If a new light-cache was created, free the old one and reference the new. */ if (lbake->lcache && scene_orig->eevee.light_cache_data != lbake->lcache) { if (scene_orig->eevee.light_cache_data != NULL) { EEVEE_lightcache_free(scene_orig->eevee.light_cache_data); @@ -1353,7 +1353,7 @@ static bool lightbake_do_sample(EEVEE_LightBake *lbake, Depsgraph *depsgraph = lbake->depsgraph; - /* TODO: make DRW manager instanciable (and only lock on drawing) */ + /* TODO: make DRW manager instantiable (and only lock on drawing) */ eevee_lightbake_context_enable(lbake); DRW_custom_pipeline(&draw_engine_eevee_type, depsgraph, render_callback, lbake); lbake->done += 1; diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c index 3671bea9ac0..395d4dc790d 100644 --- a/source/blender/draw/engines/eevee/eevee_lightprobes.c +++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c @@ -704,11 +704,11 @@ static void lightbake_planar_ensure_view(EEVEE_PlanarReflection *eplanar, static void eevee_lightprobes_extract_from_cache(EEVEE_LightProbesInfo *pinfo, LightCache *lcache) { /* copy the entire cache for now (up to MAX_PROBE) */ - /* TODO Frutum cull to only add visible probes. */ + /* TODO: frustum cull to only add visible probes. */ memcpy(pinfo->probe_data, lcache->cube_data, sizeof(EEVEE_LightProbe) * max_ii(1, min_ii(lcache->cube_len, MAX_PROBE))); - /* TODO compute the max number of grid based on sample count. */ + /* TODO: compute the max number of grid based on sample count. */ memcpy(pinfo->grid_data, lcache->grid_data, sizeof(EEVEE_LightGrid) * max_ii(1, min_ii(lcache->grid_len, MAX_GRID))); @@ -1041,7 +1041,7 @@ void EEVEE_lightbake_filter_glossy(EEVEE_ViewLayerData *sldata, pinfo->layer = probe_idx * 6; pinfo->roughness = i / (float)maxlevel; pinfo->roughness *= pinfo->roughness; /* Disney Roughness */ - pinfo->roughness *= pinfo->roughness; /* Distribute Roughness accros lod more evenly */ + pinfo->roughness *= pinfo->roughness; /* Distribute Roughness across lod more evenly. */ CLAMP(pinfo->roughness, 1e-8f, 0.99999f); /* Avoid artifacts */ #if 1 /* Variable Sample count and bias (fast) */ diff --git a/source/blender/draw/engines/eevee/eevee_lookdev.c b/source/blender/draw/engines/eevee/eevee_lookdev.c index 628941f68a2..a9998b33b7e 100644 --- a/source/blender/draw/engines/eevee/eevee_lookdev.c +++ b/source/blender/draw/engines/eevee/eevee_lookdev.c @@ -344,7 +344,7 @@ void EEVEE_lookdev_draw(EEVEE_Data *vedata) DRW_view_set_active(effects->lookdev_view); - /* Find the right framebuffers to render to. */ + /* Find the right frame-buffers to render to. */ GPUFrameBuffer *fb = (effects->target_buffer == fbl->effect_color_fb) ? fbl->main_fb : fbl->effect_fb; diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index 273521b0b28..56e4af0b6de 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -234,7 +234,7 @@ void EEVEE_materials_init(EEVEE_ViewLayerData *sldata, } { - /* Update noise Framebuffer. */ + /* Update noise Frame-buffer. */ GPU_framebuffer_ensure_config( &fbl->update_noise_fb, {GPU_ATTACHMENT_NONE, GPU_ATTACHMENT_TEXTURE_LAYER(e_data.util_tex, 2)}); diff --git a/source/blender/draw/engines/eevee/eevee_occlusion.c b/source/blender/draw/engines/eevee/eevee_occlusion.c index fd96a076c68..a3b581357e0 100644 --- a/source/blender/draw/engines/eevee/eevee_occlusion.c +++ b/source/blender/draw/engines/eevee/eevee_occlusion.c @@ -273,7 +273,7 @@ void EEVEE_occlusion_output_accumulate(EEVEE_ViewLayerData *sldata, EEVEE_Data * if (fbl->ao_accum_fb != NULL) { DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); - /* Update the min_max/horizon buffers so the refracion materials appear in it. */ + /* Update the min_max/horizon buffers so the refraction materials appear in it. */ EEVEE_create_minmax_buffer(vedata, dtxl->depth, -1); EEVEE_occlusion_compute(sldata, vedata, dtxl->depth, -1); diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h index 9702db5fecc..9845ec903e5 100644 --- a/source/blender/draw/engines/eevee/eevee_private.h +++ b/source/blender/draw/engines/eevee/eevee_private.h @@ -518,7 +518,7 @@ typedef struct EEVEE_LightsInfo { struct EEVEE_Shadow shadow_data[MAX_SHADOW]; struct EEVEE_ShadowCube shadow_cube_data[MAX_SHADOW_CUBE]; struct EEVEE_ShadowCascade shadow_cascade_data[MAX_SHADOW_CASCADE]; - /* Additionnal rendering info for cascade. */ + /* Additional rendering info for cascade. */ struct EEVEE_ShadowCascadeRender shadow_cascade_render[MAX_SHADOW_CASCADE]; /* Back index in light_data. */ uchar shadow_cube_light_indices[MAX_SHADOW_CUBE]; @@ -766,7 +766,7 @@ typedef struct EEVEE_EffectsInfo { struct GPUTexture *source_buffer; /* latest updated texture */ struct GPUFrameBuffer *target_buffer; /* next target to render to */ struct GPUTexture *final_tx; /* Final color to transform to display color space. */ - struct GPUFrameBuffer *final_fb; /* Framebuffer with final_tx as attachment. */ + struct GPUFrameBuffer *final_fb; /* Frame-buffer with final_tx as attachment. */ } EEVEE_EffectsInfo; /* ***************** COMMON DATA **************** */ @@ -1431,7 +1431,7 @@ static const float texcomat[4][4] = { {0.5f, 0.5f, 0.5f, 1.0f}, }; -/* Cubemap Matrices */ +/* Cube-map Matrices */ static const float cubefacemat[6][4][4] = { /* Pos X */ {{0.0f, 0.0f, -1.0f, 0.0f}, diff --git a/source/blender/draw/engines/eevee/eevee_render.c b/source/blender/draw/engines/eevee/eevee_render.c index bb974688404..72b12f6daeb 100644 --- a/source/blender/draw/engines/eevee/eevee_render.c +++ b/source/blender/draw/engines/eevee/eevee_render.c @@ -556,7 +556,7 @@ void EEVEE_render_draw(EEVEE_Data *vedata, RenderEngine *engine, RenderLayer *rl DRW_render_instance_buffer_finish(); /* Need to be called after DRW_render_instance_buffer_finish() */ - /* Also we weed to have a correct fbo bound for DRW_hair_update */ + /* Also we weed to have a correct FBO bound for DRW_hair_update */ GPU_framebuffer_bind(fbl->main_fb); DRW_hair_update(); diff --git a/source/blender/draw/engines/eevee/eevee_sampling.c b/source/blender/draw/engines/eevee/eevee_sampling.c index 253dae79902..aa11f072fa5 100644 --- a/source/blender/draw/engines/eevee/eevee_sampling.c +++ b/source/blender/draw/engines/eevee/eevee_sampling.c @@ -69,11 +69,11 @@ void EEVEE_sample_rectangle(int sample_ofs, BLI_halton_2d(ht_primes, ht_offset, sample_ofs, ht_point); - /* Decorelate AA and shadow samples. (see T68594) */ + /* De-correlate AA and shadow samples. (see T68594) */ ht_point[0] = fmod(ht_point[0] * 1151.0, 1.0); ht_point[1] = fmod(ht_point[1] * 1069.0, 1.0); - /* Change ditribution center to be 0,0 */ + /* Change distribution center to be 0,0 */ ht_point[0] = (ht_point[0] > 0.5f) ? ht_point[0] - 1.0f : ht_point[0]; ht_point[1] = (ht_point[1] > 0.5f) ? ht_point[1] - 1.0f : ht_point[1]; diff --git a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c index ed7d53b51af..1465c9dd84c 100644 --- a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c +++ b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c @@ -106,7 +106,7 @@ int EEVEE_screen_raytrace_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) GPU_framebuffer_texture_attach(fbl->main_fb, effects->ssr_specrough_input, 2, 0); - /* Raytracing output */ + /* Ray-tracing output. */ effects->ssr_hit_output = DRW_texture_pool_query_2d( tracing_res[0], tracing_res[1], GPU_RG16I, &draw_engine_eevee_type); effects->ssr_pdf_output = DRW_texture_pool_query_2d( diff --git a/source/blender/draw/engines/eevee/eevee_shaders.c b/source/blender/draw/engines/eevee/eevee_shaders.c index 7a277c18f01..7a83bebdeca 100644 --- a/source/blender/draw/engines/eevee/eevee_shaders.c +++ b/source/blender/draw/engines/eevee/eevee_shaders.c @@ -85,7 +85,7 @@ static struct { struct GPUShader *lookdev_background; struct GPUShader *update_noise_sh; - /* Downsample Depth */ + /* Down-sample Depth */ struct GPUShader *minz_downlevel_sh; struct GPUShader *maxz_downlevel_sh; struct GPUShader *minz_downdepth_sh; @@ -96,7 +96,7 @@ static struct { struct GPUShader *minz_copydepth_sh; struct GPUShader *maxz_copydepth_sh; - /* Simple Downsample */ + /* Simple Down-sample */ struct GPUShader *downsample_sh; struct GPUShader *downsample_cube_sh; diff --git a/source/blender/draw/engines/eevee/eevee_shadows.c b/source/blender/draw/engines/eevee/eevee_shadows.c index fa5afd60235..e29830defff 100644 --- a/source/blender/draw/engines/eevee/eevee_shadows.c +++ b/source/blender/draw/engines/eevee/eevee_shadows.c @@ -141,7 +141,7 @@ void EEVEE_shadows_caster_register(EEVEE_ViewLayerData *sldata, Object *ob) } if (ob->base_flag & BASE_FROM_DUPLI) { - /* Duplis will always refresh the shadowmaps as if they were deleted each frame. */ + /* Duplis will always refresh the shadow-maps as if they were deleted each frame. */ /* TODO(fclem): fix this. */ update = true; } @@ -259,7 +259,7 @@ void EEVEE_shadows_update(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) BoundSphere *bsphere = linfo->shadow_bounds; /* Search for deleted shadow casters or if shcaster WAS in shadow radius. */ for (int i = 0; i < backbuffer->count; i++) { - /* If the shadowcaster has been deleted or updated. */ + /* If the shadow-caster has been deleted or updated. */ if (BLI_BITMAP_TEST(backbuffer->update, i)) { for (int j = 0; j < linfo->cube_len; j++) { if (!BLI_BITMAP_TEST(&linfo->sh_cube_update[0], j)) { @@ -273,7 +273,7 @@ void EEVEE_shadows_update(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) /* Search for updates in current shadow casters. */ bbox = frontbuffer->bbox; for (int i = 0; i < frontbuffer->count; i++) { - /* If the shadowcaster has been updated. */ + /* If the shadow-caster has been updated. */ if (BLI_BITMAP_TEST(frontbuffer->update, i)) { for (int j = 0; j < linfo->cube_len; j++) { if (!BLI_BITMAP_TEST(&linfo->sh_cube_update[0], j)) { diff --git a/source/blender/draw/engines/eevee/eevee_shadows_cascade.c b/source/blender/draw/engines/eevee/eevee_shadows_cascade.c index 246bc18b71a..6cb4b39fafa 100644 --- a/source/blender/draw/engines/eevee/eevee_shadows_cascade.c +++ b/source/blender/draw/engines/eevee/eevee_shadows_cascade.c @@ -330,7 +330,7 @@ static void eevee_shadow_cascade_setup(EEVEE_LightsInfo *linfo, DRW_debug_sphere(center, csm_render->radius[c], dbg_col); #endif - /* Project into lightspace */ + /* Project into light-space. */ mul_m4_v3(viewmat, center); /* Snap projection center to nearest texel to cancel shimmering. */ @@ -376,7 +376,7 @@ static void eevee_shadow_cascade_setup(EEVEE_LightsInfo *linfo, #endif } - /* Bias is in clipspace, divide by range. */ + /* Bias is in clip-space, divide by range. */ shdw_data->bias = csm_render->original_bias * 0.05f / fabsf(sh_far - sh_near); shdw_data->near = sh_near; shdw_data->far = sh_far; diff --git a/source/blender/draw/engines/eevee/eevee_shadows_cube.c b/source/blender/draw/engines/eevee/eevee_shadows_cube.c index 19b86476c29..89caa0dd193 100644 --- a/source/blender/draw/engines/eevee/eevee_shadows_cube.c +++ b/source/blender/draw/engines/eevee/eevee_shadows_cube.c @@ -142,7 +142,7 @@ static void eevee_ensure_cube_views( float winmat[4][4]; float side = near; - /* TODO shadowcube array. */ + /* TODO: shadow-cube array. */ if (true) { /* This half texel offset is used to ensure correct filtering between faces. */ /* FIXME: This exhibit float precision issue with lower cube_res. diff --git a/source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl index 312d9f63ce0..9199eae816d 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_motion_blur_frag.glsl @@ -211,16 +211,16 @@ void main() float w = 1.0 / (50.0 * float(KERNEL) * 4.0); accum_bg += center_color * w; w_accum.x += w; - /* Note: In Jimenez's presentation, they used center sample. - * We use background color as it contains more informations for foreground + /* NOTE: In Jimenez's presentation, they used center sample. + * We use background color as it contains more information for foreground * elements that have not enough weights. - * Yield beter blur in complex motion. */ + * Yield better blur in complex motion. */ center_color = accum_bg / w_accum.x; #endif /* Merge background. */ accum += accum_bg; w_accum.y += w_accum.x; - /* Balance accumulation for failled samples. + /* Balance accumulation for failed samples. * We replace the missing foreground by the background. */ float blend_fac = saturate(1.0 - w_accum.y / w_accum.z); fragColor = (accum / w_accum.z) + center_color * blend_fac; diff --git a/source/blender/draw/engines/external/external_engine.c b/source/blender/draw/engines/external/external_engine.c index 1b331052a06..adb21540afb 100644 --- a/source/blender/draw/engines/external/external_engine.c +++ b/source/blender/draw/engines/external/external_engine.c @@ -108,7 +108,7 @@ static void external_engine_init(void *vedata) const DRWContextState *draw_ctx = DRW_context_state_get(); ARegion *region = draw_ctx->region; - /* Depth prepass */ + /* Depth pre-pass. */ if (!e_data.depth_sh) { const GPUShaderConfigData *sh_cfg = &GPU_shader_cfg_data[GPU_SHADER_CFG_DEFAULT]; diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c index f2472699300..33b91efc848 100644 --- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c @@ -365,7 +365,7 @@ GPENCIL_tLayer *gpencil_layer_cache_add(GPENCIL_PrivateData *pd, DRW_shgroup_call_procedural_triangles(grp, NULL, 1); if (gpl->blend_mode == eGplBlendMode_HardLight) { - /* We cannot do custom blending on MultiTarget framebuffers. + /* We cannot do custom blending on Multi-Target frame-buffers. * Workaround by doing 2 passes. */ grp = DRW_shgroup_create(sh, tgp_layer->blend_ps); DRW_shgroup_state_disable(grp, DRW_STATE_BLEND_MUL); diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c index 6627d38366f..e738b0d063c 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.c +++ b/source/blender/draw/engines/gpencil/gpencil_engine.c @@ -281,7 +281,7 @@ void GPENCIL_cache_init(void *ved) }); } else { - /* Free uneeded buffers. */ + /* Free unneeded buffers. */ GPU_FRAMEBUFFER_FREE_SAFE(fbl->snapshot_fb); DRW_TEXTURE_FREE_SAFE(txl->snapshot_depth_tx); DRW_TEXTURE_FREE_SAFE(txl->snapshot_color_tx); @@ -333,7 +333,7 @@ void GPENCIL_cache_init(void *ved) pd->dof_params[0] = -focus_dist * pd->dof_params[1]; } else { - /* Disable DoF blur scalling. */ + /* Disable DoF blur scaling. */ pd->camera = NULL; } } @@ -346,7 +346,7 @@ typedef struct gpIterPopulateData { GPENCIL_PrivateData *pd; GPENCIL_MaterialPool *matpool; DRWShadingGroup *grp; - /* Last material UBO bound. Used to avoid uneeded buffer binding. */ + /* Last material UBO bound. Used to avoid unneeded buffer binding. */ GPUUniformBuf *ubo_mat; GPUUniformBuf *ubo_lights; /* Last texture bound. */ @@ -385,7 +385,7 @@ static void gpencil_drawcall_flush(gpIterPopulateData *iter) iter->vcount = 0; } -/* Group drawcalls that are consecutive and with the same type. Reduces GPU driver overhead. */ +/* Group draw-calls that are consecutive and with the same type. Reduces GPU driver overhead. */ static void gpencil_drawcall_add( gpIterPopulateData *iter, struct GPUBatch *geom, bool instancing, int v_first, int v_count) { @@ -399,7 +399,7 @@ static void gpencil_drawcall_add( #endif int last = iter->vfirst + iter->vcount; - /* Interupt drawcall grouping if the sequence is not consecutive. */ + /* Interrupt draw-call grouping if the sequence is not consecutive. */ if ((geom != iter->geom) || (v_first - last > 3)) { gpencil_drawcall_flush(iter); } @@ -686,7 +686,7 @@ void GPENCIL_cache_finish(void *ved) /* Sort object by decreasing Z to avoid most of alpha ordering issues. */ gpencil_object_cache_sort(pd); - /* Create framebuffers only if needed. */ + /* Create frame-buffers only if needed. */ if (pd->tobjects.first) { eGPUTextureFormat format = pd->use_signed_fb ? GPU_RGBA16F : GPU_R11F_G11F_B10F; diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h b/source/blender/draw/engines/gpencil/gpencil_engine.h index 2b07ea53187..5ceb909bc88 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.h +++ b/source/blender/draw/engines/gpencil/gpencil_engine.h @@ -110,7 +110,7 @@ BLI_STATIC_ASSERT_ALIGN(gpLight, 16) typedef struct GPENCIL_MaterialPool { /* Linklist. */ struct GPENCIL_MaterialPool *next; - /* GPU representatin of materials. */ + /* GPU representation of materials. */ gpMaterial mat_data[GP_MATERIAL_BUFFER_LEN]; /* Matching ubo. */ struct GPUUniformBuf *ubo; @@ -122,7 +122,7 @@ typedef struct GPENCIL_MaterialPool { } GPENCIL_MaterialPool; typedef struct GPENCIL_LightPool { - /* GPU representatin of materials. */ + /* GPU representation of materials. */ gpLight light_data[GPENCIL_LIGHT_BUFFER_LEN]; /* Matching ubo. */ struct GPUUniformBuf *ubo; @@ -151,7 +151,7 @@ typedef struct GPENCIL_tVfx { /** Linklist */ struct GPENCIL_tVfx *next; DRWPass *vfx_ps; - /* Framebuffer reference since it may not be allocated yet. */ + /* Frame-buffer reference since it may not be allocated yet. */ GPUFrameBuffer **target_fb; } GPENCIL_tVfx; @@ -352,7 +352,7 @@ typedef struct GPENCIL_PrivateData { bool use_lighting; /* Use physical lights or just ambient lighting. */ bool use_lights; - /* Do we need additional framebuffers? */ + /* Do we need additional frame-buffers? */ bool use_layer_fb; bool use_object_fb; bool use_mask_fb; diff --git a/source/blender/draw/engines/gpencil/gpencil_render.c b/source/blender/draw/engines/gpencil/gpencil_render.c index 9ac9a4dc078..b597a786e86 100644 --- a/source/blender/draw/engines/gpencil/gpencil_render.c +++ b/source/blender/draw/engines/gpencil/gpencil_render.c @@ -47,7 +47,7 @@ void GPENCIL_render_init(GPENCIL_Data *vedata, const float *viewport_size = DRW_viewport_size_get(); const int size[2] = {(int)viewport_size[0], (int)viewport_size[1]}; - /* Set the pers & view matrix. */ + /* Set the perspective & view matrix. */ float winmat[4][4], viewmat[4][4], viewinv[4][4]; struct Object *camera = DEG_get_evaluated_object(depsgraph, RE_GetCamera(engine->re)); diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c index f4af5ebff99..0b66141e51a 100644 --- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c +++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c @@ -397,7 +397,7 @@ static void gpencil_vfx_shadow(ShadowShaderFxData *fx, Object *ob, gpIterVfxData unit_m4(uv_mat); zero_v2(wave_ofs); - /* We reseted the uv_mat so we need to accound for the rotation in the */ + /* We reset the uv_mat so we need to account for the rotation in the */ copy_v2_fl2(tmp, 0.0f, blur_size[1]); rotate_v2_v2fl(blur_dir, tmp, -fx->rotation); mul_v2_v2(blur_dir, vp_size_inv); diff --git a/source/blender/draw/engines/overlay/overlay_antialiasing.c b/source/blender/draw/engines/overlay/overlay_antialiasing.c index 229f9c5a88f..c602e536f79 100644 --- a/source/blender/draw/engines/overlay/overlay_antialiasing.c +++ b/source/blender/draw/engines/overlay/overlay_antialiasing.c @@ -93,7 +93,7 @@ void OVERLAY_antialiasing_init(OVERLAY_Data *vedata) line_tex = txl->overlay_line_tx; } else { - /* Just a copy of the defaults framebuffers. */ + /* Just a copy of the defaults frame-buffers. */ color_tex = dtxl->color_overlay; } diff --git a/source/blender/draw/engines/overlay/overlay_armature.c b/source/blender/draw/engines/overlay/overlay_armature.c index cbd2589f20f..7042d095b56 100644 --- a/source/blender/draw/engines/overlay/overlay_armature.c +++ b/source/blender/draw/engines/overlay/overlay_armature.c @@ -1691,13 +1691,13 @@ static void draw_bone_degrees_of_freedom(ArmatureDrawContext *ctx, bPoseChannel unit_m4(posetrans); translate_m4(posetrans, pchan->pose_mat[3][0], pchan->pose_mat[3][1], pchan->pose_mat[3][2]); - /* in parent-bone pose space... */ + /* In parent-bone pose space... */ if (pchan->parent) { copy_m4_m4(tmp, pchan->parent->pose_mat); zero_v3(tmp[3]); mul_m4_m4m4(posetrans, posetrans, tmp); } - /* ... but own restspace */ + /* ... but own rest-space. */ mul_m4_m4m3(posetrans, posetrans, pchan->bone->bone_mat); float scale = pchan->bone->length * pchan->size[1]; diff --git a/source/blender/draw/engines/overlay/overlay_edit_mesh.c b/source/blender/draw/engines/overlay/overlay_edit_mesh.c index 38e171cb5e2..40a9dbe01c0 100644 --- a/source/blender/draw/engines/overlay/overlay_edit_mesh.c +++ b/source/blender/draw/engines/overlay/overlay_edit_mesh.c @@ -344,7 +344,7 @@ void OVERLAY_edit_mesh_draw(OVERLAY_Data *vedata) if (pd->edit_mesh.do_zbufclip) { DRW_draw_pass(psl->edit_mesh_depth_ps[IN_FRONT]); - /* render facefill */ + /* Render face-fill. */ DRW_view_set_active(pd->view_edit_faces); DRW_draw_pass(psl->edit_mesh_faces_ps[NOT_IN_FRONT]); diff --git a/source/blender/draw/engines/overlay/overlay_extra.c b/source/blender/draw/engines/overlay/overlay_extra.c index 39f17581e0d..91e605bf0ae 100644 --- a/source/blender/draw/engines/overlay/overlay_extra.c +++ b/source/blender/draw/engines/overlay/overlay_extra.c @@ -642,10 +642,10 @@ void OVERLAY_light_cache_populate(OVERLAY_Data *vedata, Object *ob) } instdata; copy_m4_m4(instdata.mat, ob->obmat); - /* FIXME / TODO: clipend has no meaning nowadays. - * In EEVEE, Only clipsta is used shadowmaping. + /* FIXME / TODO: clip_end has no meaning nowadays. + * In EEVEE, Only clip_sta is used shadow-mapping. * Clip end is computed automatically based on light power. - * For now, always use the custom distance as clipend. */ + * For now, always use the custom distance as clip_end. */ instdata.clip_end = la->att_dist; instdata.clip_sta = la->clipsta; diff --git a/source/blender/draw/engines/overlay/overlay_metaball.c b/source/blender/draw/engines/overlay/overlay_metaball.c index f973c1eda8a..46076a7c88b 100644 --- a/source/blender/draw/engines/overlay/overlay_metaball.c +++ b/source/blender/draw/engines/overlay/overlay_metaball.c @@ -63,7 +63,7 @@ static void metaball_instance_data_set( mul_v3_v3fl(data->mat[1], ob->obmat[1], radius / 0.05f); mul_v3_v3fl(data->mat[2], ob->obmat[2], radius / 0.05f); mul_v3_m4v3(data->mat[3], ob->obmat, pos); - /* WATCH: Reminder, alpha is wiresize. */ + /* WATCH: Reminder, alpha is wire-size. */ OVERLAY_bone_instance_data_set_color(data, color); } diff --git a/source/blender/draw/engines/overlay/overlay_particle.c b/source/blender/draw/engines/overlay/overlay_particle.c index fa95bad4d86..71064e7ff47 100644 --- a/source/blender/draw/engines/overlay/overlay_particle.c +++ b/source/blender/draw/engines/overlay/overlay_particle.c @@ -185,7 +185,7 @@ void OVERLAY_particle_cache_populate(OVERLAY_Data *vedata, Object *ob) /* TODO(fclem): Here would be a good place for preemptive culling. */ - /* fclem: Is color even usefull in our modern context? */ + /* NOTE(fclem): Is color even useful in our modern context? */ Material *ma = BKE_object_material_get(ob, part->omat); float color[4] = {0.6f, 0.6f, 0.6f, part->draw_size}; if (ma != NULL) { diff --git a/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl index eaa553a10de..9bd49bb84f8 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl @@ -288,7 +288,7 @@ void main() ls_ray_dir -= ls_ray_ori; - /* TODO: Align rays to volume center so that it mimics old behaviour of slicing the volume. */ + /* TODO: Align rays to volume center so that it mimics old behavior of slicing the volume. */ float dist = line_unit_box_intersect_dist(ls_ray_ori, ls_ray_dir); if (dist > 0.0) { diff --git a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c index 20c30d9ce68..feb48b2623d 100644 --- a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c +++ b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c @@ -75,7 +75,7 @@ static void workbench_taa_jitter_init_order(float (*table)[2], int num) swap_v2_v2(table[0], table[closest_index]); } - /* sort list based on furtest distance with previous */ + /* Sort list based on farthest distance with previous. */ for (int i = 0; i < num - 2; i++) { float f_squared_dist = 0.0; int f_index = i; diff --git a/source/blender/draw/engines/workbench/workbench_effect_dof.c b/source/blender/draw/engines/workbench/workbench_effect_dof.c index 73cd501190f..a00453fe125 100644 --- a/source/blender/draw/engines/workbench/workbench_effect_dof.c +++ b/source/blender/draw/engines/workbench/workbench_effect_dof.c @@ -104,7 +104,7 @@ static void workbench_dof_setup_samples(struct GPUUniformBuf **ubo, square_to_circle(x, y, &r, &T); samp[2] = r; - /* Bokeh shape parametrisation */ + /* Bokeh shape parameterization. */ if (bokeh_sides > 1.0f) { float denom = T - (2.0 * M_PI / bokeh_sides) * floorf((bokeh_sides * T + M_PI) / (2.0 * M_PI)); diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c index 6aa794bda51..6e9118bfe46 100644 --- a/source/blender/draw/engines/workbench/workbench_materials.c +++ b/source/blender/draw/engines/workbench/workbench_materials.c @@ -76,7 +76,7 @@ void workbench_material_ubo_data(WORKBENCH_PrivateData *wpd, alpha *= mat->a; copy_v3_v3(data->base_color, &mat->r); metallic = mat->metallic; - roughness = sqrtf(mat->roughness); /* Remap to disney roughness. */ + roughness = sqrtf(mat->roughness); /* Remap to Disney roughness. */ } else { copy_v3_fl(data->base_color, 0.8f); diff --git a/source/blender/draw/engines/workbench/workbench_private.h b/source/blender/draw/engines/workbench/workbench_private.h index d157c260fbd..522aae7f542 100644 --- a/source/blender/draw/engines/workbench/workbench_private.h +++ b/source/blender/draw/engines/workbench/workbench_private.h @@ -225,7 +225,7 @@ BLI_STATIC_ASSERT_ALIGN(WORKBENCH_UBO_Material, 16) typedef struct WORKBENCH_Prepass { /** Hash storing shading group for each Material or GPUTexture to reduce state changes. */ struct GHash *material_hash; - /** First common (non-vcol and non-image colored) shading group to created subgroups. */ + /** First common (non-vertex-color and non-image-colored) shading group to created subgroups. */ struct DRWShadingGroup *common_shgrp; /** First Vertex Color shading group to created subgroups. */ struct DRWShadingGroup *vcol_shgrp; @@ -384,7 +384,7 @@ typedef struct WORKBENCH_ViewLayerData { struct GPUUniformBuf *cavity_sample_ubo; /** Blue noise texture used to randomize the sampling of some effects.*/ struct GPUTexture *cavity_jitter_tx; - /** Materials ubos allocated in a memblock for easy bookeeping. */ + /** Materials UBO's allocated in a memblock for easy bookkeeping. */ struct BLI_memblock *material_ubo; struct BLI_memblock *material_ubo_data; /** Number of samples for which cavity_sample_ubo is valid. */ diff --git a/source/blender/draw/engines/workbench/workbench_shadow.c b/source/blender/draw/engines/workbench/workbench_shadow.c index 881c186e3e5..99d945c311e 100644 --- a/source/blender/draw/engines/workbench/workbench_shadow.c +++ b/source/blender/draw/engines/workbench/workbench_shadow.c @@ -157,7 +157,7 @@ void workbench_shadow_cache_init(WORKBENCH_Data *data) DRWState state = DRW_STATE_DEPTH_LESS | DRW_STATE_STENCIL_ALWAYS; #endif - /* TODO(fclem): Merge into one pass with subpasses. */ + /* TODO(fclem): Merge into one pass with sub-passes. */ DRW_PASS_CREATE(psl->shadow_ps[0], state | depth_pass_state); DRW_PASS_CREATE(psl->shadow_ps[1], state | depth_fail_state); diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index 4a43107c612..2545cfa65dc 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -93,7 +93,7 @@ typedef char DRWViewportEmptyList; #define DRW_VIEWPORT_LIST_SIZE(list) \ (sizeof(list) == sizeof(DRWViewportEmptyList) ? 0 : ((sizeof(list)) / sizeof(void *))) -/* Unused members must be either pass list or 'char *' when not usd. */ +/* Unused members must be either pass list or 'char *' when not used. */ #define DRW_VIEWPORT_DATA_SIZE(ty) \ { \ DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->fbl)), DRW_VIEWPORT_LIST_SIZE(*(((ty *)NULL)->txl)), \ @@ -327,14 +327,14 @@ typedef enum { /** Culling test */ DRW_STATE_CULL_BACK = (1 << 7), DRW_STATE_CULL_FRONT = (1 << 8), - /** Stencil test . These options are mutal exclusive and packed into 2 bits*/ + /** Stencil test . These options are mutually exclusive and packed into 2 bits. */ DRW_STATE_STENCIL_ALWAYS = (1 << 9), DRW_STATE_STENCIL_EQUAL = (2 << 9), DRW_STATE_STENCIL_NEQUAL = (3 << 9), /** Blend state. These options are mutual exclusive and packed into 4 bits */ DRW_STATE_BLEND_ADD = (1 << 11), - /** Same as additive but let alpha accumulate without premult. */ + /** Same as additive but let alpha accumulate without pre-multiply. */ DRW_STATE_BLEND_ADD_FULL = (2 << 11), /** Standard alpha blending. */ DRW_STATE_BLEND_ALPHA = (3 << 11), diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index 5333f59bf38..fcd626eb92b 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -1325,7 +1325,7 @@ GPUBatch *DRW_cache_field_vortex_get(void) #undef SPIRAL_RESOL } -/* Screenaligned circle. */ +/* Screen-aligned circle. */ GPUBatch *DRW_cache_field_curve_get(void) { #define CIRCLE_RESOL 32 @@ -1414,7 +1414,7 @@ GPUBatch *DRW_cache_field_cone_limit_get(void) #undef CIRCLE_RESOL } -/* Screenaligned dashed circle */ +/* Screen-aligned dashed circle */ GPUBatch *DRW_cache_field_sphere_limit_get(void) { #define CIRCLE_RESOL 32 @@ -3385,7 +3385,7 @@ GPUBatch *DRW_cache_particles_get_prim(int type) int v = 0; int flag = VCLASS_EMPTY_AXES; - /* Set minimum to 0.001f so we can easilly normalize to get the color. */ + /* Set minimum to 0.001f so we can easily normalize to get the color. */ GPU_vertbuf_vert_set(vbo, v++, &(Vert){{0.0f, 0.0001f, 0.0f}, flag}); GPU_vertbuf_vert_set(vbo, v++, &(Vert){{0.0f, 2.0f, 0.0f}, flag}); GPU_vertbuf_vert_set(vbo, v++, &(Vert){{0.0001f, 0.0f, 0.0f}, flag}); diff --git a/source/blender/draw/intern/draw_cache.h b/source/blender/draw/intern/draw_cache.h index 9fd7ffd4692..c15c246992d 100644 --- a/source/blender/draw/intern/draw_cache.h +++ b/source/blender/draw/intern/draw_cache.h @@ -239,7 +239,7 @@ typedef struct DRWVolumeGrid { float texture_to_object[4][4]; float object_to_texture[4][4]; - /* Transfrom from bounds to texture space. */ + /* Transform from bounds to texture space. */ float object_to_bounds[4][4]; float bounds_to_texture[4][4]; } DRWVolumeGrid; diff --git a/source/blender/draw/intern/draw_cache_impl_displist.c b/source/blender/draw/intern/draw_cache_impl_displist.c index 72f3e7b0fa8..d606f70db9e 100644 --- a/source/blender/draw/intern/draw_cache_impl_displist.c +++ b/source/blender/draw/intern/draw_cache_impl_displist.c @@ -774,7 +774,7 @@ void DRW_displist_vertbuf_create_loop_pos_and_nor_and_uv_and_tan(ListBase *lb, } } -/* Edge detection/adjecency */ +/* Edge detection/adjacency. */ #define NO_EDGE INT_MAX static void set_edge_adjacency_lines_indices( EdgeHash *eh, GPUIndexBufBuilder *elb, bool *r_is_manifold, uint v1, uint v2, uint v3) diff --git a/source/blender/draw/intern/draw_cache_impl_hair.c b/source/blender/draw/intern/draw_cache_impl_hair.c index 327a92a997e..fd28ac00186 100644 --- a/source/blender/draw/intern/draw_cache_impl_hair.c +++ b/source/blender/draw/intern/draw_cache_impl_hair.c @@ -318,7 +318,7 @@ bool hair_ensure_procedural_data(Object *object, HairBatchCache *cache = hair_batch_cache_get(hair); *r_hair_cache = &cache->hair; - const int steps = 2; /* TODO: don't hardcode? */ + const int steps = 2; /* TODO: don't hard-code? */ (*r_hair_cache)->final[subdiv].strands_res = 1 << (steps + subdiv); /* Refreshed on combing and simulation. */ diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index 3f014a01680..1a1caa2943a 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -405,7 +405,7 @@ static void drw_mesh_weight_state_extract(Object *ob, &wstate->defgroup_sel_count); } } - /* With only one selected bone Multipaint reverts to regular mode. */ + /* With only one selected bone Multi-paint reverts to regular mode. */ else { wstate->defgroup_sel_count = 0; MEM_SAFE_FREE(wstate->defgroup_sel); diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c index 5029e71cac8..fef8ba4b606 100644 --- a/source/blender/draw/intern/draw_common.c +++ b/source/blender/draw/intern/draw_common.c @@ -161,7 +161,7 @@ void DRW_globals_update(void) /* Grid */ UI_GetThemeColorShade4fv(TH_GRID, 10, gb->colorGrid); - /* emphasise division lines lighter instead of darker, if background is darker than grid */ + /* Emphasize division lines lighter instead of darker, if background is darker than grid. */ UI_GetThemeColorShade4fv( TH_GRID, (gb->colorGrid[0] + gb->colorGrid[1] + gb->colorGrid[2] + 0.12f > @@ -333,7 +333,7 @@ int DRW_object_wire_theme_get(Object *ob, ViewLayer *view_layer, float **r_color theme_id = TH_EMPTY; break; case OB_LIGHTPROBE: - /* TODO add lightprobe color */ + /* TODO: add light-probe color. */ theme_id = TH_EMPTY; break; default: diff --git a/source/blender/draw/intern/draw_hair.c b/source/blender/draw/intern/draw_hair.c index 86f1b0e0ebb..bca227a24e2 100644 --- a/source/blender/draw/intern/draw_hair.c +++ b/source/blender/draw/intern/draw_hair.c @@ -320,7 +320,7 @@ void DRW_hair_update(void) max_size = max_ii(max_size, pr_call->vert_len); } - /* Create target Texture / Framebuffer */ + /* Create target Texture / Frame-buffer */ /* Don't use max size as it can be really heavy and fail. * Do chunks of maximum 2048 * 2048 hair points. */ int width = 2048; diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index cf78959e712..8f8a863f721 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -1570,13 +1570,13 @@ void DRW_draw_render_loop_ex(struct Depsgraph *depsgraph, drw_engines_enable(view_layer, engine_type, gpencil_engine_needed); drw_engines_data_validate(); - /* Update ubos */ + /* Update UBO's */ DRW_globals_update(); drw_debug_init(); DRW_hair_init(); - /* No framebuffer allowed before drawing. */ + /* No frame-buffer allowed before drawing. */ BLI_assert(GPU_framebuffer_active_get() == GPU_framebuffer_back_get()); /* Init engines */ @@ -1642,7 +1642,7 @@ void DRW_draw_render_loop_ex(struct Depsgraph *depsgraph, DRW_draw_callbacks_post_scene(); if (WM_draw_region_get_bound_viewport(region)) { - /* Don't unbind the framebuffer yet in this case and let + /* Don't unbind the frame-buffer yet in this case and let * GPU_viewport_unbind do it, so that we can still do further * drawing of action zones on top. */ } @@ -2083,12 +2083,12 @@ void DRW_draw_render_loop_2d_ex(struct Depsgraph *depsgraph, drw_engines_enable_editors(); drw_engines_data_validate(); - /* Update ubos */ + /* Update UBO's */ DRW_globals_update(); drw_debug_init(); - /* No framebuffer allowed before drawing. */ + /* No frame-buffer allowed before drawing. */ BLI_assert(GPU_framebuffer_active_get() == GPU_framebuffer_back_get()); GPU_framebuffer_bind(DST.default_framebuffer); GPU_framebuffer_clear_depth_stencil(DST.default_framebuffer, 1.0f, 0xFF); @@ -2186,7 +2186,7 @@ void DRW_draw_render_loop_2d_ex(struct Depsgraph *depsgraph, GPU_depth_test(GPU_DEPTH_LESS_EQUAL); if (WM_draw_region_get_bound_viewport(region)) { - /* Don't unbind the framebuffer yet in this case and let + /* Don't unbind the frame-buffer yet in this case and let * GPU_viewport_unbind do it, so that we can still do further * drawing of action zones on top. */ } @@ -2368,7 +2368,7 @@ void DRW_draw_select_loop(struct Depsgraph *depsgraph, drw_context_state_init(); drw_viewport_var_init(); - /* Update ubos */ + /* Update UBO's */ DRW_globals_update(); /* Init engines */ @@ -2440,7 +2440,7 @@ void DRW_draw_select_loop(struct Depsgraph *depsgraph, DRW_render_instance_buffer_finish(); } - /* Setup framebuffer */ + /* Setup frame-buffer. */ draw_select_framebuffer_depth_only_setup(viewport_size); GPU_framebuffer_bind(g_select_buffer.framebuffer_depth_only); GPU_framebuffer_clear_depth(g_select_buffer.framebuffer_depth_only, 1.0f); @@ -2516,7 +2516,7 @@ static void drw_draw_depth_loop_impl(struct Depsgraph *depsgraph, drw_task_graph_init(); drw_engines_data_validate(); - /* Setup framebuffer */ + /* Setup frame-buffer. */ DefaultFramebufferList *fbl = (DefaultFramebufferList *)GPU_viewport_framebuffer_list_get( DST.viewport); GPU_framebuffer_bind(fbl->depth_only_fb); @@ -2526,7 +2526,7 @@ static void drw_draw_depth_loop_impl(struct Depsgraph *depsgraph, drw_context_state_init(); drw_viewport_var_init(); - /* Update ubos */ + /* Update UBO's */ DRW_globals_update(); /* Init engines */ @@ -2582,7 +2582,7 @@ static void drw_draw_depth_loop_impl(struct Depsgraph *depsgraph, drw_state_ensure_not_reused(&DST); #endif - /* Changin context */ + /* Changing context. */ if (use_opengl_context) { DRW_opengl_context_disable(); } @@ -2666,7 +2666,7 @@ void DRW_draw_select_id(Depsgraph *depsgraph, ARegion *region, View3D *v3d, cons DST.viewport = viewport; drw_viewport_var_init(); - /* Update ubos */ + /* Update UBO's */ DRW_globals_update(); /* Init Select Engine */ @@ -2723,7 +2723,7 @@ void DRW_draw_depth_object( GPU_matrix_set(rv3d->viewmat); GPU_matrix_mul(object->obmat); - /* Setup framebuffer */ + /* Setup frame-buffer. */ DefaultFramebufferList *fbl = GPU_viewport_framebuffer_list_get(viewport); GPU_framebuffer_bind(fbl->depth_only_fb); diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h index 3ab60bc3c96..f540ff09032 100644 --- a/source/blender/draw/intern/draw_manager.h +++ b/source/blender/draw/intern/draw_manager.h @@ -266,14 +266,14 @@ typedef union DRWCommand { DRWCommandClear clear; } DRWCommand; -/* Used for agregating calls into GPUVertBufs. */ +/** Used for aggregating calls into #GPUVertBuf's. */ struct DRWCallBuffer { GPUVertBuf *buf; GPUVertBuf *buf_select; int count; }; -/* Used by DRWUniform.type */ +/** Used by #DRWUniform.type */ typedef enum { DRW_UNIFORM_INT = 0, DRW_UNIFORM_INT_COPY, @@ -324,8 +324,8 @@ struct DRWUniform { /* DRW_UNIFORM_BLOCK_OBATTRS */ struct GPUUniformAttrList *uniform_attrs; }; - int location; /* Uniform location or binding point for textures and ubos. */ - uint8_t type; /* DRWUniformType */ + int location; /* Uniform location or binding point for textures and UBO's. */ + uint8_t type; /* #DRWUniformType */ uint8_t length; /* Length of vector types. */ uint8_t arraysize; /* Array size of scalar/vector types. */ }; diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c index 57b3373932e..6bdc5305fed 100644 --- a/source/blender/draw/intern/draw_manager_data.c +++ b/source/blender/draw/intern/draw_manager_data.c @@ -978,7 +978,7 @@ static void drw_sculpt_get_frustum_planes(Object *ob, float planes[6][4]) static void drw_sculpt_generate_calls(DRWSculptCallbackData *scd) { - /* PBVH should always exist for non-empty meshes, created by depsgrah eval. */ + /* PBVH should always exist for non-empty meshes, created by depsgraph eval. */ PBVH *pbvh = (scd->ob->sculpt) ? scd->ob->sculpt->pbvh : NULL; if (!pbvh) { return; @@ -1601,10 +1601,10 @@ static void draw_frustum_bound_sphere_calc(const BoundBox *bbox, /* Detect which of the corner of the far clipping plane is the farthest to the origin */ float nfar[4]; /* most extreme far point in NDC space */ - float farxy[2]; /* farpoint projection onto the near plane */ + float farxy[2]; /* far-point projection onto the near plane */ float farpoint[3] = {0.0f}; /* most extreme far point in camera coordinate */ float nearpoint[3]; /* most extreme near point in camera coordinate */ - float farcenter[3] = {0.0f}; /* center of far cliping plane in camera coordinate */ + float farcenter[3] = {0.0f}; /* center of far clipping plane in camera coordinate */ float F = -1.0f, N; /* square distance of far and near point to origin */ float f, n; /* distance of far and near point to z axis. f is always > 0 but n can be < 0 */ float e, s; /* far and near clipping distance (<0) */ diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c index 67778584d25..4c8fcb0e016 100644 --- a/source/blender/draw/intern/draw_manager_exec.c +++ b/source/blender/draw/intern/draw_manager_exec.c @@ -272,7 +272,7 @@ static void drw_stencil_state_set(uint write_mask, uint reference, uint compare_ GPU_stencil_compare_mask_set(compare_mask); } -/* Reset state to not interfer with other UI drawcall */ +/* Reset state to not interfere with other UI draw-call. */ void DRW_state_reset_ex(DRWState state) { DST.state = ~state; @@ -855,7 +855,7 @@ static void draw_call_batching_do(DRWShadingGroup *shgroup, DRWCommandsState *state, DRWCommandDraw *call) { - /* If any condition requires to interupt the merging. */ + /* If any condition requires to interrupt the merging. */ bool neg_scale = DRW_handle_negative_scale_get(&call->handle); int chunk = DRW_handle_chunk_get(&call->handle); int id = DRW_handle_id_get(&call->handle); diff --git a/source/blender/draw/intern/draw_manager_texture.c b/source/blender/draw/intern/draw_manager_texture.c index 8b948e62cf3..e9432f370b8 100644 --- a/source/blender/draw/intern/draw_manager_texture.c +++ b/source/blender/draw/intern/draw_manager_texture.c @@ -26,7 +26,7 @@ /* Maybe gpu_texture.c is a better place for this. */ static bool drw_texture_format_supports_framebuffer(eGPUTextureFormat format) { - /* Some formats do not work with framebuffers. */ + /* Some formats do not work with frame-buffers. */ switch (format) { /* Only add formats that are COMPATIBLE with FB. * Generally they are multiple of 16bit. */ diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 64fa93773b9..24bb58535a5 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -430,7 +430,7 @@ static bool acf_generic_dataexpand_setting_valid(bAnimContext *ac, case ACHANNEL_SETTING_MUTE: return ((ac) && (ac->spacetype == SPACE_NLA)); - /* select is ok for most "ds*" channels (e.g. dsmat) */ + /* Select is ok for most `ds*` channels (e.g. `dsmat`) */ case ACHANNEL_SETTING_SELECT: return true; diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 7afb03b833d..109cf79c786 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -1736,7 +1736,7 @@ static int animchannels_group_exec(bContext *C, wmOperator *op) /* free temp data */ ANIM_animdata_freelist(&anim_data); - /* updatss */ + /* Updates. */ WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); } diff --git a/source/blender/editors/animation/anim_motion_paths.c b/source/blender/editors/animation/anim_motion_paths.c index 088ac9dbcba..bd7d0eed2c9 100644 --- a/source/blender/editors/animation/anim_motion_paths.c +++ b/source/blender/editors/animation/anim_motion_paths.c @@ -331,7 +331,7 @@ static void motionpath_calculate_update_range(MPathTarget *mpt, int fcu_sfra = motionpath_get_prev_prev_keyframe(mpt, &fcu_keys, current_frame); int fcu_efra = motionpath_get_next_next_keyframe(mpt, &fcu_keys, current_frame); - /* Extend range furher, since accelleration compensation propagates even further away. */ + /* Extend range fuhrer, since acceleration compensation propagates even further away. */ if (fcu->auto_smoothing != FCURVE_SMOOTH_NONE) { fcu_sfra = motionpath_get_prev_prev_keyframe(mpt, &fcu_keys, fcu_sfra); fcu_efra = motionpath_get_next_next_keyframe(mpt, &fcu_keys, fcu_efra); diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index db3a1b99135..0d1633ab3a2 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -614,7 +614,7 @@ int insert_vert_fcurve( return -1; } - /* set handletype and interpolation */ + /* Set handle-type and interpolation. */ if ((fcu->totvert > 2) && (flag & INSERTKEY_REPLACE) == 0) { BezTriple *bezt = (fcu->bezt + a); diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index fba88e78162..3d1d8d0d1f1 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -699,11 +699,11 @@ void ED_armature_from_edit(Main *bmain, bArmature *arm) BKE_armature_bonelist_free(&arm->bonebase, true); arm->act_bone = NULL; - /* remove zero sized bones, this gives unstable restposes */ + /* Remove zero sized bones, this gives unstable rest-poses. */ for (eBone = arm->edbo->first; eBone; eBone = neBone) { float len_sq = len_squared_v3v3(eBone->head, eBone->tail); neBone = eBone->next; - /* TODO(sergey): How to ensure this is a constexpr? */ + /* TODO(sergey): How to ensure this is a `constexpr`? */ if (len_sq <= square_f(0.000001f)) { /* FLT_EPSILON is too large? */ EditBone *fBone; diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 3c0b6dacbf6..ae1516dad05 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -422,7 +422,7 @@ static void bvh_callback(void *userdata, int index, const BVHTreeRay *ray, BVHTr } } -/* Raytracing for vertex to bone/vertex visibility */ +/* Ray-tracing for vertex to bone/vertex visibility. */ static void heat_ray_tree_create(LaplacianSystem *sys) { const MLoopTri *looptri = sys->heat.mlooptri; diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index 91893af003f..78bce8679bb 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -149,7 +149,7 @@ bool ED_object_posemode_exit(bContext *C, Object *ob) return ok; } -/* if a selected or active bone is protected, throw error (oonly if warn == 1) and return 1 */ +/* if a selected or active bone is protected, throw error (only if warn == 1) and return 1 */ /* only_selected == 1: the active bone is allowed to be protected */ #if 0 /* UNUSED 2.5 */ static bool pose_has_protected_selected(Object *ob, short warn) diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c index 55c9877e55f..38d15d8b880 100644 --- a/source/blender/editors/armature/pose_group.c +++ b/source/blender/editors/armature/pose_group.c @@ -423,7 +423,7 @@ static int group_sort_exec(bContext *C, wmOperator *UNUSED(op)) BLI_addtail(&pose->agroups, agrp_array[i].agrp); } - /* fix changed bone group indizes in bones */ + /* Fix changed bone group indices in bones. */ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { for (i = 0; i < agrp_count; i++) { if (pchan->agrp_index == agrp_array[i].index) { diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index 947e2dbf5aa..45f623f3a9d 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -1106,7 +1106,7 @@ static void poselib_keytag_pose(bContext *C, Scene *scene, tPoseLib_PreviewData if (pchan) { if (!any_bone_selected || ((pchan->bone) && (pchan->bone->flag & BONE_SELECTED))) { if (autokey) { - /* add datasource override for the PoseChannel, to be used later */ + /* Add data-source override for the PoseChannel, to be used later. */ ANIM_relative_keyingset_add_source(&dsources, &pld->ob->id, &RNA_PoseBone, pchan); /* clear any unkeyed tags */ @@ -1142,7 +1142,7 @@ static void poselib_preview_apply(bContext *C, wmOperator *op) /* only recalc pose (and its dependencies) if pose has changed */ if (pld->redraw == PL_PREVIEW_REDRAWALL) { - /* don't clear pose if firsttime */ + /* Don't clear pose if first time. */ if ((pld->flag & PL_PREVIEW_FIRSTTIME) == 0) { poselib_backup_restore(pld); } diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index 0b3c3855059..d3d360aa636 100644 --- a/source/blender/editors/armature/pose_slide.c +++ b/source/blender/editors/armature/pose_slide.c @@ -702,7 +702,7 @@ static void pose_slide_apply(bContext *C, tPoseSlideOp *pso) { tPChanFCurveLink *pfl; - /* sanitise the frame ranges */ + /* Sanitize the frame ranges. */ if (pso->prevFrame == pso->nextFrame) { /* move out one step either side */ pso->prevFrame--; @@ -1125,7 +1125,7 @@ static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event) if (event->val == KM_PRESS) { switch (event->type) { /* Transform Channel Limits */ - /* XXX: Replace these hardcoded hotkeys with a modalmap that can be customised */ + /* XXX: Replace these hard-coded hotkeys with a modal-map that can be customized. */ case EVT_GKEY: /* Location */ { pose_slide_toggle_channels_mode(op, pso, PS_TFM_LOC); @@ -1183,7 +1183,7 @@ static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event) } } else { - /* unhandled event - maybe it was some view manip? */ + /* unhandled event - maybe it was some view manipulation? */ /* allow to pass through */ return OPERATOR_RUNNING_MODAL | OPERATOR_PASS_THROUGH; } diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index 3505aea3f40..722865cc942 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -225,7 +225,7 @@ static void applyarmature_process_selected_recursive(bArmature *arm, ApplyArmature_ParentState new_pstate = {.bone = bone}; if (BLI_findptr(selected, pchan, offsetof(CollectionPointerLink, ptr.data))) { - /* SELECTED BONE: Snap to final pose transform minus unapplied parent effects. + /* SELECTED BONE: Snap to final pose transform minus un-applied parent effects. * * I.e. bone position with accumulated parent effects but no local * transformation will match the original final pose_mat. diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c index 2a6dc9f406b..7e6da7f96b0 100644 --- a/source/blender/editors/armature/pose_utils.c +++ b/source/blender/editors/armature/pose_utils.c @@ -312,7 +312,7 @@ void poseAnim_mapping_autoKeyframe(bContext *C, Scene *scene, ListBase *pfLinks, continue; } - /* add datasource override for the PoseChannel, to be used later */ + /* Add data-source override for the PoseChannel, to be used later. */ ANIM_relative_keyingset_add_source(&dsources, &pfl->ob->id, &RNA_PoseBone, pchan); /* clear any unkeyed tags */ diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index c09bf41e152..1820c2f133c 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -433,7 +433,7 @@ void UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3], * (for anything fancy use UI_GetThemeColor[Fancy] then BLF_color) */ void UI_FontThemeColor(int fontid, int colorid); -/* clear the framebuffer using the input colorid */ +/* Clear the frame-buffer using the input colorid. */ void UI_ThemeClearColor(int colorid); /* internal (blender) usage only, for init and set active */ diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 4f70d68f495..10cbc2dc5fa 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1422,10 +1422,10 @@ static bool ui_but_event_property_operator_string(const bContext *C, // printf("prop shortcut: '%s' (%s)\n", RNA_property_identifier(prop), data_path); } - /* we have a datapath! */ + /* We have a data-path! */ bool found = false; if (data_path || (prop_enum_value_ok && prop_enum_value_id)) { - /* create a property to host the "datapath" property we're sending to the operators */ + /* Create a property to host the "data_path" property we're sending to the operators. */ IDProperty *prop_path; const IDPropertyTemplate val = {0}; @@ -1945,7 +1945,7 @@ void ui_fontscale(short *points, float aspect) } } -/* project button or block (but==NULL) to pixels in regionspace */ +/* Project button or block (but==NULL) to pixels in region-space. */ static void ui_but_to_pixelrect(rcti *rect, const ARegion *region, uiBlock *block, uiBut *but) { rctf rectf; @@ -4024,7 +4024,7 @@ static uiBut *ui_def_but(uiBlock *block, but->emboss = block->emboss; but->pie_dir = UI_RADIAL_NONE; - but->block = block; /* pointer back, used for frontbuffer status, and picker */ + but->block = block; /* pointer back, used for front-buffer status, and picker. */ if ((block->flag & UI_BUT_ALIGN) && ui_but_can_align(but)) { but->alignnr = block->alignnr; @@ -4747,7 +4747,7 @@ static int findBitIndex(uint x) return idx; } -/* autocomplete helper functions */ +/* Auto-complete helper functions. */ struct AutoComplete { size_t maxlen; int matches; diff --git a/source/blender/editors/interface/interface_context_menu.c b/source/blender/editors/interface/interface_context_menu.c index 85730d138ac..53a04ec9db5 100644 --- a/source/blender/editors/interface/interface_context_menu.c +++ b/source/blender/editors/interface/interface_context_menu.c @@ -953,7 +953,7 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but) } } - /* If the button reprents an id, it can set the "id" context pointer. */ + /* If the button represents an id, it can set the "id" context pointer. */ if (U.experimental.use_asset_browser && ED_asset_can_make_single_from_context(C)) { ID *id = CTX_data_pointer_get_type(C, "id", &RNA_ID).data; diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index 0bae57f14d3..d10cdc207c2 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -355,7 +355,7 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(region), GPU_blend(GPU_BLEND_NONE); # if 0 - /* restore scissortest */ + /* Restore scissor-test. */ GPU_scissor(scissor[0], scissor[1], scissor[2], scissor[3]); # endif @@ -1410,7 +1410,7 @@ void ui_draw_but_UNITVEC(uiBut *but, const uiWidgetColors *wcol, const rcti *rec GPU_batch_uniform_3fv(sphere, "light", light); GPU_batch_draw(sphere); - /* restore */ + /* Restore. */ GPU_face_culling(GPU_CULL_NONE); /* AA circle */ @@ -1740,7 +1740,7 @@ void ui_draw_but_CURVE(ARegion *region, uiBut *but, const uiWidgetColors *wcol, immEnd(); immUnbindProgram(); - /* restore scissortest */ + /* Restore scissor-test. */ GPU_scissor(scissor[0], scissor[1], scissor[2], scissor[3]); /* outline */ @@ -2030,7 +2030,7 @@ void ui_draw_but_CURVEPROFILE(ARegion *region, } immUnbindProgram(); - /* restore scissortest */ + /* Restore scissor-test. */ GPU_scissor(scissor[0], scissor[1], scissor[2], scissor[3]); /* Outline */ diff --git a/source/blender/editors/interface/interface_eyedropper_depth.c b/source/blender/editors/interface/interface_eyedropper_depth.c index ead65a62226..e71a0b9196c 100644 --- a/source/blender/editors/interface/interface_eyedropper_depth.c +++ b/source/blender/editors/interface/interface_eyedropper_depth.c @@ -66,9 +66,9 @@ typedef struct DepthDropper { bool is_undo; bool is_set; - float init_depth; /* for resetting on cancel */ + float init_depth; /* For resetting on cancel. */ - bool accum_start; /* has mouse been presed */ + bool accum_start; /* Has mouse been pressed. */ float accum_depth; int accum_tot; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 9ee625fc02e..ba96b3ce31f 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -349,7 +349,7 @@ typedef struct uiHandleButtonData { #endif ColorBand *coba; - /* tooltip */ + /* Tool-tip. */ uint tooltip_force : 1; /* auto open */ @@ -1617,7 +1617,7 @@ static int ui_handler_region_drag_toggle(bContext *C, const wmEvent *event, void static bool ui_but_is_drag_toggle(const uiBut *but) { return ((ui_drag_toggle_but_is_supported(but) == true) && - /* menu check is importnt so the button dragged over isn't removed instantly */ + /* Menu check is important so the button dragged over isn't removed instantly. */ (ui_block_is_menu(but->block) == false)); } @@ -3710,9 +3710,9 @@ static void ui_do_but_textedit( case EVT_AKEY: - /* Ctrl + A: Select all */ + /* Ctrl-A: Select all. */ #if defined(__APPLE__) - /* OSX uses cmd-a systemwide, so add it */ + /* OSX uses Command-A system-wide, so add it. */ if ((event->oskey && !IS_EVENT_MOD(event, shift, alt, ctrl)) || (event->ctrl && !IS_EVENT_MOD(event, shift, alt, oskey))) #else @@ -3726,7 +3726,7 @@ static void ui_do_but_textedit( break; case EVT_TABKEY: - /* there is a key conflict here, we can't tab with autocomplete */ + /* There is a key conflict here, we can't tab with auto-complete. */ if (but->autocomplete_func || data->searchbox) { const int autocomplete = ui_textedit_autocomplete(C, but, data); changed = autocomplete != AUTOCOMPLETE_NO_MATCH; @@ -4575,7 +4575,7 @@ static int ui_do_but_TOG(bContext *C, uiBut *but, uiHandleButtonData *data, cons return WM_UI_HANDLER_BREAK; } if (ELEM(event->type, MOUSEPAN, WHEELDOWNMOUSE, WHEELUPMOUSE) && event->ctrl) { - /* Support ctrl-wheel to cycle values on expanded enum rows. */ + /* Support Ctrl-Wheel to cycle values on expanded enum rows. */ if (but->type == UI_BTYPE_ROW) { int type = event->type; int val = event->val; @@ -5086,7 +5086,7 @@ static int ui_do_but_NUM( else if (event->type == LEFTMOUSE && event->val == KM_RELEASE) { if (data->dragchange) { #ifdef USE_DRAG_MULTINUM - /* if we started multibutton but didn't drag, then edit */ + /* If we started multi-button but didn't drag, then edit. */ if (data->multi_data.init == BUTTON_MULTI_INIT_SETUP) { click = 1; } @@ -5408,7 +5408,7 @@ static int ui_do_but_SLI( else if (event->type == LEFTMOUSE && event->val == KM_RELEASE) { if (data->dragchange) { #ifdef USE_DRAG_MULTINUM - /* if we started multibutton but didn't drag, then edit */ + /* If we started multi-button but didn't drag, then edit. */ if (data->multi_data.init == BUTTON_MULTI_INIT_SETUP) { click = 1; } @@ -7822,7 +7822,7 @@ static void ui_blocks_set_tooltips(ARegion *region, const bool enable) } /** - * Recreate tooltip (use to update dynamic tips) + * Recreate tool-tip (use to update dynamic tips) */ void UI_but_tooltip_refresh(bContext *C, uiBut *but) { @@ -7921,7 +7921,7 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s return; } - /* highlight has timers for tooltips and auto open */ + /* Highlight has timers for tool-tips and auto open. */ if (state == BUTTON_STATE_HIGHLIGHT) { but->flag &= ~UI_SELECT; @@ -8261,7 +8261,7 @@ static void button_activate_exit( } } - /* disable tooltips until mousemove + last active flag */ + /* Disable tool-tips until mouse-move + last active flag. */ LISTBASE_FOREACH (uiBlock *, block_iter, &data->region->uiblocks) { LISTBASE_FOREACH (uiBut *, bt, &block_iter->buttons) { bt->flag &= ~UI_BUT_LAST_ACTIVE; @@ -8349,7 +8349,7 @@ static uiBut *ui_context_button_active(const ARegion *region, bool (*but_check_c but_found = activebut; - /* recurse into opened menu, like colorpicker case */ + /* Recurse into opened menu, like color-picker case. */ if (data && data->menu && (region != data->menu->region)) { region = data->menu->region; } @@ -8531,7 +8531,7 @@ void UI_context_update_anim_flag(const bContext *C) } if (activebut) { - /* always recurse into opened menu, so all buttons update (like colorpicker) */ + /* Always recurse into opened menu, so all buttons update (like color-picker). */ uiHandleButtonData *data = activebut->active; if (data && data->menu) { region = data->menu->region; @@ -8573,7 +8573,8 @@ static int ui_handle_button_over(bContext *C, const wmEvent *event, ARegion *reg button_activate_init(C, region, but, BUTTON_ACTIVATE_OVER); if (event->alt && but->active) { - /* display tooltips if holding alt on mouseover when tooltips are off in prefs */ + /* Display tool-tips if holding Alt on mouse-over when tool-tips are disabled in the + * preferences. */ but->active->tooltip_force = true; } } @@ -8795,7 +8796,7 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but) button_activate_state(C, but, BUTTON_STATE_EXIT); } else if (event->x != event->prevx || event->y != event->prevy) { - /* re-enable tooltip on mouse move */ + /* Re-enable tool-tip on mouse move. */ ui_blocks_set_tooltips(region, true); button_tooltip_timer_reset(C, but); } @@ -8819,7 +8820,7 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but) break; } /* XXX hardcoded keymap check... but anyway, - * while view changes, tooltips should be removed */ + * while view changes, tool-tips should be removed */ case WHEELUPMOUSE: case WHEELDOWNMOUSE: case MIDDLEMOUSE: @@ -9522,7 +9523,7 @@ static int ui_handle_menu_button(bContext *C, const wmEvent *event, uiPopupBlock /* pass, skip for dialogs */ } else if (!ui_region_contains_point_px(but->active->region, event->x, event->y)) { - /* pass, needed to click-exit outside of non-flaoting menus */ + /* Pass, needed to click-exit outside of non-floating menus. */ ui_region_auto_open_clear(but->active->region); } else if ((!ELEM(event->type, MOUSEMOVE, WHEELUPMOUSE, WHEELDOWNMOUSE, MOUSEPAN)) && @@ -10144,7 +10145,7 @@ static int ui_handle_menu_event(bContext *C, ui_mouse_motion_towards_check(block, menu, &event->x, is_parent_inside == false); - /* check for all parent rects, enables arrowkeys to be used */ + /* Check for all parent rects, enables arrow-keys to be used. */ for (saferct = block->saferct.first; saferct; saferct = saferct->next) { /* for mouse move we only check our own rect, for other * events we check all preceding block rects too to make @@ -10418,7 +10419,7 @@ static int ui_pie_handler(bContext *C, const wmEvent *event, uiPopupBlockHandle } } - /* check pie velociy here if gesture has ended */ + /* Check pie velocity here if gesture has ended. */ if (block->pie_data.flags & UI_PIE_GESTURE_END_WAIT) { float len_sq = 10; @@ -10744,7 +10745,7 @@ static int ui_region_handler(bContext *C, const wmEvent *event, void *UNUSED(use } } - /* re-enable tooltips */ + /* Re-enable tool-tips. */ if (event->type == MOUSEMOVE && (event->x != event->prevx || event->y != event->prevy)) { ui_blocks_set_tooltips(region, true); } @@ -10841,7 +10842,7 @@ static int ui_handler_region_menu(bContext *C, const wmEvent *event, void *UNUSE } } - /* re-enable tooltips */ + /* Re-enable tool-tips. */ if (event->type == MOUSEMOVE && (event->x != event->prevx || event->y != event->prevy)) { ui_blocks_set_tooltips(region, true); } @@ -10935,7 +10936,7 @@ static int ui_popup_handler(bContext *C, const wmEvent *event, void *userdata) WM_event_add_mousemove(win); } else { - /* re-enable tooltips */ + /* Re-enable tool-tips */ if (event->type == MOUSEMOVE && (event->x != event->prevx || event->y != event->prevy)) { ui_blocks_set_tooltips(menu->region, true); } @@ -10945,7 +10946,7 @@ static int ui_popup_handler(bContext *C, const wmEvent *event, void *userdata) ui_apply_but_funcs_after(C); if (reset_pie) { - /* reaqcuire window in case pie invalidates it somehow */ + /* Reacquire window in case pie invalidates it somehow. */ wmWindow *win = CTX_wm_window(C); if (win) { diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index f4e68ca3909..6a921f3f541 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -525,7 +525,7 @@ struct uiBlock { /** for doing delayed */ int bounds, minbounds; - /** pulldowns, to detect outside, can differ per case how it is created */ + /** pull-downs, to detect outside, can differ per case how it is created. */ rctf safety; /** uiSafetyRct list */ ListBase saferct; @@ -659,7 +659,7 @@ void ui_block_cm_to_display_space_v3(uiBlock *block, float pixel[3]); /* interface_regions.c */ struct uiKeyNavLock { - /* set when we're using keyinput */ + /* Set when we're using key-input. */ bool is_keynav; /* only used to check if we've moved the cursor */ int event_xy[2]; @@ -756,7 +756,7 @@ uiBlock *ui_block_func_COLOR(struct bContext *C, uiPopupBlockHandle *handle, voi ColorPicker *ui_block_colorpicker_create(struct uiBlock *block); /* interface_region_search.c */ -/* Searchbox for string button */ +/* Search-box for string button. */ struct ARegion *ui_searchbox_create_generic(struct bContext *C, struct ARegion *butregion, uiButSearch *search_but); diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 3281b8de920..fef243d7193 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -2642,7 +2642,7 @@ void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname static void search_id_collection(StructRNA *ptype, PointerRNA *r_ptr, PropertyRNA **r_prop) { /* look for collection property in Main */ - /* Note: using global Main is OK-ish here, UI shall not access other Mains anyay... */ + /* NOTE: using global Main is OK-ish here, UI shall not access other Mains anyway. */ RNA_main_pointer_create(G_MAIN, r_ptr); *r_prop = NULL; @@ -2821,7 +2821,7 @@ void ui_item_menutype_func(bContext *C, uiLayout *layout, void *arg_mt) UI_menutype_draw(C, mt, layout); - /* menus are created flipped (from event handling pov) */ + /* Menus are created flipped (from event handling point of view). */ layout->root->block->flag ^= UI_BLOCK_IS_FLIP; } diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index e5aa0665a16..05a2a6ef29b 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -901,7 +901,7 @@ bool UI_context_copy_to_selected_list(bContext *C, MEM_freeN(link); } else { - /* avoid prepending 'data' to the path */ + /* Avoid prepending 'data' to the path. */ RNA_id_pointer_create(id_data, &link->ptr); } diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index b4af63b6f4d..9a13918bb69 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1339,7 +1339,7 @@ void ui_draw_aligned_panel(const uiStyle *style, { const Panel *panel = block->panel; - /* Add 0.001f to prevent flicker frpm float inaccuracy. */ + /* Add 0.001f to prevent flicker from float inaccuracy. */ const rcti header_rect = { rect->xmin, rect->xmax, @@ -2366,7 +2366,7 @@ static int ui_handle_panel_category_cycling(const wmEvent *event, PanelCategoryDyn *pc_dyn = UI_panel_category_find(region, category); if (LIKELY(pc_dyn)) { if (is_mousewheel) { - /* We can probably get rid of this and only allow ctrl-tabbing. */ + /* We can probably get rid of this and only allow Ctrl-Tabbing. */ pc_dyn = (event->type == WHEELDOWNMOUSE) ? pc_dyn->next : pc_dyn->prev; } else { diff --git a/source/blender/editors/interface/interface_region_menu_pie.c b/source/blender/editors/interface/interface_region_menu_pie.c index d047d5421d7..81c627816b9 100644 --- a/source/blender/editors/interface/interface_region_menu_pie.c +++ b/source/blender/editors/interface/interface_region_menu_pie.c @@ -392,7 +392,7 @@ void ui_pie_menu_level_create(uiBlock *block, EnumPropertyItem *remaining = MEM_mallocN(array_size + sizeof(EnumPropertyItem), "pie_level_item_array"); memcpy(remaining, items + totitem_parent, array_size); - /* a NULL terminating sentinal element is required */ + /* A NULL terminating sentinel element is required. */ memset(&remaining[totitem_remain], 0, sizeof(EnumPropertyItem)); /* yuk, static... issue is we can't reliably free this without doing dangerous changes */ diff --git a/source/blender/editors/interface/interface_region_popup.c b/source/blender/editors/interface/interface_region_popup.c index 62b8ce9d3eb..3228e9741bb 100644 --- a/source/blender/editors/interface/interface_region_popup.c +++ b/source/blender/editors/interface/interface_region_popup.c @@ -539,7 +539,7 @@ static void ui_popup_block_remove(bContext *C, uiPopupBlockHandle *handle) CTX_wm_window_set(C, win); ui_region_temp_remove(C, screen, handle->region); - /* Reset context (area and region were NULL'ed when chaning context window). */ + /* Reset context (area and region were NULL'ed when changing context window). */ CTX_wm_window_set(C, ctx_win); CTX_wm_area_set(C, ctx_area); CTX_wm_region_set(C, ctx_region); diff --git a/source/blender/editors/interface/interface_region_search.c b/source/blender/editors/interface/interface_region_search.c index d5a9a94b8ae..d1d4290bd11 100644 --- a/source/blender/editors/interface/interface_region_search.c +++ b/source/blender/editors/interface/interface_region_search.c @@ -289,7 +289,7 @@ int ui_searchbox_find_index(ARegion *region, const char *name) return UI_search_items_find_index(&data->items, name); } -/* x and y in screencoords */ +/* x and y in screen-coords. */ bool ui_searchbox_inside(ARegion *region, int x, int y) { uiSearchboxData *data = region->regiondata; @@ -1060,7 +1060,7 @@ void ui_but_search_refresh(uiButSearch *search_but) ui_searchbox_update_fn(but->block->evil_C, search_but, but->drawstr, items); - /* only redalert when we are sure of it, this can miss cases when >10 matches */ + /* Only red-alert when we are sure of it, this can miss cases when >10 matches. */ if (items->totitem == 0) { UI_but_flag_enable(but, UI_BUT_REDALERT); } diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 8127a32b271..cf0c1444d4d 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -349,7 +349,7 @@ static bool id_search_allows_id(TemplateID *template_ui, const int flag, ID *id, } } - /* Hide dot-datablocks, but only if filter does not force them visible. */ + /* Hide dot prefixed data-blocks, but only if filter does not force them visible. */ if (U.uiflag & USER_HIDE_DOT) { if ((id->name[2] == '.') && (query[0] != '.')) { return false; @@ -923,7 +923,7 @@ static void template_ID(const bContext *C, idfrom = template_ui->ptr.owner_id; // lb = template_ui->idlb; - /* Allow opertators to take the ID from context. */ + /* Allow operators to take the ID from context. */ uiLayoutSetContextPointer(layout, "id", &idptr); block = uiLayoutGetBlock(layout); @@ -934,7 +934,7 @@ static void template_ID(const bContext *C, } if (text) { - /* Add label resepecting the separated layout property split state. */ + /* Add label respecting the separated layout property split state. */ uiItemL_respect_property_split(layout, text, ICON_NONE); } diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 0c3448b987d..8b185f5dc20 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -1311,7 +1311,7 @@ static void widgetbase_draw_ex(uiWidgetBase *wtb, tria_col[3] = wcol->item[3]; } - /* Draw everything in one drawcall */ + /* Draw everything in one draw-call. */ if (inner_col1[3] || inner_col2[3] || outline_col[3] || emboss_col[3] || tria_col[3] || show_alpha_checkers) { widgetbase_set_uniform_colors_ubv( @@ -2349,7 +2349,7 @@ static void widget_draw_text_icon(const uiFontStyle *fstyle, int icon_size = BLI_rcti_size_y(rect); int text_size = 0; - /* This is a bit britle, but avoids adding an 'UI_BUT_HAS_LABEL' flag to but... */ + /* This is a bit brittle, but avoids adding an 'UI_BUT_HAS_LABEL' flag to but... */ if (icon_size > BLI_rcti_size_x(rect)) { /* button is not square, it has extra height for label */ text_size = UI_UNIT_Y; @@ -3614,7 +3614,7 @@ static void widget_scroll( rect1.xmin = rect1.xmin + ceilf(fac * (value - but->softmin)); rect1.xmax = rect1.xmin + ceilf(fac * (but->a1 - but->softmin)); - /* ensure minimium size */ + /* Ensure minimum size. */ const float min = BLI_rcti_size_y(rect); if (BLI_rcti_size_x(&rect1) < min) { @@ -3631,7 +3631,7 @@ static void widget_scroll( rect1.ymax = rect1.ymax - ceilf(fac * (value - but->softmin)); rect1.ymin = rect1.ymax - ceilf(fac * (but->a1 - but->softmin)); - /* ensure minimium size */ + /* Ensure minimum size. */ const float min = BLI_rcti_size_x(rect); if (BLI_rcti_size_y(&rect1) < min) { @@ -3668,7 +3668,7 @@ static void widget_progressbar( const float offs = wcol->roundness * BLI_rcti_size_y(&rect_prog); float w = value * BLI_rcti_size_x(&rect_prog); - /* ensure minimium size */ + /* Ensure minimum size. */ w = MAX2(w, offs); rect_bar.xmax = rect_bar.xmin + w; diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 4e642137d2a..6c5e672c6bf 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -2224,7 +2224,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, const wmEvent * scroller_activate_init(C, op, event, in_scroller); v2dScrollerMove *vsm = (v2dScrollerMove *)op->customdata; - /* support for quick jump to location - gtk and qt do this on linux */ + /* Support for quick jump to location - GTK and QT do this on Linux. */ if (event->type == MIDDLEMOUSE) { switch (vsm->scroller) { case 'h': /* horizontal scroller - so only horizontal movement diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c index 8ea3c883433..644aa3903f6 100644 --- a/source/blender/editors/mesh/editmesh_bevel.c +++ b/source/blender/editors/mesh/editmesh_bevel.c @@ -575,7 +575,7 @@ static void edbm_bevel_mouse_set_value(wmOperator *op, const wmEvent *event) opdata->shift_value[vmode] = -1.0f; } - /* clamp accordingto value mode, and store value back */ + /* Clamp according to value mode, and store value back. */ CLAMP(value, value_clamp_min[vmode], value_clamp_max[vmode]); if (vmode == SEGMENTS_VALUE) { opdata->segments = value; diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 379140a821a..1f894ec0f1d 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -210,7 +210,7 @@ typedef struct KnifeTool_OpData { /* run by the UI or not */ bool is_interactive; - /* operatpr options */ + /* Operator options. */ bool cut_through; /* preference, can be modified at runtime (that feature may go) */ bool only_select; /* set on initialization */ bool select_result; /* set on initialization */ diff --git a/source/blender/editors/mesh/editmesh_mask_extract.c b/source/blender/editors/mesh/editmesh_mask_extract.c index 3e0bee3c4b8..7d849c096e7 100644 --- a/source/blender/editors/mesh/editmesh_mask_extract.c +++ b/source/blender/editors/mesh/editmesh_mask_extract.c @@ -81,7 +81,7 @@ typedef struct GeometryExtactParams { /* For extracting Mask. */ float mask_threshold; - /* Common paramenters. */ + /* Common parameters. */ bool add_boundary_loop; int num_smooth_iterations; bool apply_shrinkwrap; @@ -106,7 +106,7 @@ static int geometry_extract_apply(bContext *C, BKE_sculpt_mask_layers_ensure(ob, NULL); - /* Ensures that deformation from sculpt mode is taken into accunt before duplicating the mesh to + /* Ensures that deformation from sculpt mode is taken into account before duplicating the mesh to * extract the geometry. */ CTX_data_ensure_evaluated_depsgraph(C); @@ -385,7 +385,7 @@ static int face_set_extract_modal(bContext *C, wmOperator *op, const wmEvent *ev ED_workspace_status_text(C, NULL); /* This modal operator uses and eyedropper to pick a Face Set from the mesh. This ensures - * that the mouse clicked in a viewport region and its coordinates can be used to raycast + * that the mouse clicked in a viewport region and its coordinates can be used to ray-cast * the PBVH and update the active Face Set ID. */ bScreen *screen = CTX_wm_screen(C); ARegion *region = BKE_screen_find_main_region_at_xy( diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 0c68bb8f82b..c8449644dd0 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -2205,7 +2205,7 @@ void EDBM_selectmode_set(BMEditMesh *em) } } else if (em->selectmode & SCE_SELECT_FACE) { - /* deselect eges, and select again based on face select */ + /* Deselect edges, and select again based on face select. */ BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) { BM_edge_select_set(em->bm, eed, false); } @@ -2247,7 +2247,7 @@ void EDBM_selectmode_convert(BMEditMesh *em, /* first tag-to-select, then select --- this avoids a feedback loop */ - /* have to find out what the selectionmode was previously */ + /* Have to find out what the selection-mode was previously. */ if (selectmode_old == SCE_SELECT_VERTEX) { if (bm->totvertsel == 0) { /* pass */ diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 84f4e35cb0c..d37fccc9f15 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -4010,7 +4010,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) short numcuts = 1; const short mode = RNA_int_get(op->ptr, "type"); - /* allocd vars */ + /* Allocated variables. */ float(*screen_vert_coords)[2], (*sco)[2], (*mouse_path)[2]; /* edit-object needed for matrix, and region->regiondata for projections to work */ diff --git a/source/blender/editors/mesh/editmesh_undo.c b/source/blender/editors/mesh/editmesh_undo.c index 83de760aaa0..d7f7cfa2888 100644 --- a/source/blender/editors/mesh/editmesh_undo.c +++ b/source/blender/editors/mesh/editmesh_undo.c @@ -171,7 +171,7 @@ static void um_arraystore_cd_compact(struct CustomData *cdata, else { bcd_reference_current = NULL; - /* do a full lookup when un-alligned */ + /* Do a full lookup when unaligned. */ if (bcd_reference) { const BArrayCustomData *bcd_iter = bcd_reference; while (bcd_iter) { diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 3b5897de0b0..3450d61337c 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -145,7 +145,7 @@ static void join_mesh_single(Depsgraph *depsgraph, if (ob_src != ob_dst) { float cmat[4][4]; - /* watch this: switch matmul order really goes wrong */ + /* Watch this: switch matrix multiplication order really goes wrong. */ mul_m4_m4m4(cmat, imat, ob_src->obmat); /* transform vertex coordinates into new space */ @@ -733,7 +733,7 @@ int ED_mesh_join_objects_exec(bContext *C, wmOperator *op) BKE_key_sort(key); } - /* Due to dependnecy cycle some other object might access old derived data. */ + /* Due to dependency cycle some other object might access old derived data. */ BKE_object_free_derived_caches(ob); DEG_relations_tag_update(bmain); /* removed objects, need to rebuild dag */ diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 9ab5eafa84d..2d3505fa9d0 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1711,9 +1711,8 @@ static int object_speaker_add_exec(bContext *C, wmOperator *op) Object *ob = ED_object_add_type(C, OB_SPEAKER, NULL, loc, rot, false, local_view_bits); const bool is_liboverride = ID_IS_OVERRIDE_LIBRARY(ob); - /* to make it easier to start using this immediately in NLA, a default sound clip is created - * ready to be moved around to retime the sound and/or make new sound clips - */ + /* To make it easier to start using this immediately in NLA, a default sound clip is created + * ready to be moved around to re-time the sound and/or make new sound clips. */ { /* create new data for NLA hierarchy */ AnimData *adt = BKE_animdata_add_id(&ob->id); diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index db9e51a490d..b1ba856ff0f 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -1339,7 +1339,7 @@ static int bake(const BakeAPIRender *bkr, highpoly[i].ob_eval->base_flag |= (BASE_VISIBLE_DEPSGRAPH | BASE_ENABLED_RENDER); highpoly[i].me = BKE_mesh_new_from_object(NULL, highpoly[i].ob_eval, false); - /* lowpoly to highpoly transformation matrix */ + /* Low-poly to high-poly transformation matrix. */ copy_m4_m4(highpoly[i].obmat, highpoly[i].ob->obmat); invert_m4_m4(highpoly[i].imat, highpoly[i].obmat); diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c index 4cbb8858bf4..a80810cc734 100644 --- a/source/blender/editors/object/object_data_transfer.c +++ b/source/blender/editors/object/object_data_transfer.c @@ -65,7 +65,7 @@ static const EnumPropertyItem DT_layer_items[] = { 0, "Vertex Group(s)", "Transfer active or all vertex groups"}, -#if 0 /* XXX For now, would like to finish/merge work from 2014 gsoc first. */ +#if 0 /* XXX For now, would like to finish/merge work from 2014 GSOC first. */ {DT_TYPE_SHAPEKEY, "SHAPEKEYS", 0, "Shapekey(s)", "Transfer active or all shape keys"}, #endif /* XXX When SkinModifier is enabled, diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 6350ffb9c77..7e0e52d3874 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -3024,7 +3024,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op) i++; } - /* make a copy of ocean to use for baking - threadsafety */ + /* Make a copy of ocean to use for baking - thread-safety. */ struct Ocean *ocean = BKE_ocean_add(); BKE_ocean_init_from_modifier(ocean, omd, omd->resolution); diff --git a/source/blender/editors/object/object_remesh.c b/source/blender/editors/object/object_remesh.c index d560d347217..f55ce88b426 100644 --- a/source/blender/editors/object/object_remesh.c +++ b/source/blender/editors/object/object_remesh.c @@ -327,7 +327,7 @@ static void voxel_size_edit_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), const float total_len = len_v3v3(cd->preview_plane[0], cd->preview_plane[1]); const int tot_lines = (int)(total_len / cd->voxel_size); - /* Smoothstep to reduce the alpha of the grid as the line number increases. */ + /* Smooth-step to reduce the alpha of the grid as the line number increases. */ const float a = VOXEL_SIZE_EDIT_MAX_GRIDS_LINES * 0.1f; const float b = VOXEL_SIZE_EDIT_MAX_GRIDS_LINES; const float x = clamp_f((tot_lines - a) / (b - a), 0.0f, 1.0); @@ -738,7 +738,7 @@ static int quadriflow_break_job(void *customdata) return should_break; } -/* called by oceanbake, wmJob sends notifier */ +/** Called by ocean-bake, #wmJob sends notifier. */ static void quadriflow_update_job(void *customdata, float progress, int *cancel) { QuadriFlowJob *qj = customdata; @@ -982,7 +982,7 @@ static int quadriflow_remesh_exec(bContext *C, wmOperator *op) quadriflow_free_job(job); } else { - /* Non blocking call. For when the operator has been called from the gui */ + /* Non blocking call. For when the operator has been called from the GUI. */ job->is_nonblocking_job = true; wmJob *wm_job = WM_jobs_get(CTX_wm_manager(C), diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 50dac12ab57..1e6a7b9f14e 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -317,7 +317,7 @@ bool ED_object_jump_to_object(bContext *C, Object *ob, const bool UNUSED(reveal_ /** * Select and make the target object and bone active. * Switches to Pose mode if in Object mode so the selection is visible. - * Unhides the target bone and bone layer if necessary. + * Un-hides the target bone and bone layer if necessary. * * \returns false if object not in layer, bone not found, or other error */ diff --git a/source/blender/editors/object/object_warp.c b/source/blender/editors/object/object_warp.c index b36a8543d67..8f5a60ace2e 100644 --- a/source/blender/editors/object/object_warp.c +++ b/source/blender/editors/object/object_warp.c @@ -75,7 +75,7 @@ static void object_warp_transverts_minmax_x(TransVertStore *tvs, for (int i = 0; i < tvs->transverts_tot; i++, tv++) { float val; - /* convert objectspace->viewspace */ + /* Convert object-space to view-space. */ val = dot_m4_v3_row_x(mat_view, tv->loc); min = min_ff(min, val); @@ -123,7 +123,7 @@ static void object_warp_transverts(TransVertStore *tvs, float co[3], co_add[2]; float val, phi; - /* convert objectspace->viewspace */ + /* Convert object-space to view-space. */ mul_v3_m4v3(co, mat_view, tv->loc); sub_v2_v2(co, center_view); @@ -158,7 +158,7 @@ static void object_warp_transverts(TransVertStore *tvs, add_v2_v2(co, co_add); - /* convert viewspace->objectspace */ + /* Convert view-space to object-space. */ add_v2_v2(co, center_view); mul_v3_m4v3(tv->loc, imat_view, co); } @@ -187,7 +187,7 @@ static int object_warp_verts_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* get viewmatrix */ + /* Get view-matrix. */ { PropertyRNA *prop_viewmat = RNA_struct_find_property(op->ptr, "viewmat"); if (RNA_property_is_set(op->ptr, prop_viewmat)) { diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 3a6201fd418..d7e30f2b65c 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -2905,7 +2905,7 @@ static void remove_tagged_keys(Depsgraph *depsgraph, Object *ob, ParticleSystem } } -/************************ subdivide opertor *********************/ +/************************ subdivide operator *********************/ /* works like normal edit mode subdivide, inserts keys between neighboring selected keys */ static void subdivide_particle(PEData *data, int pa_index) @@ -3029,7 +3029,7 @@ void PARTICLE_OT_subdivide(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -/************************ remove doubles opertor *********************/ +/************************ remove doubles operator *********************/ static int remove_doubles_exec(bContext *C, wmOperator *op) { @@ -4565,7 +4565,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) mval[0] = mouse[0]; mval[1] = mouse[1]; - /* disable locking temporatily for disconnected hair */ + /* Disable locking temporarily for disconnected hair. */ if (edit->psys && edit->psys->flag & PSYS_GLOBAL_HAIR) { pset->flag &= ~PE_LOCK_FIRST; } @@ -5003,7 +5003,7 @@ static int shape_cut_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_CANCELLED; } - /* disable locking temporatily for disconnected hair */ + /* Disable locking temporarily for disconnected hair. */ if (edit->psys && edit->psys->flag & PSYS_GLOBAL_HAIR) { pset->flag &= ~PE_LOCK_FIRST; } diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 10cf4131584..4b84894c23d 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -1098,7 +1098,7 @@ void RENDER_OT_render(wmOperatorType *ot) ot->cancel = screen_render_cancel; ot->exec = screen_render_exec; - /* this isn't needed, causes failer in background mode */ + /* This isn't needed, causes failure in background mode. */ #if 0 ot->poll = ED_operator_screenactive; #endif diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index e30149fde73..4e766841c24 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -1184,7 +1184,7 @@ static void icon_copy_rect(ImBuf *ibuf, uint w, uint h, uint *rect) return; } - /* waste of cpu cyles... but the imbuf API has no other way to scale fast (ton) */ + /* Waste of cpu cycles... but the imbuf API has no other way to scale fast (ton). */ ima = IMB_dupImBuf(ibuf); if (!ima) { diff --git a/source/blender/editors/screen/screen_draw.c b/source/blender/editors/screen/screen_draw.c index 6432bdac1b1..1ea64c542f5 100644 --- a/source/blender/editors/screen/screen_draw.c +++ b/source/blender/editors/screen/screen_draw.c @@ -478,7 +478,7 @@ void ED_screen_draw_split_preview(ScrArea *area, const int dir, const float fac) uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); - /* splitpoint */ + /* Split-point. */ GPU_blend(GPU_BLEND_ALPHA); immUniformColor4ub(255, 255, 255, 100); diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 0868d5a5fe9..c25b572d200 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1024,7 +1024,7 @@ void screen_change_update(bContext *C, wmWindow *win, bScreen *screen) WM_event_add_notifier(C, NC_WINDOW, NULL); WM_event_add_notifier(C, NC_SCREEN | ND_LAYOUTSET, layout); - /* makes button hilites work */ + /* Makes button highlights work. */ WM_event_add_mousemove(win); } @@ -1221,7 +1221,7 @@ void ED_screen_full_restore(bContext *C, ScrArea *area) } /** - * \param toggle_area: If this is set, its space data will be swapped with the one of the new emtpy + * \param toggle_area: If this is set, its space data will be swapped with the one of the new empty * area, when toggling back it can be swapped back again. * \return The newly created screen with the non-normal area. */ diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h index a03e65d8a9d..c51ff559786 100644 --- a/source/blender/editors/screen/screen_intern.h +++ b/source/blender/editors/screen/screen_intern.h @@ -29,10 +29,10 @@ struct bContextDataResult; /* internal exports only */ -#define AZONESPOTW UI_HEADER_OFFSET /* width of corner azone - max */ -#define AZONESPOTH (0.6f * U.widget_unit) /* height of corner azone */ -#define AZONEFADEIN (5.0f * U.widget_unit) /* when azone is totally visible */ -#define AZONEFADEOUT (6.5f * U.widget_unit) /* when we start seeing the azone */ +#define AZONESPOTW UI_HEADER_OFFSET /* width of corner #AZone - max */ +#define AZONESPOTH (0.6f * U.widget_unit) /* height of corner #AZone */ +#define AZONEFADEIN (5.0f * U.widget_unit) /* when #AZone is totally visible */ +#define AZONEFADEOUT (6.5f * U.widget_unit) /* when we start seeing the #AZone */ #define AREAJOINTOLERANCE (1.0f * U.widget_unit) /* Edges must be close to allow joining. */ diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index ca1c75be0a1..244d8c10e4e 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -1637,7 +1637,7 @@ static int area_snap_calc_location(const bScreen *screen, /* Thirds. */ 1.0f / 3.0f, 2.0f / 3.0f, - /* Quaters. */ + /* Quarters. */ 1.0f / 4.0f, 3.0f / 4.0f, /* Eighth. */ diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 550913fc8af..7eb08cbabac 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -1755,7 +1755,7 @@ static void paint_cursor_cursor_draw_3d_view_brush_cursor_active(PaintCursorCont else if (brush->cloth_force_falloff_type == BRUSH_CLOTH_FORCE_FALLOFF_RADIAL && brush->cloth_simulation_area_type == BRUSH_CLOTH_SIMULATION_AREA_LOCAL) { /* Display the simulation limits if sculpting outside them. */ - /* This does not makes much sense of plane falloff as the falloff is infinte or global. */ + /* This does not makes much sense of plane falloff as the falloff is infinite or global. */ if (len_v3v3(ss->cache->true_location, ss->cache->true_initial_location) > ss->cache->radius * (1.0f + brush->cloth_sim_limit)) { diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 27726b8370e..5330e85c732 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -138,7 +138,7 @@ BLI_INLINE uchar f_to_char(const float val) #ifndef PROJ_DEBUG_NOSEAMBLEED /* projectFaceSeamFlags options */ -//#define PROJ_FACE_IGNORE (1<<0) /* When the face is hidden, backfacing or occluded */ +//#define PROJ_FACE_IGNORE (1<<0) /* When the face is hidden, back-facing or occluded. */ //#define PROJ_FACE_INIT (1<<1) /* When we have initialized the faces data */ /* If this face has a seam on any of its edges. */ @@ -150,7 +150,7 @@ BLI_INLINE uchar f_to_char(const float val) # define PROJ_FACE_NOSEAM1 (1 << 5) # define PROJ_FACE_NOSEAM2 (1 << 6) -/* If the seam is completely initialized, including adjecent seams. */ +/* If the seam is completely initialized, including adjacent seams. */ # define PROJ_FACE_SEAM_INIT0 (1 << 8) # define PROJ_FACE_SEAM_INIT1 (1 << 9) # define PROJ_FACE_SEAM_INIT2 (1 << 10) @@ -294,7 +294,7 @@ typedef struct ProjPaintState { /** verts projected into floating point screen space. */ float (*screenCoords)[4]; - /** 2D bounds for mesh verts on the screen's plane (screenspace). */ + /** 2D bounds for mesh verts on the screen's plane (screen-space). */ float screenMin[2]; float screenMax[2]; /** Calculated from screenMin & screenMax. */ @@ -310,10 +310,10 @@ typedef struct ProjPaintState { bool do_stencil_brush; bool do_material_slots; - /** Use raytraced occlusion? - ortherwise will paint right through to the back. */ + /** Use ray-traced occlusion? - otherwise will paint right through to the back. */ bool do_occlude; /** ignore faces with normals pointing away, - * skips a lot of raycasts if your normals are correctly flipped. */ + * skips a lot of ray-casts if your normals are correctly flipped. */ bool do_backfacecull; /** mask out pixels based on their normals. */ bool do_mask_normal; @@ -579,7 +579,7 @@ static Image *project_paint_face_clone_image(const ProjPaintState *ps, int tri_i /* fast projection bucket array lookup, use the safe version for bound checking */ static int project_bucket_offset(const ProjPaintState *ps, const float projCoSS[2]) { - /* If we were not dealing with screenspace 2D coords we could simple do... + /* If we were not dealing with screen-space 2D coords we could simple do... * ps->bucketRect[x + (y*ps->buckets_y)] */ /* please explain? @@ -887,8 +887,8 @@ static int project_paint_occlude_ptv_clip(const float pt[3], return -1; } -/* Check if a screenspace location is occluded by any other faces - * check, pixelScreenCo must be in screenspace, its Z-Depth only needs to be used for comparison +/* Check if a screen-space location is occluded by any other faces + * check, pixelScreenCo must be in screen-space, its Z-Depth only needs to be used for comparison * and doesn't need to be correct in relation to X and Y coords * (this is the case in perspective view) */ static bool project_bucket_point_occluded(const ProjPaintState *ps, @@ -1514,10 +1514,10 @@ static void project_face_seams_init(const ProjPaintState *ps, } #endif // PROJ_DEBUG_NOSEAMBLEED -/* Converts a UV location to a 3D screenspace location +/* Converts a UV location to a 3D screen-space location * Takes a 'uv' and 3 UV coords, and sets the values of pixelScreenCo * - * This is used for finding a pixels location in screenspace for painting */ + * This is used for finding a pixels location in screen-space for painting */ static void screen_px_from_ortho(const float uv[2], const float v1co[3], const float v2co[3], @@ -1537,7 +1537,7 @@ static void screen_px_from_ortho(const float uv[2], static void screen_px_from_persp(const float uv[2], const float v1co[4], const float v2co[4], - const float v3co[4], /* screenspace coords */ + const float v3co[4], /* screen-space coords */ const float uv1co[2], const float uv2co[2], const float uv3co[2], @@ -1923,7 +1923,7 @@ static ProjPixel *project_paint_uvpixel_init(const ProjPaintState *ps, projPixel->newColor.uint = 0; } - /* screenspace unclamped, we could keep its z and w values but don't need them at the moment */ + /* Screen-space unclamped, we could keep its z and w values but don't need them at the moment. */ if (ps->brush->mtex.brush_map_mode == MTEX_MAP_MODE_3D) { copy_v3_v3(projPixel->worldCoSS, world_spaceCo); } @@ -2304,14 +2304,14 @@ static bool project_bucket_isect_circle(const float cent[2], return false; } -/* Note for rect_to_uvspace_ortho() and rect_to_uvspace_persp() +/* Note for #rect_to_uvspace_ortho() and #rect_to_uvspace_persp() * in ortho view this function gives good results when bucket_bounds are outside the triangle * however in some cases, perspective view will mess up with faces - * that have minimal screenspace area (viewed from the side). + * that have minimal screen-space area (viewed from the side). * * for this reason its not reliable in this case so we'll use the Simple Barycentric' - * funcs that only account for points inside the triangle. - * however switching back to this for ortho is always an option */ + * functions that only account for points inside the triangle. + * however switching back to this for ortho is always an option. */ static void rect_to_uvspace_ortho(const rctf *bucket_bounds, const float *v1coSS, @@ -2517,8 +2517,8 @@ static void project_bucket_clip_face(const bool is_ortho, flip = (((line_point_side_v2(v1coSS, v2coSS, v3coSS) > 0.0f) != is_flip_object) != (line_point_side_v2(uv1co, uv2co, uv3co) > 0.0f)); - /* all screenspace points are inside the bucket bounding box, - * this means we don't need to clip and can simply return the UVs */ + /* All screen-space points are inside the bucket bounding box, + * this means we don't need to clip and can simply return the UVs. */ if (flip) { /* facing the back? */ copy_v2_v2(bucket_bounds_uv[0], uv3co); copy_v2_v2(bucket_bounds_uv[1], uv2co); @@ -2635,7 +2635,7 @@ static void project_bucket_clip_face(const bool is_ortho, (line_point_side_v2(uv1co, uv2co, uv3co) > 0.0f)); if (inside_face_flag == ISECT_ALL4) { - /* bucket is totally inside the screenspace face, we can safely use weights */ + /* Bucket is totally inside the screen-space face, we can safely use weights. */ if (is_ortho) { rect_to_uvspace_ortho( @@ -2656,7 +2656,7 @@ static void project_bucket_clip_face(const bool is_ortho, * The 2 cases above are where the face is inside the bucket * or the bucket is inside the face. * - * we need to make a convex polyline from the intersection between the screenspace face + * we need to make a convex poly-line from the intersection between the screen-space face * and the bucket bounds. * * There are a number of ways this could be done, currently it just collects all @@ -2997,7 +2997,7 @@ static void project_paint_face_init(const ProjPaintState *ps, /* vert co screen-space, these will be assigned to lt_vtri[0-2] */ const float *v1coSS, *v2coSS, *v3coSS; - /* vertex screenspace coords */ + /* Vertex screen-space coords. */ const float *vCo[3]; float w[3], wco[3]; @@ -3007,9 +3007,9 @@ static void project_paint_face_init(const ProjPaintState *ps, float pixelScreenCo[4]; bool do_3d_mapping = ps->brush->mtex.brush_map_mode == MTEX_MAP_MODE_3D; - /* ispace bounds */ + /* Image-space bounds. */ rcti bounds_px; - /* vars for getting uvspace bounds */ + /* Variables for getting UV-space bounds. */ /* bucket bounds in UV space so we can init pixels only for this face, */ float lt_uv_pxoffset[3][2]; @@ -3207,10 +3207,10 @@ static void project_paint_face_init(const ProjPaintState *ps, /* inset face coords. NOTE!!! ScreenSace for ortho, Worldspace in perspective view */ float insetCos[3][3]; - /* vertex screenspace coords */ + /* Vertex screen-space coords. */ const float *vCoSS[3]; - /* Store the screenspace coords of the face, + /* Store the screen-space coords of the face, * clipped by the bucket's screen aligned rectangle. */ float bucket_clip_edges[2][2]; float edge_verts_inset_clip[2][3]; @@ -3419,7 +3419,7 @@ static void project_paint_face_init(const ProjPaintState *ps, } /** - * Takes floating point screenspace min/max and + * Takes floating point screen-space min/max and * returns int min/max to be used as indices for ps->bucketRect, ps->bucketFlags */ static void project_paint_bucket_bounds(const ProjPaintState *ps, @@ -3888,7 +3888,7 @@ static void proj_paint_state_cavity_init(ProjPaintState *ps) float no[3]; mul_v3_fl(edges[a], 1.0f / counter[a]); normal_short_to_float_v3(no, mv->no); - /* augment the diffe*/ + /* Augment the difference. */ cavities[a] = saacos(10.0f * dot_v3v3(no, edges[a])) * (float)M_1_PI; } else { @@ -4308,7 +4308,7 @@ static void project_paint_prepare_all_faces(ProjPaintState *ps, slot_last = slot; } - /* don't allow using the same inage for painting and stencilling */ + /* Don't allow using the same image for painting and stenciling. */ if (slot->ima == ps->stencil_ima) { /* Delay continuing the loop until after loop_uvs and bleed faces are initialized. * While this shouldn't be used, face-winding reads all polys. diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c index 8eb2ebd0f19..8fd5759d695 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c @@ -168,8 +168,11 @@ void PAINT_OT_weight_from_bones(wmOperatorType *ot) /** \name Sample Weight Operator * \{ */ -/* sets wp->weight to the closest weight value to vertex */ -/* note: we cant sample frontbuf, weight colors are interpolated too unpredictable */ +/** + * Sets wp->weight to the closest weight value to vertex. + * + * \note we can't sample front-buffer, weight colors are interpolated too unpredictable. + */ static int weight_sample_invoke(bContext *C, wmOperator *op, const wmEvent *event) { Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); @@ -201,7 +204,7 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, const wmEvent *even } else if (ED_mesh_pick_face( C, vc.obact, event->mval, ED_MESH_PICK_DEFAULT_FACE_DIST, &index)) { - /* this relies on knowning the internal worksings of ED_mesh_pick_face_vert() */ + /* This relies on knowing the internal workings of #ED_mesh_pick_face_vert() */ BKE_report( op->reports, RPT_WARNING, "The modifier used does not support deformed locations"); } @@ -604,7 +607,7 @@ static void gradientVert_update(WPGradient_userData *grad_data, int index) Mesh *me = grad_data->me; WPGradient_vertStore *vs = &grad_data->vert_cache->elem[index]; - /* Optionally restrict to assigned verices only. */ + /* Optionally restrict to assigned vertices only. */ if (grad_data->use_vgroup_restrict && ((vs->flag & VGRAD_STORE_DW_EXIST) == 0)) { return; } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 410b83217b4..a53c2efed06 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -8993,7 +8993,7 @@ void SCULPT_fake_neighbors_ensure(Sculpt *sd, Object *ob, const float max_dist) for (int i = 0; i < totvert; i++) { const int from_v = i; - /* This vertex does not have a fake neighbor yet, seach one for it. */ + /* This vertex does not have a fake neighbor yet, search one for it. */ if (ss->fake_neighbors.fake_neighbor_index[from_v] == FAKE_NEIGHBOR_NONE) { const int to_v = SCULPT_fake_neighbor_search(sd, ob, from_v, max_dist); if (to_v != -1) { diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.c b/source/blender/editors/sculpt_paint/sculpt_face_set.c index 1fba958d695..20d8e136d12 100644 --- a/source/blender/editors/sculpt_paint/sculpt_face_set.c +++ b/source/blender/editors/sculpt_paint/sculpt_face_set.c @@ -205,7 +205,7 @@ static void do_relax_face_sets_brush_task_cb_ex(void *__restrict userdata, ss, &test, data->brush->falloff_shape); const bool relax_face_sets = !(ss->cache->iteration_count % 3 == 0); - /* This operations needs a stregth tweak as the relax deformation is too weak by default. */ + /* This operations needs a strength tweak as the relax deformation is too weak by default. */ if (relax_face_sets) { bstrength *= 2.0f; } @@ -313,7 +313,7 @@ static int sculpt_face_set_create_exec(bContext *C, wmOperator *op) const int mode = RNA_enum_get(op->ptr, "mode"); - /* Dyntopo not suported. */ + /* Dyntopo not supported. */ if (BKE_pbvh_type(ss->pbvh) == PBVH_BMESH) { return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c index e11894a8c01..3cf6a8cc561 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_mesh.c @@ -553,7 +553,7 @@ static void mesh_filter_sharpen_init(SculptSession *ss, filter_cache->sharpen_factor[i] = 1.0f - pow2f(1.0f - filter_cache->sharpen_factor[i]); } - /* Smooth the calculated factors and directions to remove high frecuency detail. */ + /* Smooth the calculated factors and directions to remove high frequency detail. */ for (int smooth_iterations = 0; smooth_iterations < filter_cache->sharpen_curvature_smooth_iterations; smooth_iterations++) { diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index d1e17c7e59b..f90cf366ed9 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -511,7 +511,7 @@ void SCULPT_boundary_edges_preview_draw(const uint gpuattr, const float outline_alpha); void SCULPT_boundary_pivot_line_preview_draw(const uint gpuattr, struct SculptSession *ss); -/* Multiplane Scrape Brush. */ +/* Multi-plane Scrape Brush. */ void SCULPT_do_multiplane_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode); void SCULPT_multiplane_scrape_preview_draw(const uint gpuattr, Brush *brush, diff --git a/source/blender/editors/sculpt_paint/sculpt_pose.c b/source/blender/editors/sculpt_paint/sculpt_pose.c index 1bf9ba60073..f9ccbbb849c 100644 --- a/source/blender/editors/sculpt_paint/sculpt_pose.c +++ b/source/blender/editors/sculpt_paint/sculpt_pose.c @@ -738,7 +738,7 @@ static SculptPoseIKChain *pose_ik_chain_init_topology(Sculpt *sd, * iteration an the current iteration. */ for (int j = 0; j < totvert; j++) { ik_chain->segments[i].weights[j] = pose_factor_grow[j] - pose_factor_grow_prev[j]; - /* Store the current grow factor status for the next interation. */ + /* Store the current grow factor status for the next iteration. */ pose_factor_grow_prev[j] = pose_factor_grow[j]; } } diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 34617804888..391bc5dab45 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -877,7 +877,7 @@ static void SOUND_OT_unpack(wmOperatorType *ot) /* properties */ RNA_def_enum( ot->srna, "method", rna_enum_unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack"); - /* XXX, weark!, will fail with library, name collisions */ + /* XXX: weak!, will fail with library, name collisions */ RNA_def_string( ot->srna, "id", NULL, MAX_ID_NAME - 2, "Sound Name", "Sound data-block name to unpack"); } diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index f731fe23b7c..f8389d40831 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -73,7 +73,7 @@ /* ************************************************************************** */ /* POSE MARKERS STUFF */ -/* *************************** Localise Markers ***************************** */ +/* *************************** Localize Markers ***************************** */ /* ensure that there is: * 1) an active action editor @@ -322,7 +322,7 @@ static bool actkeys_channels_get_selected_extents(bAnimContext *ac, float *min, bAnimListElem *ale; int filter; - /* NOTE: not bool, since we want prioritise individual channels over expanders */ + /* NOTE: not bool, since we want prioritize individual channels over expanders. */ short found = 0; /* get all items - we need to do it this way */ @@ -346,7 +346,7 @@ static bool actkeys_channels_get_selected_extents(bAnimContext *ac, float *min, found = acf->channel_role; /* only stop our search when we've found an actual channel - * - datablock expanders get less priority so that we don't abort prematurely + * - data-block expanders get less priority so that we don't abort prematurely */ if (found == ACHANNEL_ROLE_CHANNEL) { break; diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c index 01e57eab7c2..817760615df 100644 --- a/source/blender/editors/space_api/spacetypes.c +++ b/source/blender/editors/space_api/spacetypes.c @@ -287,7 +287,7 @@ static void xxx_free(SpaceLink *UNUSED(sl)) { } -/* spacetype; init callback for usage, should be redoable */ +/* spacetype; init callback for usage, should be re-doable. */ static void xxx_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area)) { diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index 77f1111624d..05595e0b393 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -18,7 +18,7 @@ * \ingroup spconsole */ -#include <ctype.h> /* ispunct */ +#include <ctype.h> /* #ispunct */ #include <stdlib.h> #include <string.h> #include <sys/stat.h> @@ -749,7 +749,7 @@ static int console_clear_exec(bContext *C, wmOperator *op) /*ConsoleLine *ci = */ console_history_verify(C); - if (scrollback) { /* last item in mistory */ + if (scrollback) { /* Last item in history. */ while (sc->scrollback.first) { console_scrollback_free(sc, sc->scrollback.first); } diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c index 6265cbdd920..790ea379e54 100644 --- a/source/blender/editors/space_console/space_console.c +++ b/source/blender/editors/space_console/space_console.c @@ -216,7 +216,7 @@ static void console_main_region_draw(const bContext *C, ARegion *region) /* clear and setup matrix */ UI_ThemeClearColor(TH_BACK); - /* worlks best with no view2d matrix set */ + /* Works best with no view2d matrix set. */ UI_view2d_view_ortho(v2d); /* data... */ diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index a12c9633798..537d8849372 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -473,7 +473,7 @@ static void file_draw_preview(uiBlock *block, but = uiDefBut(block, UI_BTYPE_LABEL, 0, "", xco, yco, ex, ey, NULL, 0.0, 0.0, 0, 0, NULL); - /* dragregion */ + /* Drag-region. */ if (drag) { ID *id; diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 6b74b344375..6e5791cad52 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -460,7 +460,7 @@ bool ED_fileselect_is_asset_browser(const SpaceFile *sfile) void ED_fileselect_window_params_get(const wmWindow *win, int win_size[2], bool *is_maximized) { - /* Get DPI/pixelsize independent size to be stored in preferences. */ + /* Get DPI/pixel-size independent size to be stored in preferences. */ WM_window_set_dpi(win); /* Ensure the DPI is taken from the right window. */ win_size[0] = WM_window_pixels_x(win) / UI_DPI_FAC; diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index fac38ef7b91..31f606e515d 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -178,7 +178,7 @@ static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode) x = (float)CFRA; } - /* Normalise units of cursor's value. */ + /* Normalize units of cursor's value. */ if (sipo) { y = (sipo->cursorVal / unit_scale) - offset; } @@ -2263,7 +2263,7 @@ static void snap_graph_keys(bAnimContext *ac, short mode) for (ale = anim_data.first; ale; ale = ale->next) { AnimData *adt = ANIM_nla_mapping_get(ac, ale); - /* Normalise cursor value (for normalised F-Curves display). */ + /* Normalize cursor value (for normalized F-Curves display). */ if (mode == GRAPHKEYS_SNAP_VALUE) { short mapping_flag = ANIM_get_normalization_flags(ac); float offset; diff --git a/source/blender/editors/space_graph/graph_slider_ops.c b/source/blender/editors/space_graph/graph_slider_ops.c index 0818ebe9c0a..3e52dc7377b 100644 --- a/source/blender/editors/space_graph/graph_slider_ops.c +++ b/source/blender/editors/space_graph/graph_slider_ops.c @@ -380,7 +380,7 @@ static int graphkeys_decimate_modal(bContext *C, wmOperator *op, const wmEvent * break; } - /* Unhandled event - maybe it was some view manip? */ + /* Unhandled event - maybe it was some view manipulation? */ /* Allow to pass through. */ return OPERATOR_RUNNING_MODAL | OPERATOR_PASS_THROUGH; } diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 63e5ae64a8c..67d5055ec65 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -466,7 +466,7 @@ static void sima_draw_zbuf_pixels( { const float red[4] = {1.0f, 0.0f, 0.0f, 0.0f}; - /* Slowwww */ + /* Very slow! */ float *rectf = MEM_mallocN(rectx * recty * sizeof(float), "temp"); for (int a = rectx * recty - 1; a >= 0; a--) { /* zbuffer values are signed, so we need to shift color range */ @@ -874,7 +874,7 @@ void draw_image_main(const bContext *C, ARegion *region) if (show_stereo3d) { if (show_multilayer) { - /* update multiindex and pass for the current eye */ + /* Update multi-index and pass for the current eye. */ BKE_image_multilayer_index(ima->rr, &sima->iuser); } else { diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 097e304c893..30614a5bf88 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -2747,7 +2747,7 @@ static int image_invert_exec(bContext *C, wmOperator *op) ED_image_undo_push_end(); - /* force GPU reupload, all image is invalid */ + /* Force GPU re-upload, all image is invalid. */ BKE_image_free_gputextures(ima); WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, ima); @@ -2838,7 +2838,7 @@ static int image_scale_exec(bContext *C, wmOperator *op) ED_image_undo_push_end(); - /* force GPU reupload, all image is invalid */ + /* Force GPU re-upload, all image is invalid. */ BKE_image_free_gputextures(ima); DEG_id_tag_update(&ima->id, 0); diff --git a/source/blender/editors/space_info/info_draw.c b/source/blender/editors/space_info/info_draw.c index 414bce29502..dc926587367 100644 --- a/source/blender/editors/space_info/info_draw.c +++ b/source/blender/editors/space_info/info_draw.c @@ -56,7 +56,7 @@ static enum eTextViewContext_LineFlag report_line_data(TextViewContext *tvc, int shade = (tvc->iter_tmp % 2) ? 4 : -4; UI_GetThemeColorShade4ubv(bg_id, shade, bg); - /* Icon color and backgound depend of report type. */ + /* Icon color and background depend of report type. */ int icon_fg_id; int icon_bg_id; diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c index 5e44db4c791..e2ab139aa07 100644 --- a/source/blender/editors/space_info/space_info.c +++ b/source/blender/editors/space_info/space_info.c @@ -150,7 +150,7 @@ static void info_main_region_draw(const bContext *C, ARegion *region) info_textview_update_rect(C, region); - /* worlks best with no view2d matrix set */ + /* Works best with no view2d matrix set. */ UI_view2d_view_ortho(v2d); info_textview_main(sinfo, region, CTX_wm_reports(C)); diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index d7bf6c324ac..031cf7c6376 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -215,7 +215,7 @@ bool nlaedit_disable_tweakmode(bAnimContext *ac, bool do_solo) return false; } - /* for each AnimData block with NLA-data, try exitting tweak-mode */ + /* For each AnimData block with NLA-data, try exiting tweak-mode. */ for (ale = anim_data.first; ale; ale = ale->next) { AnimData *adt = ale->data; @@ -418,7 +418,7 @@ static bool nla_channels_get_selected_extents(bAnimContext *ac, float *min, floa int filter; SpaceNla *snla = (SpaceNla *)ac->sl; - /* NOTE: not bool, since we want prioritise individual channels over expanders */ + /* NOTE: not bool, since we want prioritize individual channels over expanders. */ short found = 0; /* get all items - we need to do it this way */ @@ -442,7 +442,7 @@ static bool nla_channels_get_selected_extents(bAnimContext *ac, float *min, floa found = acf->channel_role; /* only stop our search when we've found an actual channel - * - datablock expanders get less priority so that we don't abort prematurely + * - data-block expanders get less priority so that we don't abort prematurely */ if (found == ACHANNEL_ROLE_CHANNEL) { break; @@ -1532,11 +1532,11 @@ static int nlaedit_swap_exec(bContext *C, wmOperator *op) const bool is_liboverride = ID_IS_OVERRIDE_LIBRARY(ale->id); if (BKE_nlatrack_is_nonlocal_in_liboverride(ale->id, nlt)) { - /* No re-ordering of strips whithin non-local tracks of override data. */ + /* No re-ordering of strips within non-local tracks of override data. */ continue; } - /* make temporary metastrips so that entire islands of selections can be moved around */ + /* Make temporary meta-strips so that entire islands of selections can be moved around. */ BKE_nlastrips_make_metas(&nlt->strips, 1); /* special case: if there is only 1 island diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 1d66119d569..d7edb1ecbed 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -190,7 +190,7 @@ static void node_buts_curvecol(uiLayout *layout, bContext *UNUSED(C), PointerRNA cumap->flag &= ~CUMA_DRAW_SAMPLE; } - /* "Tone" (Standard/Filmlike) only used in the Compositor. */ + /* "Tone" (Standard/Film-like) only used in the Compositor. */ bNodeTree *ntree = (bNodeTree *)ptr->owner_id; uiTemplateCurveMapping( layout, ptr, "mapping", 'c', false, false, false, (ntree->type == NTREE_COMPOSIT)); @@ -559,7 +559,7 @@ static void node_draw_reroute(const bContext *C, if (node->flag & SELECT) { GPU_blend(GPU_BLEND_ALPHA); GPU_line_smooth(true); - /* using different shades of TH_TEXT_HI for the empasis, like triangle */ + /* Using different shades of #TH_TEXT_HI for the emphasis, like triangle. */ if (node->flag & NODE_ACTIVE) { UI_GetThemeColorShadeAlpha4fv(TH_TEXT_HI, 0, -40, debug_color); } diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 037587809b0..4dd945c4cf1 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -1871,7 +1871,7 @@ void node_draw_space(const bContext *C, ARegion *region) if (snode->treepath.last) { if (snode->flag & SNODE_SHOW_GPENCIL) { - /* draw grease-pencil (screen strokes, and also paintbuffer) */ + /* Draw grease-pencil (screen strokes, and also paint-buffer). */ ED_annotation_draw_view2d(C, false); } } diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index ced81401874..c006889f0f7 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -770,7 +770,7 @@ void ED_node_post_apply_transform(bContext *UNUSED(C), bNodeTree *UNUSED(ntree)) * which only exists during actual drawing. Can we rely on valid totr rects? */ /* make sure nodes have correct bounding boxes after transform */ - /* node_update_nodetree(C, ntree, 0.0f, 0.0f); */ + // node_update_nodetree(C, ntree, 0.0f, 0.0f); } /* ***************** generic operator functions for nodes ***************** */ @@ -1199,7 +1199,7 @@ static int node_duplicate_exec(bContext *C, wmOperator *op) if (node->flag & SELECT) { BKE_node_copy_store_new_pointers(ntree, node, LIB_ID_COPY_DEFAULT); - /* to ensure redraws or rerenders happen */ + /* To ensure redraws or re-renders happen. */ ED_node_tag_update_id(snode->id); } diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c index f2abe272f48..7f530408ec7 100644 --- a/source/blender/editors/space_node/node_group.c +++ b/source/blender/editors/space_node/node_group.c @@ -1039,7 +1039,7 @@ static int node_group_make_exec(bContext *C, wmOperator *op) snode_notify(C, snode); snode_dag_update(C, snode); - /* We broke relations in node tree, need to rebuild them in the grahes. */ + /* We broke relations in node tree, need to rebuild them in the graphs. */ DEG_relations_tag_update(bmain); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index 1754f84c374..f3ce60bbcd9 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -736,7 +736,7 @@ static void node_link_find_socket(bContext *C, wmOperator *op, float cursor[2]) } } -/* loop that adds a nodelink, called by function below */ +/* Loop that adds a node-link, called by function below. */ /* in_out = starting socket */ static int node_link_modal(bContext *C, wmOperator *op, const wmEvent *event) { @@ -1543,7 +1543,7 @@ void ED_node_link_intersect_test(ScrArea *area, int test) /* loop over link coords to find shortest dist to * upper left node edge of a intersected line segment */ for (int i = 0; i < NODE_LINK_RESOL; i++) { - /* check if the node rect intersetcts the line from this point to next one */ + /* Check if the node rectangle intersects the line from this point to next one. */ if (BLI_rctf_isect_segment(&select->totr, coord_array[i], coord_array[i + 1])) { /* store the shortest distance to the upper left edge * of all intersections found so far */ diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c index 467802d181b..70aeef76234 100644 --- a/source/blender/editors/space_outliner/outliner_dragdrop.c +++ b/source/blender/editors/space_outliner/outliner_dragdrop.c @@ -140,7 +140,7 @@ static TreeElement *outliner_drop_insert_find(bContext *C, TreeElement *te_hovered; float view_mval[2]; - /* Emtpy tree, e.g. while filtered. */ + /* Empty tree, e.g. while filtered. */ if (BLI_listbase_is_empty(&space_outliner->tree)) { return NULL; } diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index d424bb2319a..35756ea5ac7 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -3059,7 +3059,7 @@ static void outliner_draw_tree_element(bContext *C, } else { active = tree_element_type_active(C, tvc, space_outliner, te, tselem, OL_SETSEL_NONE, false); - /* active collection*/ + /* Active collection. */ } /* active circle */ @@ -3079,7 +3079,7 @@ static void outliner_draw_tree_element(bContext *C, } else if (te->subtree.first || (tselem->type == 0 && te->idcode == ID_SCE) || (te->flag & TE_LAZY_CLOSED)) { - /* open/close icon, only when sublevels, except for scene */ + /* Open/close icon, only when sub-levels, except for scene. */ int icon_x = startx; /* Icons a bit higher. */ @@ -3517,7 +3517,7 @@ static void outliner_draw_tree(bContext *C, GPU_scissor(0, 0, mask_x, region->winy); } - /* Draw hierarhcy lines for collections and object children. */ + /* Draw hierarchy lines for collections and object children. */ starty = (int)region->v2d.tot.ymax - OL_Y_OFFSET; startx = mode_column_offset + UI_UNIT_X / 2 - (U.pixelsize + 1) / 2; outliner_draw_hierarchy_lines(space_outliner, &space_outliner->tree, startx, &starty); diff --git a/source/blender/editors/space_outliner/outliner_sync.c b/source/blender/editors/space_outliner/outliner_sync.c index 0b2d1ce34ec..81b8974fba4 100644 --- a/source/blender/editors/space_outliner/outliner_sync.c +++ b/source/blender/editors/space_outliner/outliner_sync.c @@ -378,7 +378,7 @@ void ED_outliner_select_sync_from_outliner(bContext *C, SpaceOutliner *space_out selected_items_free(&selected_items); - /* Tag for updates and clear dirty flag toprevent a sync to the outliner on draw */ + /* Tag for updates and clear dirty flag to prevent a sync to the outliner on draw. */ if (sync_types.object) { space_outliner->sync_select_dirty &= ~WM_OUTLINER_SYNC_SELECT_FROM_OBJECT; DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); @@ -545,7 +545,7 @@ static void get_sync_select_active_data(const bContext *C, SyncSelectActiveData active_data->sequence = SEQ_select_active_get(scene); } -/* If outliner is dirty sync selection from view layer and sequwncer */ +/* If outliner is dirty sync selection from view layer and sequencer. */ void outliner_sync_selection(const bContext *C, SpaceOutliner *space_outliner) { /* Set which types of data to sync from sync dirty flag and outliner display mode */ diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index fa485dc6b4b..8b522d41af8 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -794,7 +794,7 @@ static void id_override_library_create_fn(bContext *C, id_root->tag |= LIB_TAG_DOIT; - /* For now, remapp all local usages of linked ID to local override one here. */ + /* For now, remap all local usages of linked ID to local override one here. */ ID *id_iter; FOREACH_MAIN_ID_BEGIN (bmain, id_iter) { if (ID_IS_LINKED(id_iter)) { diff --git a/source/blender/editors/space_outliner/outliner_utils.c b/source/blender/editors/space_outliner/outliner_utils.c index e0d63dfcf81..92178cfdfc9 100644 --- a/source/blender/editors/space_outliner/outliner_utils.c +++ b/source/blender/editors/space_outliner/outliner_utils.c @@ -169,7 +169,7 @@ TreeElement *outliner_find_item_at_x_in_row(const SpaceOutliner *space_outliner, return te; } -/* Find specific item from the treestore */ +/* Find specific item from the trees-tore. */ TreeElement *outliner_find_tree_element(ListBase *lb, const TreeStoreElem *store_elem) { LISTBASE_FOREACH (TreeElement *, te, lb) { diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 51c2d3ebdf1..d7937725705 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -954,7 +954,7 @@ void ED_spacetype_sequencer(void) art->listener = sequencer_main_region_listener; BLI_addhead(&st->regiontypes, art); - /* Hud. */ + /* HUD. */ art = ED_area_type_hud(st->spaceid); BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index b38f92402b3..883556948e2 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -722,7 +722,7 @@ static void text_update_drawcache(SpaceText *st, ARegion *region) void text_drawcache_tag_update(SpaceText *st, int full) { - /* this happens if text editor ops are caled from python */ + /* This happens if text editor ops are called from Python. */ if (st == NULL) { return; } diff --git a/source/blender/editors/space_text/text_format.c b/source/blender/editors/space_text/text_format.c index d099f2a20d8..66765206fa6 100644 --- a/source/blender/editors/space_text/text_format.c +++ b/source/blender/editors/space_text/text_format.c @@ -237,7 +237,7 @@ bool ED_text_is_syntax_highlight_supported(Text *text) const char *text_ext = BLI_path_extension(text->id.name + 2); if (text_ext == NULL) { - /* Extensionless datablocks are considered highlightable as Python. */ + /* Extensionless data-blocks are considered highlightable as Python. */ return true; } text_ext++; /* skip the '.' */ diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 932bacfb8a0..526285c076a 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -3832,7 +3832,7 @@ static int text_resolve_conflict_invoke(bContext *C, wmOperator *op, const wmEve switch (BKE_text_file_modified_check(text)) { case 1: if (text->flags & TXT_ISDIRTY) { - /* modified locally and externally, ahhh. offer more possibilities. */ + /* Modified locally and externally, ah. offer more possibilities. */ pup = UI_popup_menu_begin( C, IFACE_("File Modified Outside and Inside Blender"), ICON_NONE); layout = UI_popup_menu_layout(pup); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 3c970781448..aa4922372c8 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -165,7 +165,7 @@ void ED_view3d_update_viewmat(Depsgraph *depsgraph, rv3d->viewcamtexcofac[2] = rv3d->viewcamtexcofac[3] = 0.0f; } - /* calculate pixelsize factor once, is used for lights and obcenters */ + /* Calculate pixel-size factor once, this is used for lights and object-centers. */ { /* note: '1.0f / len_v3(v1)' replaced 'len_v3(rv3d->viewmat[0])' * because of float point precision problems at large values T23908. */ @@ -2335,7 +2335,7 @@ void ED_view3d_depth_update(ARegion *region) } } -/* Utility function to find the closest Z value, use for autodepth. */ +/* Utility function to find the closest Z value, use for auto-depth. */ float view3d_depth_near(ViewDepths *d) { /* Convert to float for comparisons. */ diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index ab4e7be88fe..aba4eb1eefe 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -2888,7 +2888,7 @@ static void view3d_from_minmax(bContext *C, }); } - /* smooth view does viewlock RV3D_BOXVIEW copy */ + /* Smooth-view does view-lock #RV3D_BOXVIEW copy. */ } /** @@ -3282,7 +3282,7 @@ static int viewcenter_cursor_exec(bContext *C, wmOperator *op) ED_view3d_smooth_view( C, v3d, region, smooth_viewtx, &(const V3D_SmoothParams){.ofs = new_ofs}); - /* smooth view does viewlock RV3D_BOXVIEW copy */ + /* Smooth view does view-lock #RV3D_BOXVIEW copy. */ } return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index 6824c526888..2d499cf85c7 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -48,7 +48,7 @@ #include "ED_screen.h" #include "ED_space_api.h" -#include "PIL_time.h" /* smoothview */ +#include "PIL_time.h" /* Smooth-view. */ #include "UI_interface.h" #include "UI_resources.h" @@ -84,7 +84,7 @@ enum { FLY_MODAL_PRECISION_DISABLE, FLY_MODAL_FREELOOK_ENABLE, FLY_MODAL_FREELOOK_DISABLE, - FLY_MODAL_SPEED, /* mousepan typically */ + FLY_MODAL_SPEED, /* mouse-pan typically. */ }; /* relative view axis locking - xlock, zlock */ @@ -537,7 +537,7 @@ static void flyEvent(FlyInfo *fly, const wmEvent *event) fly->state = FLY_CONFIRM; break; - /* speed adjusting with mousepan (trackpad) */ + /* Speed adjusting with mouse-pan (track-pad). */ case FLY_MODAL_SPEED: { float fac = 0.02f * (event->prevy - event->y); @@ -768,7 +768,7 @@ static int flyApply(bContext *C, FlyInfo *fly, bool is_confirm) /* this is the direction that's added to the view offset per redraw */ float dvec[3] = {0, 0, 0}; - /* Camera Uprighting variables */ + /* Camera Up-righting variables. */ float moffset[2]; /* mouse offset from the views center */ float tmp_quat[4]; /* used for rotating the view */ @@ -950,7 +950,7 @@ static int flyApply(bContext *C, FlyInfo *fly, bool is_confirm) } } - /* only apply xcorrect when mouse isn't applying x rot */ + /* Only apply X-axis correction when mouse isn't applying x rotation. */ if (fly->xlock == FLY_AXISLOCK_STATE_ACTIVE && moffset[1] == 0) { float upvec[3]; copy_v3_fl3(upvec, 0.0f, 0.0f, 1.0f); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 9ee6e44f825..0605ea30806 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -596,7 +596,7 @@ static bool do_lasso_select_objects(ViewContext *vc, } for (base = vc->view_layer->object_bases.first; base; base = base->next) { - if (BASE_SELECTABLE(v3d, base)) { /* use this to avoid un-needed lasso lookups */ + if (BASE_SELECTABLE(v3d, base)) { /* Use this to avoid unnecessary lasso look-ups. */ const bool is_select = base->flag & BASE_SELECTED; const bool is_inside = ((ED_view3d_project_base(vc->region, base) == V3D_PROJ_RET_OK) && BLI_lasso_is_point_inside( @@ -1447,7 +1447,7 @@ static const EnumPropertyItem *object_select_menu_enum_itemf(bContext *C, int totitem = 0; int i = 0; - /* don't need context but avoid docgen using this */ + /* Don't need context but avoid API doc-generation using this. */ if (C == NULL || object_mouse_select_menu_data[i].idname[0] == '\0') { return DummyRNA_NULL_items; } @@ -2494,7 +2494,7 @@ static int view3d_select_exec(bContext *C, wmOperator *op) } /* Pass-through allows tweaks - * FINISHED to signal one operator worked. */ + * FINISHED to signal one operator worked */ if (retval) { WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); return OPERATOR_PASS_THROUGH | OPERATOR_FINISHED; diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 9d947384bf0..5c0ca1582a6 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -142,7 +142,7 @@ void ED_view3d_smooth_view_ex( /* initialize sms */ view3d_smooth_view_state_backup(&sms.dst, v3d, rv3d); view3d_smooth_view_state_backup(&sms.src, v3d, rv3d); - /* if smoothview runs multiple times... */ + /* If smooth-view runs multiple times. */ if (rv3d->sms == NULL) { view3d_smooth_view_state_backup(&sms.org, v3d, rv3d); } @@ -396,7 +396,7 @@ static void view3d_smoothview_apply(bContext *C, View3D *v3d, ARegion *region, b /* note: this doesn't work right because the v3d->lens is now used in ortho mode r51636, * when switching camera in quad-view the other ortho views would zoom & reset. * - * For now only redraw all regions when smoothview finishes. + * For now only redraw all regions when smooth-view finishes. */ if (step >= 1.0f) { WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); @@ -423,7 +423,7 @@ static int view3d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), const w } /** - * Apply the smoothview immediately, use when we need to start a new view operation. + * Apply the smooth-view immediately, use when we need to start a new view operation. * (so we don't end up half-applying a view operation when pressing keys quickly). */ void ED_view3d_smooth_view_force_finish(bContext *C, View3D *v3d, ARegion *region) diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index 5b42f221c80..cbd65e3175d 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -48,7 +48,7 @@ #include "ED_space_api.h" #include "ED_transform_snap_object_context.h" -#include "PIL_time.h" /* smoothview */ +#include "PIL_time.h" /* Smooth-view. */ #include "UI_interface.h" #include "UI_resources.h" @@ -872,7 +872,7 @@ static void walkEvent(bContext *C, WalkInfo *walk, const wmEvent *event) /* delta time */ t = (float)(PIL_check_seconds_timer() - walk->teleport.initial_time); - /* reduce the veolocity, if JUMP wasn't hold for long enough */ + /* Reduce the velocity, if JUMP wasn't hold for long enough. */ t = min_ff(t, JUMP_TIME_MAX); walk->speed_jump = JUMP_SPEED_MIN + t * (JUMP_SPEED_MAX - JUMP_SPEED_MIN) / JUMP_TIME_MAX; diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 2a7c247ff2b..86a35949d1d 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -135,7 +135,7 @@ void setTransformViewAspect(TransInfo *t, float r_aspect[3]) } } else if (t->spacetype == SPACE_GRAPH) { - /* depemds on context of usage */ + /* Depends on context of usage. */ } } @@ -471,7 +471,7 @@ static void viewRedrawForce(const bContext *C, TransInfo *t) } else if (t->spacetype == SPACE_SEQ) { WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, NULL); - /* Keyframes on strips has been moved, so make sure related editos are informed. */ + /* Key-frames on strips has been moved, so make sure related editors are informed. */ WM_event_add_notifier(C, NC_ANIMATION, NULL); } else if (t->spacetype == SPACE_IMAGE) { @@ -1249,7 +1249,7 @@ bool calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], floa createTransData(C, t); /* make TransData structs from selection */ - t->around = centerMode; /* override userdefined mode */ + t->around = centerMode; /* override user-defined mode. */ if (t->data_len_all == 0) { success = false; diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c index fb365da6b43..96a9690d891 100644 --- a/source/blender/editors/transform/transform_convert.c +++ b/source/blender/editors/transform/transform_convert.c @@ -1047,7 +1047,7 @@ void createTransData(bContext *C, TransInfo *t) else if (t->spacetype == SPACE_SEQ) { t->flag |= T_POINTS | T_2D_EDIT; t->obedit_type = -1; - t->num.flag |= NUM_NO_FRACTION; /* sequencer has no use for floating point trasnform */ + t->num.flag |= NUM_NO_FRACTION; /* sequencer has no use for floating point transform. */ convert_type = TC_SEQ_DATA; } else if (t->spacetype == SPACE_GRAPH) { diff --git a/source/blender/editors/transform/transform_convert_armature.c b/source/blender/editors/transform/transform_convert_armature.c index e9b2273b343..7994d97581f 100644 --- a/source/blender/editors/transform/transform_convert_armature.c +++ b/source/blender/editors/transform/transform_convert_armature.c @@ -444,7 +444,7 @@ static short pose_grab_with_ik(Main *bmain, Object *ob) for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { if (pchan->bone->layer & arm->layer) { if (pchan->bone->flag & (BONE_SELECTED | BONE_TRANSFORM_MIRROR)) { - /* Rule: no IK for solitatry (unconnected) bones */ + /* Rule: no IK for solitary (unconnected) bones. */ for (bonec = pchan->bone->childbase.first; bonec; bonec = bonec->next) { if (bonec->flag & BONE_CONNECTED) { break; @@ -1354,7 +1354,7 @@ static void pose_transform_mirror_update(TransInfo *t, TransDataContainer *tc, O } mul_v3_m4v3(data->grabtarget, flip_mtx, td->loc); if (pid) { - /* TODO(germano): Realitve Mirror support */ + /* TODO(germano): Relative Mirror support. */ } data->flag |= CONSTRAINT_IK_AUTO; /* Add a temporary auto IK constraint here, as we will only temporarily active this diff --git a/source/blender/editors/transform/transform_convert_curve.c b/source/blender/editors/transform/transform_convert_curve.c index 445253d5446..3c01c716123 100644 --- a/source/blender/editors/transform/transform_convert_curve.c +++ b/source/blender/editors/transform/transform_convert_curve.c @@ -298,7 +298,7 @@ void createTransCurveVerts(TransInfo *t) } if ((bezt_tx & SEL_F1) == 0 && (bezt_tx & SEL_F3) == 0) { - /* If the middle is selected but the sides arnt, this is needed */ + /* If the middle is selected but the sides aren't, this is needed. */ if (hdata == NULL) { /* if the handle was not saved by the previous handle */ hdata = initTransDataCurveHandles(td, bezt); diff --git a/source/blender/editors/transform/transform_convert_nla.c b/source/blender/editors/transform/transform_convert_nla.c index 51802a1e769..5eb3f68787a 100644 --- a/source/blender/editors/transform/transform_convert_nla.c +++ b/source/blender/editors/transform/transform_convert_nla.c @@ -574,7 +574,7 @@ void special_aftertrans_update__nla(bContext *C, TransInfo *UNUSED(t)) /* free temp memory */ ANIM_animdata_freelist(&anim_data); - /* perform after-transfrom validation */ + /* Perform after-transform validation. */ ED_nla_postop_refresh(&ac); } } diff --git a/source/blender/editors/transform/transform_convert_tracking.c b/source/blender/editors/transform/transform_convert_tracking.c index b25af709981..5f5f06e388f 100644 --- a/source/blender/editors/transform/transform_convert_tracking.c +++ b/source/blender/editors/transform/transform_convert_tracking.c @@ -358,7 +358,7 @@ static void createTransTrackingTracksData(bContext *C, TransInfo *t) init_context.t = t; init_context.tc = tc; - /* Count required tranformation data. */ + /* Count required transformation data. */ tc->data_len = 0; diff --git a/source/blender/editors/transform/transform_data.h b/source/blender/editors/transform/transform_data.h index b59197fcd39..5b01433c96b 100644 --- a/source/blender/editors/transform/transform_data.h +++ b/source/blender/editors/transform/transform_data.h @@ -122,11 +122,11 @@ typedef struct TransDataCurveHandleFlags { typedef struct TransData { TRANSDATABASIC; - /** Distance needed to affect element (for Proportionnal Editing). */ + /** Distance needed to affect element (for Proportional Editing). */ float dist; - /** Distance to the nearest element (for Proportionnal Editing). */ + /** Distance to the nearest element (for Proportional Editing). */ float rdist; - /** Factor of the transformation (for Proportionnal Editing). */ + /** Factor of the transformation (for Proportional Editing). */ float factor; /** Value pointer for special transforms. */ float *val; @@ -141,11 +141,11 @@ typedef struct TransData { struct Object *ob; /** For objects/bones, the first constraint in its constraint stack. */ struct bConstraint *con; - /** For objects, poses. 1 single malloc per TransInfo! */ + /** For objects, poses. 1 single allocation per #TransInfo! */ TransDataExtension *ext; /** for curves, stores handle flags for modification/cancel. */ TransDataCurveHandleFlags *hdata; - /** If set, copy of Object or PoseChannel protection. */ + /** If set, copy of Object or #bPoseChannel protection. */ short protectflag; } TransData; diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index b092b3e3e0b..e181593d28a 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1193,7 +1193,7 @@ void calculateCenter(TransInfo *t) calculateCenter2D(t); - /* for panning from cameraview */ + /* For panning from the camera-view. */ if ((t->flag & T_OBJECT) && (t->flag & T_OVERRIDE_CENTER) == 0) { if (t->spacetype == SPACE_VIEW3D && t->region && t->region->regiontype == RGN_TYPE_WINDOW) { @@ -1416,7 +1416,7 @@ void transform_data_ext_rotate(TransData *td, float mat[3][3], bool use_drot) if (td->ext->rotOrder == ROT_MODE_QUAT) { float quat[4]; - /* calculate the total rotatation */ + /* Calculate the total rotation. */ quat_to_mat3(obmat, td->ext->iquat); if (use_drot) { mul_m3_m3m3(obmat, dmat, obmat); @@ -1437,7 +1437,7 @@ void transform_data_ext_rotate(TransData *td, float mat[3][3], bool use_drot) else if (td->ext->rotOrder == ROT_MODE_AXISANGLE) { float axis[3], angle; - /* calculate the total rotatation */ + /* Calculate the total rotation. */ axis_angle_to_mat3(obmat, td->ext->irotAxis, td->ext->irotAngle); if (use_drot) { mul_m3_m3m3(obmat, dmat, obmat); @@ -1459,7 +1459,7 @@ void transform_data_ext_rotate(TransData *td, float mat[3][3], bool use_drot) else { float eul[3]; - /* calculate the total rotatation */ + /* Calculate the total rotation. */ eulO_to_mat3(obmat, td->ext->irot, td->ext->rotOrder); if (use_drot) { mul_m3_m3m3(obmat, dmat, obmat); diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c index eec0ce42f3c..27df29afd8d 100644 --- a/source/blender/editors/transform/transform_gizmo_3d.c +++ b/source/blender/editors/transform/transform_gizmo_3d.c @@ -532,7 +532,7 @@ static void protectflag_to_drawflags_ebone(RegionView3D *rv3d, const EditBone *e /* could move into BLI_math however this is only useful for display/editing purposes */ static void axis_angle_to_gimbal_axis(float gmat[3][3], const float axis[3], const float angle) { - /* X/Y are arbitrary axies, most importantly Z is the axis of rotation */ + /* X/Y are arbitrary axes, most importantly Z is the axis of rotation. */ float cross_vec[3]; float quat[4]; diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c index 70ef5fcde7a..ec84eab27a9 100644 --- a/source/blender/editors/transform/transform_input.c +++ b/source/blender/editors/transform/transform_input.c @@ -508,7 +508,7 @@ eRedrawFlag handleMouseInput(TransInfo *t, MouseInput *mi, const wmEvent *event) case EVT_RIGHTSHIFTKEY: if (event->val == KM_PRESS) { t->modifiers |= MOD_PRECISION; - /* shift is modifier for higher precision transforn */ + /* Shift is modifier for higher precision transform. */ mi->precision = 1; redraw = TREDRAW_HARD; } diff --git a/source/blender/editors/transform/transform_mode.c b/source/blender/editors/transform/transform_mode.c index a4d999b868d..be4f3daa3d2 100644 --- a/source/blender/editors/transform/transform_mode.c +++ b/source/blender/editors/transform/transform_mode.c @@ -513,7 +513,7 @@ void constraintSizeLim(TransInfo *t, TransData *td) return; } - /* extrace scale from matrix and apply back sign */ + /* Extract scale from matrix and apply back sign. */ mat4_to_size(td->ext->size, cob.matrix); mul_v3_v3(td->ext->size, size_sign); } @@ -705,7 +705,7 @@ void ElementRotation_ex(TransInfo *t, mul_m3_m3m3(totmat, mat, td->ext->r_mtx); mul_m3_m3m3(smat, td->ext->r_smtx, totmat); - /* calculate the total rotatation in eulers */ + /* Calculate the total rotation in eulers. */ copy_v3_v3(eul, td->ext->irot); eulO_to_mat3(eulmat, eul, td->ext->rotOrder); @@ -778,7 +778,7 @@ void ElementRotation_ex(TransInfo *t, mul_m3_m3m3(totmat, mat, td->mtx); mul_m3_m3m3(smat, td->smtx, totmat); - /* calculate the total rotatation in eulers */ + /* Calculate the total rotation in eulers. */ add_v3_v3v3(eul, td->ext->irot, td->ext->drot); /* correct for delta rot */ eulO_to_mat3(obmat, eul, td->ext->rotOrder); /* mat = transform, obmat = object rotation */ @@ -902,7 +902,7 @@ static void TransMat3ToSize(const float mat[3][3], const float smat[3][3], float mat3_to_rot_size(rmat, size, mat); - /* first tried with dotproduct... but the sign flip is crucial */ + /* First tried with dot-product... but the sign flip is crucial. */ if (dot_v3v3(rmat[0], smat[0]) < 0.0f) { size[0] = -size[0]; } diff --git a/source/blender/editors/transform/transform_mode_edge_seq_slide.c b/source/blender/editors/transform/transform_mode_edge_seq_slide.c index dd212af7caf..b21f00eed98 100644 --- a/source/blender/editors/transform/transform_mode_edge_seq_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_seq_slide.c @@ -51,7 +51,7 @@ static eRedrawFlag seq_slide_handleEvent(struct TransInfo *t, const wmEvent *eve BLI_assert(t->mode == TFM_SEQ_SLIDE); const wmKeyMapItem *kmi = t->custom.mode.data; if (kmi && event->type == kmi->type && event->val == kmi->val) { - /* Allows the 'Expand to fit' effect to be enabled as a toogle. */ + /* Allows the "Expand to Fit" effect to be enabled as a toggle. */ t->flag ^= T_ALT_TRANSFORM; return TREDRAW_HARD; } diff --git a/source/blender/editors/transform/transform_mode_edge_slide.c b/source/blender/editors/transform/transform_mode_edge_slide.c index dae3fe6f7b4..dff9ded6b29 100644 --- a/source/blender/editors/transform/transform_mode_edge_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_slide.c @@ -143,7 +143,7 @@ static BMEdge *get_other_edge(BMVert *v, BMEdge *e) return NULL; } -/* interpoaltes along a line made up of 2 segments (used for edge slide) */ +/* Interpolates along a line made up of 2 segments (used for edge slide). */ static void interp_line_v3_v3v3v3( float p[3], const float v1[3], const float v2[3], const float v3[3], float t) { diff --git a/source/blender/editors/transform/transform_mode_resize.c b/source/blender/editors/transform/transform_mode_resize.c index 62a4fbd6f04..4d0bb7fbe9c 100644 --- a/source/blender/editors/transform/transform_mode_resize.c +++ b/source/blender/editors/transform/transform_mode_resize.c @@ -132,7 +132,7 @@ static void applyResize(TransInfo *t, const int UNUSED(mval[2])) } } - /* evil hack - redo resize if cliping needed */ + /* Evil hack - redo resize if clipping needed. */ if (t->flag & T_CLIP_UV && clipUVTransform(t, t->values_final, 1)) { size_to_mat3(mat, t->values_final); diff --git a/source/blender/editors/transform/transform_mode_shrink_fatten.c b/source/blender/editors/transform/transform_mode_shrink_fatten.c index bccf4db66af..dd89f4fd983 100644 --- a/source/blender/editors/transform/transform_mode_shrink_fatten.c +++ b/source/blender/editors/transform/transform_mode_shrink_fatten.c @@ -51,7 +51,7 @@ static eRedrawFlag shrinkfatten_handleEvent(struct TransInfo *t, const wmEvent * BLI_assert(t->mode == TFM_SHRINKFATTEN); const wmKeyMapItem *kmi = t->custom.mode.data; if (kmi && event->type == kmi->type && event->val == kmi->val) { - /* Allows the 'Even Thickness' effect to be enabled as a toogle. */ + /* Allows the "Even Thickness" effect to be enabled as a toggle. */ t->flag ^= T_ALT_TRANSFORM; return TREDRAW_HARD; } diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 15c215c426d..5b366e7f5fd 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -432,7 +432,7 @@ static int transform_modal(bContext *C, wmOperator *op, const wmEvent *event) * since we're not reading from 'td->center' in this case. see: T40241 */ if (t->tsnap.target == SCE_SNAP_TARGET_ACTIVE) { /* In camera view, tsnap callback is not set - * (see initSnappingMode() in transfrom_snap.c, and T40348). */ + * (see #initSnappingMode() in transform_snap.c, and T40348). */ if (t->tsnap.targetSnap && ((t->tsnap.status & TARGET_INIT) == 0)) { t->tsnap.targetSnap(t); } @@ -444,7 +444,7 @@ static int transform_modal(bContext *C, wmOperator *op, const wmEvent *event) if ((exit_code & OPERATOR_RUNNING_MODAL) == 0) { transformops_exit(C, op); - exit_code &= ~OPERATOR_PASS_THROUGH; /* preventively remove passthrough */ + exit_code &= ~OPERATOR_PASS_THROUGH; /* Preventively remove pass-through. */ } else { if (mode_prev != t->mode) { diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 508189c5d77..575c736cf51 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -235,7 +235,7 @@ void drawSnapping(const struct bContext *C, TransInfo *t) } else if (t->spacetype == SPACE_IMAGE) { if (validSnap(t)) { - /* This will not draw, and Im nor sure why - campbell */ + /* This will not draw, and I'm nor sure why - campbell */ /* TODO: see 2.7x for non-working code */ } } @@ -383,7 +383,7 @@ void applyProject(TransInfo *t) } } -#if 0 /* TODO: sipport this? */ +#if 0 /* TODO: support this? */ constraintTransLim(t, td); #endif } diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index b610369f82d..58198f21ba2 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -1959,7 +1959,7 @@ static short snapCurve(SnapData *snapdata, int clip_plane_len = snapdata->clip_plane_len; if (snapdata->has_occlusion_plane) { - /* We snap to vertices even if coccluded. */ + /* We snap to vertices even if occluded. */ clip_planes++; clip_plane_len--; } diff --git a/source/blender/editors/util/ed_transverts.c b/source/blender/editors/util/ed_transverts.c index 1075f256a09..d0234dee856 100644 --- a/source/blender/editors/util/ed_transverts.c +++ b/source/blender/editors/util/ed_transverts.c @@ -495,8 +495,8 @@ void ED_transverts_create_from_obedit(TransVertStore *tvs, Object *obedit, const } if (!tvs->transverts_tot && tvs->transverts) { - /* prevent memory leak. happens for curves/latticies due to */ - /* difficult condition of adding points to trans data */ + /* Prevent memory leak. happens for curves/lattices due to + * difficult condition of adding points to trans data. */ MEM_freeN(tvs->transverts); tvs->transverts = NULL; } diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c index ba22bcca0e1..91ec8546225 100644 --- a/source/blender/editors/util/numinput.c +++ b/source/blender/editors/util/numinput.c @@ -508,7 +508,7 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event) #endif case EVT_CKEY: if (event->ctrl) { - /* Copy current str to the copypaste buffer. */ + /* Copy current `str` to the copy/paste buffer. */ WM_clipboard_text_set(n->str, 0); updated = true; } diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index ed9e5053f10..e94aaa49839 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -978,7 +978,7 @@ static int p_connect_pairs(PHandle *handle, PBool topology_from_uvs) PChart *chart = handle->construction_chart; int ncharts = 0; - /* connect pairs, count edges, set vertex-edge pointer to a pairless edge */ + /* Connect pairs, count edges, set vertex-edge pointer to a pair-less edge. */ for (first = chart->faces; first; first = first->nextlink) { if (first->flag & PFACE_CONNECTED) { continue; @@ -1974,7 +1974,7 @@ static PBool p_collapse_allowed_geometric(PEdge *edge, PEdge *pair) b[1] = p_vec_angle(v2->co, v1->co, keepv->co); b[2] = M_PI - b[0] - b[1]; - /* abf criterion 1: avoid sharp and obtuse angles */ + /* ABF criterion 1: avoid sharp and obtuse angles. */ minangle = 15.0f * M_PI / 180.0f; maxangle = M_PI - minangle; @@ -1991,7 +1991,7 @@ static PBool p_collapse_allowed_geometric(PEdge *edge, PEdge *pair) } while (e && (e != oldv->edge)); if (p_vert_interior(oldv)) { - /* hlscm criterion: angular defect smaller than threshold */ + /* HLSCM criterion: angular defect smaller than threshold. */ if (fabsf(angulardefect) > (float)(M_PI * 30.0 / 180.0)) { return P_FALSE; } @@ -2000,12 +2000,12 @@ static PBool p_collapse_allowed_geometric(PEdge *edge, PEdge *pair) PVert *v1 = p_boundary_edge_next(oldv->edge)->vert; PVert *v2 = p_boundary_edge_prev(oldv->edge)->vert; - /* abf++ criterion 2: avoid collapsing verts inwards */ + /* ABF++ criterion 2: avoid collapsing verts inwards. */ if (p_vert_interior(keepv)) { return P_FALSE; } - /* don't collapse significant boundary changes */ + /* Don't collapse significant boundary changes. */ angle = p_vec_angle(v1->co, oldv->co, v2->co); if (angle < (M_PI * 160.0 / 180.0)) { return P_FALSE; @@ -3837,7 +3837,7 @@ static void p_chart_rotate_fit_aabb(PChart *chart) /* Area Smoothing */ -/* 2d bsp tree for inverse mapping - that's a bit silly */ +/* 2d BSP tree for inverse mapping - that's a bit silly. */ typedef struct SmoothTriangle { float co1[2], co2[2], co3[2]; @@ -4288,7 +4288,7 @@ static void p_smooth(PChart *chart) MEM_freeN(hedges); MEM_freeN(vedges); - /* create bsp */ + /* Create BSP. */ t = triangles = MEM_mallocN(sizeof(SmoothTriangle) * esize * 2, "PSmoothTris"); trip = tri = MEM_mallocN(sizeof(SmoothTriangle *) * esize * 2, "PSmoothTriP"); diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 7b27bb570cc..5c4dc90f112 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -224,13 +224,13 @@ enum StitchModes { STITCH_EDGE, }; -/* UvElement identification. */ +/** #UvElement identification. */ typedef struct UvElementID { int faceIndex; int elementIndex; } UvElementID; -/* StitchState initializition. */ +/** #StitchState initialization. */ typedef struct StitchStateInit { int uv_selected_count; UvElementID *to_select; @@ -2050,7 +2050,7 @@ static StitchState *stitch_init(bContext *C, BLI_ghash_free(edge_hash, NULL, NULL); - /* refill an edge hash to create edge connnectivity data */ + /* Refill an edge hash to create edge connectivity data. */ state->edge_hash = edge_hash = BLI_ghash_new(uv_edge_hash, uv_edge_compare, "stitch_edge_hash"); for (i = 0; i < total_edges; i++) { BLI_ghash_insert(edge_hash, edges + i, edges + i); diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp index ddd11729e67..9c675c93a2e 100644 --- a/source/blender/freestyle/intern/application/Controller.cpp +++ b/source/blender/freestyle/intern/application/Controller.cpp @@ -580,7 +580,7 @@ void Controller::ComputeViewMap() vmBuilder.setRenderMonitor(_pRenderMonitor); #if 0 - // Builds a tesselated form of the silhouette for display purpose: + // Builds a tessellated form of the silhouette for display purpose: //--------------------------------------------------------------- ViewMapTesselator3D sTesselator3d; ViewMapTesselator2D sTesselator2d; diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h index 85981ac8043..be418c15060 100644 --- a/source/blender/gpu/GPU_batch.h +++ b/source/blender/gpu/GPU_batch.h @@ -84,7 +84,7 @@ typedef struct GPUBatch { GPUVertBuf *inst[GPU_BATCH_INST_VBO_MAX_LEN]; /** NULL if element list not needed */ GPUIndexBuf *elem; - /** Bookeeping. */ + /** Bookkeeping. */ eGPUBatchFlag flag; /** Type of geometry to draw. */ GPUPrimType prim_type; diff --git a/source/blender/gpu/GPU_framebuffer.h b/source/blender/gpu/GPU_framebuffer.h index c0f91756bf6..8c6592adf6d 100644 --- a/source/blender/gpu/GPU_framebuffer.h +++ b/source/blender/gpu/GPU_framebuffer.h @@ -20,7 +20,7 @@ /** \file * \ingroup gpu * - * GPU Framebuffer + * GPU Frame-buffer * - this is a wrapper for an OpenGL framebuffer object (FBO). in practice * multiple FBO's may be created. * - actual FBO creation & config is deferred until GPU_framebuffer_bind or @@ -79,7 +79,7 @@ GPUFrameBuffer *GPU_framebuffer_back_get(void); } \ } while (0) -/* Framebuffer setup : You need to call GPU_framebuffer_bind for these +/* Frame-buffer setup: You need to call #GPU_framebuffer_bind for these * to be effective. */ void GPU_framebuffer_texture_attach_ex(GPUFrameBuffer *gpu_fb, GPUAttachment attachment, int slot); @@ -154,7 +154,7 @@ void GPU_framebuffer_texture_layer_attach( void GPU_framebuffer_texture_cubeface_attach( GPUFrameBuffer *fb, GPUTexture *tex, int slot, int face, int mip); -/* Framebuffer operations */ +/* Frame-buffer operations. */ void GPU_framebuffer_viewport_set(GPUFrameBuffer *fb, int x, int y, int w, int h); void GPU_framebuffer_viewport_get(GPUFrameBuffer *fb, int r_viewport[4]); diff --git a/source/blender/gpu/GPU_index_buffer.h b/source/blender/gpu/GPU_index_buffer.h index 0c71dd539a6..76aab3c196b 100644 --- a/source/blender/gpu/GPU_index_buffer.h +++ b/source/blender/gpu/GPU_index_buffer.h @@ -70,7 +70,7 @@ void GPU_indexbuf_set_tri_restart(GPUIndexBufBuilder *builder, uint elem); GPUIndexBuf *GPU_indexbuf_build(GPUIndexBufBuilder *); void GPU_indexbuf_build_in_place(GPUIndexBufBuilder *, GPUIndexBuf *); -/* Create a subrange of an existing indexbuffer. */ +/* Create a sub-range of an existing index-buffer. */ GPUIndexBuf *GPU_indexbuf_create_subrange(GPUIndexBuf *elem_src, uint start, uint length); void GPU_indexbuf_create_subrange_in_place(GPUIndexBuf *elem, GPUIndexBuf *elem_src, diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h index 55716b584c3..9824c7016dc 100644 --- a/source/blender/gpu/GPU_shader.h +++ b/source/blender/gpu/GPU_shader.h @@ -29,7 +29,7 @@ extern "C" { struct GPUVertBuf; -/** Opaque type hidding blender::gpu::Shader */ +/** Opaque type hiding #blender::gpu::Shader */ typedef struct GPUShader GPUShader; typedef enum eGPUShaderTFBType { diff --git a/source/blender/gpu/GPU_state.h b/source/blender/gpu/GPU_state.h index f5a1ccbc40b..0687f271670 100644 --- a/source/blender/gpu/GPU_state.h +++ b/source/blender/gpu/GPU_state.h @@ -46,7 +46,7 @@ ENUM_OPERATORS(eGPUBarrier, GPU_BARRIER_TEXTURE_FETCH) /** * Defines the fixed pipeline blending equation. * SRC is the output color from the shader. - * DST is the color from the framebuffer. + * DST is the color from the frame-buffer. * The blending equation is : * (SRC * A) + (DST * B). * The blend mode will modify the A and B parameters. @@ -64,7 +64,7 @@ typedef enum eGPUBlend { * NOTE: Does not modify alpha. */ GPU_BLEND_INVERT, /** Order independent transparency. - * NOTE: Cannot be used as is. Needs special setup (framebuffer, shader ...). */ + * NOTE: Cannot be used as is. Needs special setup (frame-buffer, shader ...). */ GPU_BLEND_OIT, /** Special blend to add color under and multiply dst color by src alpha. */ GPU_BLEND_BACKGROUND, diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h index 91119bd05a1..da2d2639440 100644 --- a/source/blender/gpu/GPU_texture.h +++ b/source/blender/gpu/GPU_texture.h @@ -77,12 +77,12 @@ void GPU_samplers_update(void); */ /* Wrapper to supported OpenGL/Vulkan texture internal storage - * If you need a type just uncomment it. Be aware that some formats - * are not supported by renderbuffers. All of the following formats + * If you need a type just un-comment it. Be aware that some formats + * are not supported by render-buffers. All of the following formats * are part of the OpenGL 3.3 core * specification. */ typedef enum eGPUTextureFormat { - /* Formats texture & renderbuffer */ + /* Formats texture & render-buffer. */ GPU_RGBA8UI, GPU_RGBA8I, GPU_RGBA8, diff --git a/source/blender/gpu/GPU_vertex_buffer.h b/source/blender/gpu/GPU_vertex_buffer.h index eeaebd3fae5..aae58de533b 100644 --- a/source/blender/gpu/GPU_vertex_buffer.h +++ b/source/blender/gpu/GPU_vertex_buffer.h @@ -34,7 +34,7 @@ typedef enum { GPU_VERTBUF_INVALID = 0, /** Was init with a vertex format. */ GPU_VERTBUF_INIT = (1 << 0), - /** Data has been touched and need to be reuploaded. */ + /** Data has been touched and need to be re-uploaded. */ GPU_VERTBUF_DATA_DIRTY = (1 << 1), /** The buffer has been created inside GPU memory. */ GPU_VERTBUF_DATA_UPLOADED = (1 << 2), diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index 84da95f6fee..a2072e504fd 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -109,7 +109,7 @@ static GPUPass *gpu_pass_cache_resolve_collision(GPUPass *pass, uint32_t hash) { BLI_spin_lock(&pass_cache_spin); - /* Collision, need to strcmp the whole shader. */ + /* Collision, need to `strcmp` the whole shader. */ for (; pass && (pass->hash == hash); pass = pass->next) { if ((defs != NULL) && (!STREQ(pass->defines, defs))) { /* Pass */ } diff --git a/source/blender/gpu/intern/gpu_context_private.hh b/source/blender/gpu/intern/gpu_context_private.hh index ffa7a38faa6..82753b44c51 100644 --- a/source/blender/gpu/intern/gpu_context_private.hh +++ b/source/blender/gpu/intern/gpu_context_private.hh @@ -93,7 +93,7 @@ class Context { bool is_active_on_thread(void); }; -/* Syntacting suggar. */ +/* Syntactic sugar. */ static inline GPUContext *wrap(Context *ctx) { return reinterpret_cast<GPUContext *>(ctx); diff --git a/source/blender/gpu/intern/gpu_drawlist_private.hh b/source/blender/gpu/intern/gpu_drawlist_private.hh index 98603299d62..393307e6ee5 100644 --- a/source/blender/gpu/intern/gpu_drawlist_private.hh +++ b/source/blender/gpu/intern/gpu_drawlist_private.hh @@ -42,7 +42,7 @@ class DrawList { virtual void submit() = 0; }; -/* Syntacting suggar. */ +/* Syntactic sugar. */ static inline GPUDrawList *wrap(DrawList *vert) { return reinterpret_cast<GPUDrawList *>(vert); diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc index d5d7994a154..2e183f52eea 100644 --- a/source/blender/gpu/intern/gpu_framebuffer.cc +++ b/source/blender/gpu/intern/gpu_framebuffer.cc @@ -359,7 +359,7 @@ void GPU_framebuffer_viewport_reset(GPUFrameBuffer *gpu_fb) unwrap(gpu_fb)->viewport_reset(); } -/* ---------- Framebuffer Operations ----------- */ +/* ---------- Frame-buffer Operations ----------- */ void GPU_framebuffer_clear(GPUFrameBuffer *gpu_fb, eGPUFrameBufferBits buffers, diff --git a/source/blender/gpu/intern/gpu_framebuffer_private.hh b/source/blender/gpu/intern/gpu_framebuffer_private.hh index 7afa56bfe3d..32c13cf13ff 100644 --- a/source/blender/gpu/intern/gpu_framebuffer_private.hh +++ b/source/blender/gpu/intern/gpu_framebuffer_private.hh @@ -20,7 +20,7 @@ /** \file * \ingroup gpu * - * GPU Framebuffer + * GPU Frame-buffer * - this is a wrapper for an OpenGL framebuffer object (FBO). in practice * multiple FBO's may be created. * - actual FBO creation & config is deferred until GPU_framebuffer_bind or @@ -210,7 +210,7 @@ class FrameBuffer { }; }; -/* Syntacting suggar. */ +/* Syntactic sugar. */ static inline GPUFrameBuffer *wrap(FrameBuffer *vert) { return reinterpret_cast<GPUFrameBuffer *>(vert); diff --git a/source/blender/gpu/intern/gpu_immediate_private.hh b/source/blender/gpu/intern/gpu_immediate_private.hh index 9fcbe2bdc0b..98399897ea9 100644 --- a/source/blender/gpu/intern/gpu_immediate_private.hh +++ b/source/blender/gpu/intern/gpu_immediate_private.hh @@ -34,7 +34,7 @@ namespace blender::gpu { class Immediate { public: - /** Pointer to the mapped buffer data for the currect vertex. */ + /** Pointer to the mapped buffer data for the current vertex. */ uchar *vertex_data = NULL; /** Current vertex index. */ uint vertex_idx = 0; @@ -49,10 +49,10 @@ class Immediate { GPUPrimType prim_type = GPU_PRIM_NONE; GPUVertFormat vertex_format = {}; GPUShader *shader = NULL; - /** Enforce strict vertex count (disabled when using immBeginAtMost). */ + /** Enforce strict vertex count (disabled when using #immBeginAtMost). */ bool strict_vertex_len = true; - /** Batch in construction when using immBeginBatch. */ + /** Batch in construction when using #immBeginBatch. */ GPUBatch *batch = NULL; /** Wide Line workaround. */ @@ -61,7 +61,7 @@ class Immediate { GPUShader *prev_shader = NULL; /** Builtin shader index. Used to test if the workaround can be done. */ eGPUBuiltinShader builtin_shader_bound = GPU_SHADER_TEXT; - /** Uniform color: Kept here to update the wideline shader just before immBegin. */ + /** Uniform color: Kept here to update the wide-line shader just before #immBegin. */ float uniform_color[4]; public: diff --git a/source/blender/gpu/intern/gpu_index_buffer_private.hh b/source/blender/gpu/intern/gpu_index_buffer_private.hh index 7054360d07f..2405db8664a 100644 --- a/source/blender/gpu/intern/gpu_index_buffer_private.hh +++ b/source/blender/gpu/intern/gpu_index_buffer_private.hh @@ -57,7 +57,7 @@ class IndexBuf { uint32_t index_len_ = 0; /** Base index: Added to all indices after fetching. Allows index compression. */ uint32_t index_base_ = 0; - /** Bookeeping. */ + /** Bookkeeping. */ bool is_init_ = false; /** Is this object only a reference to a subrange of another IndexBuf. */ bool is_subrange_ = false; @@ -96,7 +96,7 @@ class IndexBuf { inline uint index_range(uint *r_min, uint *r_max); }; -/* Syntacting suggar. */ +/* Syntactic sugar. */ static inline GPUIndexBuf *wrap(IndexBuf *indexbuf) { return reinterpret_cast<GPUIndexBuf *>(indexbuf); diff --git a/source/blender/gpu/intern/gpu_node_graph.c b/source/blender/gpu/intern/gpu_node_graph.c index 08da49c3475..bf91a5bbb4d 100644 --- a/source/blender/gpu/intern/gpu_node_graph.c +++ b/source/blender/gpu/intern/gpu_node_graph.c @@ -132,7 +132,7 @@ static void gpu_node_input_link(GPUNode *node, GPUNodeLink *link, const eGPUType case GPU_NODE_LINK_ATTR: input->source = GPU_SOURCE_ATTR; input->attr = link->attr; - /* Failsafe handling if the same attribute is used with different datatypes for + /* Fail-safe handling if the same attribute is used with different data-types for * some reason (only really makes sense with float/vec2/vec3/vec4 though). This * can happen if mixing the generic Attribute node with specialized ones. */ CLAMP_MIN(input->attr->gputype, type); diff --git a/source/blender/gpu/intern/gpu_select_pick.c b/source/blender/gpu/intern/gpu_select_pick.c index 66748b4146a..6cda7888712 100644 --- a/source/blender/gpu/intern/gpu_select_pick.c +++ b/source/blender/gpu/intern/gpu_select_pick.c @@ -269,7 +269,7 @@ typedef struct GPUPickState { ListBase bufs; } cache; - /* Pickign methods */ + /* Picking methods. */ union { /* GPU_SELECT_PICK_ALL */ struct { diff --git a/source/blender/gpu/intern/gpu_shader.cc b/source/blender/gpu/intern/gpu_shader.cc index d47ad5e0100..97673e92bcf 100644 --- a/source/blender/gpu/intern/gpu_shader.cc +++ b/source/blender/gpu/intern/gpu_shader.cc @@ -106,7 +106,7 @@ void Shader::print_log(Span<const char *> sources, char *log, const char *stage, error_line = error_char = -1; if (log_line[0] >= '0' && log_line[0] <= '9') { error_line = (int)strtol(log_line, &error_line_number_end, 10); - /* Try to fetch the error caracter (not always available). */ + /* Try to fetch the error character (not always available). */ if (ELEM(error_line_number_end[0], '(', ':') && error_line_number_end[1] != ' ') { error_char = (int)strtol(error_line_number_end + 1, &log_line, 10); } diff --git a/source/blender/gpu/intern/gpu_shader_interface.hh b/source/blender/gpu/intern/gpu_shader_interface.hh index 62513ffb8a7..942be84caae 100644 --- a/source/blender/gpu/intern/gpu_shader_interface.hh +++ b/source/blender/gpu/intern/gpu_shader_interface.hh @@ -41,7 +41,7 @@ typedef struct ShaderInput { uint32_t name_offset; uint32_t name_hash; int32_t location; - /** Defined at interface creation or in shader. Only for Samplers, UBOs and Vertex Attribs. */ + /** Defined at interface creation or in shader. Only for Samplers, UBOs and Vertex Attributes. */ int32_t binding; } ShaderInput; @@ -226,7 +226,7 @@ inline const ShaderInput *ShaderInterface::input_lookup(const ShaderInput *const for (int i = inputs_len - 1; i >= 0; i--) { if (inputs[i].name_hash == name_hash) { if ((i > 0) && UNLIKELY(inputs[i - 1].name_hash == name_hash)) { - /* Hash colision resolve. */ + /* Hash collision resolve. */ for (; i >= 0 && inputs[i].name_hash == name_hash; i--) { if (STREQ(name, name_buffer_ + inputs[i].name_offset)) { return inputs + i; /* not found */ diff --git a/source/blender/gpu/intern/gpu_shader_private.hh b/source/blender/gpu/intern/gpu_shader_private.hh index 85427372559..d9327bbc0f4 100644 --- a/source/blender/gpu/intern/gpu_shader_private.hh +++ b/source/blender/gpu/intern/gpu_shader_private.hh @@ -76,7 +76,7 @@ class Shader { void print_log(Span<const char *> sources, char *log, const char *stage, const bool error); }; -/* Syntacting suggar. */ +/* Syntactic sugar. */ static inline GPUShader *wrap(Shader *vert) { return reinterpret_cast<GPUShader *>(vert); diff --git a/source/blender/gpu/intern/gpu_state_private.hh b/source/blender/gpu/intern/gpu_state_private.hh index cda1b591bb1..b79350a6506 100644 --- a/source/blender/gpu/intern/gpu_state_private.hh +++ b/source/blender/gpu/intern/gpu_state_private.hh @@ -101,16 +101,16 @@ union GPUStateMutable { /** Positive if using program point size. */ /* TODO(fclem): should be passed as uniform to all shaders. */ float point_size; - /** Not supported on every platform. Prefer using wideline shader. */ + /** Not supported on every platform. Prefer using wide-line shader. */ float line_width; /** Mutable stencil states. */ uint8_t stencil_write_mask; uint8_t stencil_compare_mask; uint8_t stencil_reference; uint8_t _pad0; - /* IMPORTANT: ensure x64 stuct alignment. */ + /* IMPORTANT: ensure x64 struct alignment. */ }; - /* Here to allow fast bitwise ops. */ + /* Here to allow fast bit-wise ops. */ uint64_t data[9]; }; diff --git a/source/blender/gpu/intern/gpu_texture_private.hh b/source/blender/gpu/intern/gpu_texture_private.hh index 4197d5c55fc..400a36559da 100644 --- a/source/blender/gpu/intern/gpu_texture_private.hh +++ b/source/blender/gpu/intern/gpu_texture_private.hh @@ -83,11 +83,11 @@ class Texture { protected: /* ---- Texture format (immutable after init). ---- */ - /** Width & Height & Depth. For cubemap arrays, d is number of facelayers. */ + /** Width & Height & Depth. For cube-map arrays, d is number of face-layers. */ int w_, h_, d_; /** Internal data format. */ eGPUTextureFormat format_; - /** Format caracteristics. */ + /** Format characteristics. */ eGPUTextureFormatFlag format_flag_; /** Texture type. */ eGPUTextureType type_; @@ -101,7 +101,7 @@ class Texture { /** For debugging */ char name_[DEBUG_NAME_LEN]; - /** Framebuffer references to update on deletion. */ + /** Frame-buffer references to update on deletion. */ GPUAttachmentType fb_attachment_[GPU_TEX_MAX_FBO_ATTACHED]; FrameBuffer *fb_[GPU_TEX_MAX_FBO_ATTACHED]; @@ -245,7 +245,7 @@ class Texture { virtual bool init_internal(GPUVertBuf *vbo) = 0; }; -/* Syntacting suggar. */ +/* Syntactic sugar. */ static inline GPUTexture *wrap(Texture *vert) { return reinterpret_cast<GPUTexture *>(vert); diff --git a/source/blender/gpu/intern/gpu_uniform_buffer_private.hh b/source/blender/gpu/intern/gpu_uniform_buffer_private.hh index 826bdd9f8d5..e8fc1343eaf 100644 --- a/source/blender/gpu/intern/gpu_uniform_buffer_private.hh +++ b/source/blender/gpu/intern/gpu_uniform_buffer_private.hh @@ -65,7 +65,7 @@ class UniformBuf { } }; -/* Syntacting suggar. */ +/* Syntactic sugar. */ static inline GPUUniformBuf *wrap(UniformBuf *vert) { return reinterpret_cast<GPUUniformBuf *>(vert); diff --git a/source/blender/gpu/intern/gpu_vertex_buffer_private.hh b/source/blender/gpu/intern/gpu_vertex_buffer_private.hh index da8b02c5c66..67a09f6f83c 100644 --- a/source/blender/gpu/intern/gpu_vertex_buffer_private.hh +++ b/source/blender/gpu/intern/gpu_vertex_buffer_private.hh @@ -62,7 +62,7 @@ class VertBuf { void init(const GPUVertFormat *format, GPUUsageType usage); void clear(void); - /* Data manament */ + /* Data management. */ void allocate(uint vert_len); void resize(uint vert_len); void upload(void); @@ -105,7 +105,7 @@ class VertBuf { virtual void duplicate_data(VertBuf *dst) = 0; }; -/* Syntacting suggar. */ +/* Syntactic sugar. */ static inline GPUVertBuf *wrap(VertBuf *vert) { return reinterpret_cast<GPUVertBuf *>(vert); diff --git a/source/blender/gpu/intern/gpu_vertex_format.cc b/source/blender/gpu/intern/gpu_vertex_format.cc index 625ad604b7c..8498da11507 100644 --- a/source/blender/gpu/intern/gpu_vertex_format.cc +++ b/source/blender/gpu/intern/gpu_vertex_format.cc @@ -105,7 +105,7 @@ uint vertex_buffer_size(const GPUVertFormat *format, uint vertex_len) static uchar copy_attr_name(GPUVertFormat *format, const char *name) { - /* strncpy does 110% of what we need; let's do exactly 100% */ + /* `strncpy` does 110% of what we need; let's do exactly 100% */ uchar name_offset = format->name_offset; char *name_copy = format->names + name_offset; uint available = GPU_VERT_ATTR_NAMES_BUF_LEN - name_offset; @@ -162,7 +162,7 @@ uint GPU_vertformat_attr_add(GPUVertFormat *format, assert(comp_len != 8 && comp_len != 12 && comp_len != 16); } #endif - format->name_len++; /* multiname support */ + format->name_len++; /* Multi-name support. */ const uint attr_id = format->attr_len++; GPUVertAttr *attr = &format->attrs[attr_id]; @@ -186,7 +186,7 @@ void GPU_vertformat_alias_add(GPUVertFormat *format, const char *alias) assert(format->name_len < GPU_VERT_FORMAT_MAX_NAMES); /* there's room for more */ assert(attr->name_len < GPU_VERT_ATTR_MAX_NAMES); #endif - format->name_len++; /* multiname support */ + format->name_len++; /* Multi-name support. */ attr->names[attr->name_len++] = copy_attr_name(format, alias); } diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c index 205ba1d06d6..c118145ebd6 100644 --- a/source/blender/gpu/intern/gpu_viewport.c +++ b/source/blender/gpu/intern/gpu_viewport.c @@ -86,10 +86,10 @@ struct GPUViewport { int size[2]; int flag; - /* Set the active view (for stereoscoptic viewport rendering). */ + /* Set the active view (for stereoscopic viewport rendering). */ int active_view; - /* If engine_handles mismatch we free all ViewportEngineData in this viewport. */ + /* If engine_handles mismatch we free all #ViewportEngineData in this viewport. */ struct { void *handle; ViewportEngineData *data; @@ -589,7 +589,7 @@ void GPU_viewport_colorspace_set(GPUViewport *viewport, /* Restore. */ view_settings->curve_mapping = tmp_curve_mapping; viewport->view_settings.curve_mapping = tmp_curve_mapping_vp; - /* Only copy curvemapping if needed. Avoid uneeded OCIO cache miss. */ + /* Only copy curve-mapping if needed. Avoid unneeded OCIO cache miss. */ if (tmp_curve_mapping && viewport->view_settings.curve_mapping == NULL) { BKE_color_managed_view_settings_free(&viewport->view_settings); viewport->view_settings.curve_mapping = BKE_curvemapping_copy(tmp_curve_mapping); @@ -820,7 +820,7 @@ void GPU_viewport_draw_to_screen_ex(GPUViewport *viewport, const float w = (float)GPU_texture_width(color); const float h = (float)GPU_texture_height(color); - /* We allow rects with min/max swapped, but we also need coorectly assigned coordinates. */ + /* We allow rects with min/max swapped, but we also need correctly assigned coordinates. */ rcti sanitized_rect = *rect; BLI_rcti_sanitize(&sanitized_rect); @@ -974,7 +974,7 @@ static void gpu_viewport_passes_free(PassList *psl, int psl_len) memset(psl->passes, 0, sizeof(*psl->passes) * psl_len); } -/* Must be executed inside Drawmanager Opengl Context. */ +/* Must be executed inside Draw-manager OpenGL Context. */ void GPU_viewport_free(GPUViewport *viewport) { gpu_viewport_engines_data_free(viewport); diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc index 573ae654af4..a1b7aba1140 100644 --- a/source/blender/gpu/opengl/gl_backend.cc +++ b/source/blender/gpu/opengl/gl_backend.cc @@ -367,14 +367,14 @@ static void detect_workarounds() } } - /* Some Intel drivers have issues with using mips as framebuffer targets if - * GL_TEXTURE_MAX_LEVEL is higher than the target mip. + /* Some Intel drivers have issues with using mips as frame-buffer targets if + * GL_TEXTURE_MAX_LEVEL is higher than the target MIP. * Only check at the end after all other workarounds because this uses the drawing code. * Also after device/driver flags to avoid the check that causes pre GCN Radeon to crash. */ if (GCaps.mip_render_workaround == false) { GCaps.mip_render_workaround = detect_mip_render_workaround(); } - /* Disable multidraw if the base instance cannot be read. */ + /* Disable multi-draw if the base instance cannot be read. */ if (GLContext::shader_draw_parameters_support == false) { GLContext::multi_draw_indirect_support = false; } diff --git a/source/blender/gpu/opengl/gl_batch.hh b/source/blender/gpu/opengl/gl_batch.hh index 0fadde7a70d..218b9ffe4b7 100644 --- a/source/blender/gpu/opengl/gl_batch.hh +++ b/source/blender/gpu/opengl/gl_batch.hh @@ -52,9 +52,9 @@ class GLVaoCache { GLContext *context_ = NULL; /** Last interface this batch was drawn with. */ GLShaderInterface *interface_ = NULL; - /** Cached vao for the last interface. */ + /** Cached VAO for the last interface. */ GLuint vao_id_ = 0; - /** Used whend arb_base_instance is not supported. */ + /** Used when arb_base_instance is not supported. */ GLuint vao_base_instance_ = 0; int base_instance_ = 0; diff --git a/source/blender/gpu/opengl/gl_context.cc b/source/blender/gpu/opengl/gl_context.cc index d766e6f0828..6c9c6e10774 100644 --- a/source/blender/gpu/opengl/gl_context.cc +++ b/source/blender/gpu/opengl/gl_context.cc @@ -108,7 +108,7 @@ GLContext::~GLContext() BLI_assert(orphaned_vertarrays_.is_empty()); /* For now don't allow GPUFrameBuffers to be reuse in another context. */ BLI_assert(framebuffers_.is_empty()); - /* Delete vaos so the batch can be reused in another context. */ + /* Delete VAO's so the batch can be reused in another context. */ for (GLVaoCache *cache : vao_caches_) { cache->clear(); } @@ -312,7 +312,7 @@ void GLContext::memory_statistics_get(int *r_total_mem, int *r_free_mem) { /* TODO(merwin): use Apple's platform API to get this info. */ if (GLEW_NVX_gpu_memory_info) { - /* Teturned value in Kb. */ + /* Returned value in Kb. */ glGetIntegerv(GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX, r_total_mem); glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, r_free_mem); } diff --git a/source/blender/gpu/opengl/gl_context.hh b/source/blender/gpu/opengl/gl_context.hh index 66a3fdd3355..b8d979e8f0e 100644 --- a/source/blender/gpu/opengl/gl_context.hh +++ b/source/blender/gpu/opengl/gl_context.hh @@ -87,7 +87,7 @@ class GLContext : public Context { private: /** - * GPUBatch & GPUFramebuffer have references to the context they are from, in the case the + * #GPUBatch & #GPUFramebuffer have references to the context they are from, in the case the * context is destroyed, we need to remove any reference to it. */ Set<GLVaoCache *> vao_caches_; @@ -97,7 +97,7 @@ class GLContext : public Context { /** VertexArrays and framebuffers are not shared across context. */ Vector<GLuint> orphaned_vertarrays_; Vector<GLuint> orphaned_framebuffers_; - /** GLBackend onws this data. */ + /** #GLBackend owns this data. */ GLSharedOrphanLists &shared_orphan_list_; public: diff --git a/source/blender/gpu/opengl/gl_debug.cc b/source/blender/gpu/opengl/gl_debug.cc index 0914c117241..ac42a950945 100644 --- a/source/blender/gpu/opengl/gl_debug.cc +++ b/source/blender/gpu/opengl/gl_debug.cc @@ -363,7 +363,7 @@ namespace blender::gpu { void GLContext::debug_group_begin(const char *name, int index) { if ((G.debug & G_DEBUG_GPU) && (GLEW_VERSION_4_3 || GLEW_KHR_debug)) { - /* Add 10 to avoid conlision with other indices from other possible callback layers. */ + /* Add 10 to avoid collision with other indices from other possible callback layers. */ index += 10; glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, index, -1, name); } diff --git a/source/blender/gpu/opengl/gl_framebuffer.hh b/source/blender/gpu/opengl/gl_framebuffer.hh index 95e67f5973c..7b2c73d7042 100644 --- a/source/blender/gpu/opengl/gl_framebuffer.hh +++ b/source/blender/gpu/opengl/gl_framebuffer.hh @@ -20,7 +20,7 @@ /** \file * \ingroup gpu * - * Encapsulation of Framebuffer states (attached textures, viewport, scissors). + * Encapsulation of Frame-buffer states (attached textures, viewport, scissors). */ #pragma once @@ -45,22 +45,22 @@ class GLFrameBuffer : public FrameBuffer { private: /** OpenGL handle. */ GLuint fbo_id_ = 0; - /** Context the handle is from. Framebuffers are not shared accros contexts. */ + /** Context the handle is from. Frame-buffers are not shared across contexts. */ GLContext *context_ = NULL; /** State Manager of the same contexts. */ GLStateManager *state_manager_ = NULL; /** Copy of the GL state. Contains ONLY color attachments enums for slot binding. */ GLenum gl_attachments_[GPU_FB_MAX_COLOR_ATTACHMENT]; - /** Internal framebuffers are immutable. */ + /** Internal frame-buffers are immutable. */ bool immutable_; - /** True is the framebuffer has its first color target using the GPU_SRGB8_A8 format. */ + /** True is the frame-buffer has its first color target using the GPU_SRGB8_A8 format. */ bool srgb_; - /** True is the framebuffer has been bound using the GL_FRAMEBUFFER_SRGB feature. */ + /** True is the frame-buffer has been bound using the GL_FRAMEBUFFER_SRGB feature. */ bool enabled_srgb_ = false; public: /** - * Create a conventional framebuffer to attach texture to. + * Create a conventional frame-buffer to attach texture to. */ GLFrameBuffer(const char *name); diff --git a/source/blender/gpu/opengl/gl_primitive.hh b/source/blender/gpu/opengl/gl_primitive.hh index 7cd0654bc2c..05a15017c66 100644 --- a/source/blender/gpu/opengl/gl_primitive.hh +++ b/source/blender/gpu/opengl/gl_primitive.hh @@ -20,7 +20,7 @@ /** \file * \ingroup gpu * - * Encapsulation of Framebuffer states (attached textures, viewport, scissors). + * Encapsulation of Frame-buffer states (attached textures, viewport, scissors). */ #pragma once diff --git a/source/blender/gpu/opengl/gl_shader_interface.cc b/source/blender/gpu/opengl/gl_shader_interface.cc index 9533639b133..5870c645bf4 100644 --- a/source/blender/gpu/opengl/gl_shader_interface.cc +++ b/source/blender/gpu/opengl/gl_shader_interface.cc @@ -51,7 +51,7 @@ static inline int sampler_binding(int32_t program, int32_t uniform_location, int *sampler_len) { - /* Identify sampler uniforms and asign sampler units to them. */ + /* Identify sampler uniforms and assign sampler units to them. */ GLint type; glGetActiveUniformsiv(program, 1, &uniform_index, GL_UNIFORM_TYPE, &type); @@ -106,7 +106,7 @@ static inline int image_binding(int32_t program, int32_t uniform_location, int *image_len) { - /* Identify image uniforms and asign image units to them. */ + /* Identify image uniforms and assign image units to them. */ GLint type; glGetActiveUniformsiv(program, 1, &uniform_index, GL_UNIFORM_TYPE, &type); @@ -133,7 +133,7 @@ static inline int image_binding(int32_t program, GLShaderInterface::GLShaderInterface(GLuint program) { - /* Necessary to make glUniform works. */ + /* Necessary to make #glUniform works. */ glUseProgram(program); GLint max_attr_name_len = 0, attr_len = 0; diff --git a/source/blender/gpu/opengl/gl_state.hh b/source/blender/gpu/opengl/gl_state.hh index 643e46acc2d..651c3c22afa 100644 --- a/source/blender/gpu/opengl/gl_state.hh +++ b/source/blender/gpu/opengl/gl_state.hh @@ -42,7 +42,7 @@ class GLTexture; */ class GLStateManager : public StateManager { public: - /** Anothter reference to the active framebuffer. */ + /** Another reference to the active frame-buffer. */ GLFrameBuffer *active_fb = nullptr; private: diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc index 2e8d9dd6e1c..ef38e964c7b 100644 --- a/source/blender/gpu/opengl/gl_texture.cc +++ b/source/blender/gpu/opengl/gl_texture.cc @@ -32,7 +32,7 @@ #include "gl_backend.hh" #include "gl_debug.hh" #include "gl_state.hh" -#include "gpu_vertex_buffer_private.hh" /* TODO shoud be gl_vertex_buffer.hh */ +#include "gpu_vertex_buffer_private.hh" /* TODO should be `gl_vertex_buffer.hh` */ #include "gl_texture.hh" diff --git a/source/blender/imbuf/IMB_metadata.h b/source/blender/imbuf/IMB_metadata.h index 501bf9dfba1..652ce913ee5 100644 --- a/source/blender/imbuf/IMB_metadata.h +++ b/source/blender/imbuf/IMB_metadata.h @@ -35,7 +35,7 @@ struct anim; * The metadata is a list of key/value pairs (both char *) that can me * saved in the header of several image formats. * Apart from some common keys like - * 'Software' and 'Description' (png standard) we'll use keys within the + * 'Software' and 'Description' (PNG standard) we'll use keys within the * Blender namespace, so should be called 'Blender::StampInfo' or 'Blender::FrameNum' * etc... * diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c index bfb7bc93ac7..90c863878ff 100644 --- a/source/blender/imbuf/intern/allocimbuf.c +++ b/source/blender/imbuf/intern/allocimbuf.c @@ -197,7 +197,7 @@ void IMB_freezbuffloatImBuf(ImBuf *ibuf) ibuf->mall &= ~IB_zbuffloat; } -/** Free all pixel data (assosiated with image size). */ +/** Free all pixel data (associated with image size). */ void imb_freerectImbuf_all(ImBuf *ibuf) { imb_freerectImBuf(ibuf); diff --git a/source/blender/imbuf/intern/dds/ColorBlock.cpp b/source/blender/imbuf/intern/dds/ColorBlock.cpp index 00fa0111d1c..3b1b970fb3c 100644 --- a/source/blender/imbuf/intern/dds/ColorBlock.cpp +++ b/source/blender/imbuf/intern/dds/ColorBlock.cpp @@ -400,7 +400,7 @@ void ColorBlock::boundsRangeAlpha(Color32 *start, Color32 *end) const #endif #if 0 -/** Sort colors by abosolute value in their 16 bit representation. */ +/** Sort colors by absolute value in their 16 bit representation. */ void ColorBlock::sortColorsByAbsoluteValue() { /* Dummy selection sort. */ diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c index f8029c08bad..7ada0130059 100644 --- a/source/blender/imbuf/intern/imageprocess.c +++ b/source/blender/imbuf/intern/imageprocess.c @@ -115,7 +115,7 @@ void bicubic_interpolation(ImBuf *in, ImBuf *out, float u, float v, int xout, in return; } - /* gcc warns these could be uninitialized, but its ok. */ + /* GCC warns these could be uninitialized, but its ok. */ pixel_from_buffer(out, &outI, &outF, xout, yout); bicubic_interpolation_color(in, outI, outF, u, v); diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c index fb8c361d94b..cf27557d043 100644 --- a/source/blender/imbuf/intern/jp2.c +++ b/source/blender/imbuf/intern/jp2.c @@ -476,7 +476,7 @@ static ImBuf *imb_load_jp2_stream(opj_stream_t *stream, r = image->comps[0].data; a = (use_alpha) ? image->comps[1].data : NULL; - /* grayscale 12bits+ */ + /* Gray-scale 12bits+ */ if (use_alpha) { a = image->comps[1].data; PIXEL_LOOPER_BEGIN (rect_float) { @@ -500,7 +500,7 @@ static ImBuf *imb_load_jp2_stream(opj_stream_t *stream, g = image->comps[1].data; b = image->comps[2].data; - /* rgb or rgba 12bits+ */ + /* RGB or RGBA 12bits+ */ if (use_alpha) { a = image->comps[3].data; PIXEL_LOOPER_BEGIN (rect_float) { @@ -551,7 +551,7 @@ static ImBuf *imb_load_jp2_stream(opj_stream_t *stream, g = image->comps[1].data; b = image->comps[2].data; - /* 8bit rgb or rgba */ + /* 8bit RGB or RGBA */ if (use_alpha) { a = image->comps[3].data; PIXEL_LOOPER_BEGIN (rect_uchar) { diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 979e7703e81..2a9cb9af891 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -1108,7 +1108,7 @@ void IMB_exr_write_channels(void *handle) const size_t num_pixels = ((size_t)data->width) * data->height; half *rect_half = nullptr, *current_rect_half = nullptr; - /* We allocate teporary storage for half pixels for all the channels at once. */ + /* We allocate temporary storage for half pixels for all the channels at once. */ if (data->num_half_channels != 0) { rect_half = (half *)MEM_mallocN(sizeof(half) * data->num_half_channels * num_pixels, __func__); @@ -1235,7 +1235,7 @@ void IMB_exr_read_channels(void *handle) Header header = in.header(); Box2i dw = header.dataWindow(); - /* Insert all matching channel into framebuffer. */ + /* Insert all matching channel into frame-buffer. */ FrameBuffer frameBuffer; ExrChannel *echan; diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c index a9833623250..d7cefbbd077 100644 --- a/source/blender/imbuf/intern/targa.c +++ b/source/blender/imbuf/intern/targa.c @@ -713,7 +713,7 @@ ImBuf *imb_loadtarga(const unsigned char *mem, return ibuf; } - if (!ELEM(tga.imgtyp, 1, 9)) { /* happens sometimes (beuh) */ + if (!ELEM(tga.imgtyp, 1, 9)) { /* happens sometimes (ugh) */ if (cmap) { MEM_freeN(cmap); cmap = NULL; diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index 038c9950968..0d2080b5f0a 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -63,7 +63,7 @@ * because 'near' is disabled through BLI_windstuff */ # include "BLI_winstuff.h" # include "utfconv.h" -# include <direct.h> /* chdir */ +# include <direct.h> /* #chdir */ # include <shlobj.h> #endif diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index 587d6ad9e7e..2fb14e40d9d 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -512,7 +512,7 @@ static int imb_read_tiff_pixels(ImBuf *ibuf, TIFF *image) } if (success) { - /* Code seems to be not needed for 16 bits tif, on PPC G5 OSX (ton) */ + /* Code seems to be not needed for 16 bits TIFF, on PPC G5 OSX (ton) */ if (bitspersample < 16) { if (ENDIAN_ORDER == B_ENDIAN) { IMB_convert_rgba_to_abgr(tmpibuf); @@ -806,7 +806,7 @@ bool imb_savetiff(ImBuf *ibuf, const char *filepath, int flags) /* open TIFF file for writing */ if (flags & IB_mem) { - /* bork at the creation of a TIFF in memory */ + /* Failed to allocate TIFF in memory. */ fprintf(stderr, "imb_savetiff: creation of in-memory TIFF files is " "not yet supported.\n"); diff --git a/source/blender/io/alembic/exporter/abc_writer_mesh.h b/source/blender/io/alembic/exporter/abc_writer_mesh.h index fdf2d3cc1e3..ed4fb4e4514 100644 --- a/source/blender/io/alembic/exporter/abc_writer_mesh.h +++ b/source/blender/io/alembic/exporter/abc_writer_mesh.h @@ -32,7 +32,7 @@ namespace blender::io::alembic { /* Writer for Alembic geometry. Does not assume the object is a mesh object. */ class ABCGenericMeshWriter : public ABCAbstractWriter { private: - /* Either polymesh or subd is used, depending on is_subd_. + /* Either poly-mesh or subdivision-surface is used, depending on is_subd_. * References to the schema must be kept, or Alembic will not properly write. */ Alembic::AbcGeom::OPolyMesh abc_poly_mesh_; Alembic::AbcGeom::OPolyMeshSchema abc_poly_mesh_schema_; diff --git a/source/blender/io/alembic/exporter/abc_writer_transform.cc b/source/blender/io/alembic/exporter/abc_writer_transform.cc index 7fe9fd933c5..eff042d036d 100644 --- a/source/blender/io/alembic/exporter/abc_writer_transform.cc +++ b/source/blender/io/alembic/exporter/abc_writer_transform.cc @@ -94,7 +94,7 @@ void ABCTransformWriter::do_write(HierarchyContext &context) scale_mat[3][3] = args_.export_params->global_scale; /* also scale translation */ mul_m4_m4m4(parent_relative_matrix, parent_relative_matrix, scale_mat); parent_relative_matrix[3][3] /= - args_.export_params->global_scale; /* normalise the homogeneous component */ + args_.export_params->global_scale; /* Normalize the homogeneous component. */ } XformSample xform_sample; diff --git a/source/blender/io/alembic/intern/abc_reader_mesh.cc b/source/blender/io/alembic/intern/abc_reader_mesh.cc index 0b9636ffb70..8133f615080 100644 --- a/source/blender/io/alembic/intern/abc_reader_mesh.cc +++ b/source/blender/io/alembic/intern/abc_reader_mesh.cc @@ -521,7 +521,7 @@ static bool has_animated_geom_params(const ICompoundProperty arbGeomParams) return false; } -/* Specialisation of has_animations() as defined in abc_reader_object.h. */ +/* Specialization of #has_animations() as defined in abc_reader_object.h. */ template<> bool has_animations(Alembic::AbcGeom::IPolyMeshSchema &schema, ImportSettings *settings) { if (settings->is_sequence || !schema.isConstant()) { diff --git a/source/blender/io/collada/AnimationImporter.cpp b/source/blender/io/collada/AnimationImporter.cpp index 9f54bf2aa28..49f28325257 100644 --- a/source/blender/io/collada/AnimationImporter.cpp +++ b/source/blender/io/collada/AnimationImporter.cpp @@ -120,12 +120,12 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve) COLLADAFW::FloatOrDoubleArray &intan = curve->getInTangentValues(); COLLADAFW::FloatOrDoubleArray &outtan = curve->getOutTangentValues(); - /* intangent */ + /* In-tangent. */ unsigned int index = 2 * (j * dim + i); bez.vec[0][0] = bc_get_float_value(intan, index) * fps; bez.vec[0][1] = bc_get_float_value(intan, index + 1); - /* outtangent */ + /* Out-tangent. */ bez.vec[2][0] = bc_get_float_value(outtan, index) * fps; bez.vec[2][1] = bc_get_float_value(outtan, index + 1); if (curve->getInterpolationType() == COLLADAFW::AnimationCurve::INTERPOLATION_BEZIER) { diff --git a/source/blender/io/collada/ArmatureExporter.cpp b/source/blender/io/collada/ArmatureExporter.cpp index 9bf1a4ae830..28f5f9d40bc 100644 --- a/source/blender/io/collada/ArmatureExporter.cpp +++ b/source/blender/io/collada/ArmatureExporter.cpp @@ -197,7 +197,7 @@ void ArmatureExporter::add_bone_node(Bone *bone, add_bone_transform(ob_arm, bone, node); - /* Write nodes of childobjects, remove written objects from list */ + /* Write nodes of child-objects, remove written objects from list. */ std::vector<Object *>::iterator iter = child_objects.begin(); while (iter != child_objects.end()) { @@ -219,7 +219,7 @@ void ArmatureExporter::add_bone_node(Bone *bone, * single matrix the tweak must be applied * to the result. */ if (export_settings.get_open_sim()) { - /* Tweak objects parentinverse to match compatibility. */ + /* Tweak objects parent-inverse to match compatibility. */ float temp[4][4]; copy_m4_m4(temp, bone->arm_mat); diff --git a/source/blender/io/collada/ArmatureImporter.cpp b/source/blender/io/collada/ArmatureImporter.cpp index 7eef5c3f5fb..5c3d6be589a 100644 --- a/source/blender/io/collada/ArmatureImporter.cpp +++ b/source/blender/io/collada/ArmatureImporter.cpp @@ -1108,7 +1108,7 @@ BoneExtended &ArmatureImporter::add_bone_extended(EditBone *bone, } if (!has_connect && this->import_settings->auto_connect) { - /* auto connect only whyen parent has exactly one child*/ + /* Auto connect only when parent has exactly one child. */ connect_type = sibcount == 1; } diff --git a/source/blender/io/collada/BCAnimationCurve.h b/source/blender/io/collada/BCAnimationCurve.h index 27856dd55f4..a1597cd47be 100644 --- a/source/blender/io/collada/BCAnimationCurve.h +++ b/source/blender/io/collada/BCAnimationCurve.h @@ -133,7 +133,7 @@ class BCAnimationCurve { void get_frames(BCFrames &frames) const; - /* Curve edit functions create a copy of the underlaying FCurve */ + /* Curve edit functions create a copy of the underlying #FCurve. */ FCurve *get_edit_fcurve(); bool add_value_from_rna(const int frame); bool add_value_from_matrix(const BCSample &sample, const int frame); diff --git a/source/blender/io/collada/BCAnimationSampler.cpp b/source/blender/io/collada/BCAnimationSampler.cpp index a6ee0b8bee6..b2a9027380e 100644 --- a/source/blender/io/collada/BCAnimationSampler.cpp +++ b/source/blender/io/collada/BCAnimationSampler.cpp @@ -536,7 +536,7 @@ const BCMatrix *BCSampleFrame::get_sample_matrix(Object *ob) const return &sample->get_matrix(); } -/* Get the matrix for the given Bone, returns Unity when the Objewct is not sampled */ +/* Get the matrix for the given Bone, returns Unity when the Object is not sampled. */ const BCMatrix *BCSampleFrame::get_sample_matrix(Object *ob, Bone *bone) const { BCSampleMap::const_iterator it = sampleMap.find(ob); diff --git a/source/blender/io/collada/DocumentImporter.cpp b/source/blender/io/collada/DocumentImporter.cpp index 10c1a90576c..259bf901091 100644 --- a/source/blender/io/collada/DocumentImporter.cpp +++ b/source/blender/io/collada/DocumentImporter.cpp @@ -275,15 +275,15 @@ void DocumentImporter::translate_anim_recursive(COLLADAFW::Node *node, COLLADAFW::Node *par = nullptr, Object *parob = nullptr) { - /* The split in T29246, rootmap must point at actual root when + /* The split in T29246, root_map must point at actual root when * calculating bones in apply_curves_as_matrix. - actual root is the root node. * This has to do with inverse bind poses being world space - * (the sources for skinned bones' restposes) and the way - * non-skinning nodes have their "restpose" recursively calculated. + * (the sources for skinned bones' rest-poses) and the way + * non-skinning nodes have their "rest-pose" recursively calculated. * XXX TODO: design issue, how to support unrelated joints taking * part in skinning. */ if (par) { // && par->getType() == COLLADAFW::Node::JOINT) { - /* par is root if there's no corresp. key in root_map */ + /* If par is root if there's no corresponding key in root_map. */ if (root_map.find(par->getUniqueId()) == root_map.end()) { root_map[node->getUniqueId()] = node; } @@ -942,7 +942,7 @@ bool DocumentImporter::writeCamera(const COLLADAFW::Camera *camera) case CAM_PERSP: default: { double x = camera->getXFov().getValue(); - /* x is in degrees, cam->lens is in millimiters */ + /* X is in degrees, cam->lens is in millimeters. */ cam->lens = fov_to_focallength(DEG2RADF(x), cam->sensor_x); } break; } @@ -955,7 +955,7 @@ bool DocumentImporter::writeCamera(const COLLADAFW::Camera *camera) case CAM_PERSP: default: { double yfov = camera->getYFov().getValue(); - /* yfov is in degrees, cam->lens is in millimiters */ + /* yfov is in degrees, cam->lens is in millimeters. */ cam->lens = fov_to_focallength(DEG2RADF(yfov), cam->sensor_x); } break; } diff --git a/source/blender/io/collada/DocumentImporter.h b/source/blender/io/collada/DocumentImporter.h index a23e983940e..a6ed014a33c 100644 --- a/source/blender/io/collada/DocumentImporter.h +++ b/source/blender/io/collada/DocumentImporter.h @@ -125,7 +125,7 @@ class DocumentImporter : COLLADAFW::IWriter { /** Add element and data for UniqueId */ bool addExtraTags(const COLLADAFW::UniqueId &uid, ExtraTags *extra_tags); - /** Get an extisting ExtraTags for uid */ + /** Get an existing #ExtraTags for uid */ ExtraTags *getExtraTags(const COLLADAFW::UniqueId &uid); bool is_armature(COLLADAFW::Node *node); diff --git a/source/blender/io/collada/MeshImporter.cpp b/source/blender/io/collada/MeshImporter.cpp index 2934ea1caa6..172f9a468b4 100644 --- a/source/blender/io/collada/MeshImporter.cpp +++ b/source/blender/io/collada/MeshImporter.cpp @@ -693,7 +693,7 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, Mesh *me) set_poly_indices(mpoly, mloop, loop_index, triangle_vertex_indices, 3); if (mp_has_normals) { /* vertex normals, same implementation as for the triangles */ - /* the same for vertces normals */ + /* The same for vertices normals. */ unsigned int vertex_normal_indices[3] = { first_normal, normal_indices[1], normal_indices[2]}; if (!is_flat_face(vertex_normal_indices, nor, 3)) { diff --git a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc index eaa4d2fdde7..a33d636500f 100644 --- a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc +++ b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc @@ -400,7 +400,7 @@ static bool remove_weak_subtrees(const HierarchyContext *context, void AbstractHierarchyIterator::export_graph_prune() { - /* Take a copy of the map so that we can modify while recursing. */ + /* Take a copy of the map so that we can modify while recusing. */ ExportGraph unpruned_export_graph = export_graph_; remove_weak_subtrees(HierarchyContext::root(), export_graph_, unpruned_export_graph); } diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index ae23e0b9109..d8c91cb2923 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -3704,7 +3704,7 @@ void RNA_property_pointer_set(PointerRNA *ptr, } } else { - /* Assigning to an IDProperty desguised as RNA one. */ + /* Assigning to an IDProperty disguised as RNA one. */ if (ptr_value.type != NULL && !RNA_struct_is_a(ptr_value.type, &RNA_ID)) { BKE_reportf(reports, RPT_ERROR, @@ -3741,7 +3741,7 @@ void RNA_property_pointer_set(PointerRNA *ptr, pprop->set(ptr, ptr_value, reports); } } - /* IDProperty desguised as RNA property (and not yet defined in ptr). */ + /* IDProperty disguised as RNA property (and not yet defined in ptr). */ else if (prop->flag & PROP_EDITABLE) { IDPropertyTemplate val = {0}; IDProperty *group; @@ -6174,7 +6174,7 @@ char *RNA_path_full_property_py_ex( } else { if (use_fallback) { - /* fuzzy fallback. be explicit in our ignoranc. */ + /* Fuzzy fallback. Be explicit in our ignorance. */ data_path = RNA_property_identifier(prop); data_delim = " ... "; } diff --git a/source/blender/makesrna/intern/rna_animviz.c b/source/blender/makesrna/intern/rna_animviz.c index 06215e16965..8e95388fe2b 100644 --- a/source/blender/makesrna/intern/rna_animviz.c +++ b/source/blender/makesrna/intern/rna_animviz.c @@ -61,7 +61,7 @@ static void rna_AnimViz_path_start_frame_set(PointerRNA *ptr, int value) { bAnimVizSettings *data = (bAnimVizSettings *)ptr->data; - /* XXX: watchit! Path Start > MAXFRAME/2 could be a problem... */ + /* XXX: Watch it! Path Start > MAXFRAME/2 could be a problem. */ data->path_sf = value; FRAMENUMBER_MIN_CLAMP(data->path_sf); diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 4f98c6e8e07..756841dd283 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -1304,7 +1304,7 @@ static void rna_def_gpencil_options(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); - /* Randomnes factor for pressure */ + /* Randomness factor for pressure */ prop = RNA_def_property(srna, "random_pressure", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "draw_random_press"); RNA_def_property_range(prop, 0.0f, 1.0f); @@ -1313,7 +1313,7 @@ static void rna_def_gpencil_options(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); - /* Randomnes factor for strength */ + /* Randomness factor for strength */ prop = RNA_def_property(srna, "random_strength", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "draw_random_strength"); RNA_def_property_range(prop, 0.0f, 1.0f); @@ -1446,7 +1446,7 @@ static void rna_def_gpencil_options(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); - /* fill threshold for transparence */ + /* Fill threshold for transparency. */ prop = RNA_def_property(srna, "fill_threshold", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "fill_threshold"); RNA_def_property_range(prop, 0.0f, 1.0f); diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 4f5828311d8..843cb326be2 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -3032,7 +3032,7 @@ static void rna_def_constraint_spline_ik(BlenderRNA *brna) prop, "Use Original Scale", "Apply volume preservation over the original scaling"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); - /* volume presevation for "volumetric" scale mode */ + /* Volume preservation for "volumetric" scale mode. */ prop = RNA_def_property(srna, "bulge", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, 100.0f); RNA_def_property_ui_text( diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index da04ac63ee3..df3bd0cca29 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -1298,7 +1298,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, dcont = rna_find_container_def(cont); - /* XXX - toto, detect supertype collisions */ + /* TODO: detect super-type collisions. */ if (rna_findlink(&dcont->properties, identifier)) { CLOG_ERROR(&LOG, "duplicate identifier \"%s.%s\"", CONTAINER_RNA_ID(cont), identifier); DefRNA.error = true; diff --git a/source/blender/makesrna/intern/rna_depsgraph.c b/source/blender/makesrna/intern/rna_depsgraph.c index cbb642577e1..aab81b2bd1f 100644 --- a/source/blender/makesrna/intern/rna_depsgraph.c +++ b/source/blender/makesrna/intern/rna_depsgraph.c @@ -684,7 +684,7 @@ static void rna_def_depsgraph(BlenderRNA *brna) "This invalidates all references to evaluated data-blocks from this dependency graph."); RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_REPORTS); - /* Queries for original datablockls (the ones depsgraph is built for). */ + /* Queries for original data-blocks (the ones depsgraph is built for). */ prop = RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Scene"); @@ -699,7 +699,7 @@ static void rna_def_depsgraph(BlenderRNA *brna) RNA_def_property_ui_text( prop, "View Layer", "Original view layer dependency graph is built for"); - /* Queries for evaluated datablockls (the ones depsgraph is evaluating). */ + /* Queries for evaluated data-blocks (the ones depsgraph is evaluating). */ func = RNA_def_function(srna, "id_eval_get", "rna_Depsgraph_id_eval_get"); parm = RNA_def_pointer( diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c index 7c4762aa3a3..83df997b3d4 100644 --- a/source/blender/makesrna/intern/rna_dynamicpaint.c +++ b/source/blender/makesrna/intern/rna_dynamicpaint.c @@ -625,7 +625,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_OUT1); RNA_def_property_ui_text(prop, "Use Output", "Save this output layer"); - /* output for secondary sufrace data */ + /* Output for secondary surface data. */ prop = RNA_def_property(srna, "output_name_b", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "output_name2"); RNA_def_property_ui_text(prop, "Output Name", "Name used to save output from this surface"); diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c index 3ea98d610f4..a34c3c7b536 100644 --- a/source/blender/makesrna/intern/rna_fluid.c +++ b/source/blender/makesrna/intern/rna_fluid.c @@ -1964,7 +1964,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Tension", - "Surface tension of liquid (higher value results in greater hydrophobic behaviour)"); + "Surface tension of liquid (higher value results in greater hydrophobic behavior)"); RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset"); prop = RNA_def_property(srna, "viscosity_base", PROP_FLOAT, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c index 25472ce9520..319aeb69a2b 100644 --- a/source/blender/makesrna/intern/rna_lattice.c +++ b/source/blender/makesrna/intern/rna_lattice.c @@ -132,12 +132,12 @@ static void rna_Lattice_update_size(Main *bmain, Scene *scene, PointerRNA *ptr) Object *ob; int newu, newv, neww; - /* we don't modify the actual pnts, but go through opnts instead */ + /* We don't modify the actual `pnts`, but go through `opnts` instead. */ newu = (lt->opntsu > 0) ? lt->opntsu : lt->pntsu; newv = (lt->opntsv > 0) ? lt->opntsv : lt->pntsv; neww = (lt->opntsw > 0) ? lt->opntsw : lt->pntsw; - /* BKE_lattice_resize needs an object, any object will have the same result */ + /* #BKE_lattice_resize needs an object, any object will have the same result */ for (ob = bmain->objects.first; ob; ob = ob->id.next) { if (ob->data == lt) { BKE_lattice_resize(lt, newu, newv, neww, ob); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index c13f592f7fb..7209d17735a 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -681,7 +681,7 @@ static void rna_Modifier_is_active_set(PointerRNA *ptr, bool value) ModifierData *md = ptr->data; if (value) { - /* Disable the active flag of all other modif-iers. */ + /* Disable the active flag of all other modifiers. */ for (ModifierData *prev_md = md->prev; prev_md != NULL; prev_md = prev_md->prev) { prev_md->flag &= ~eModifierFlag_Active; } diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index c418c8eb4dc..bcdc38a1a3b 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1304,11 +1304,13 @@ static void rna_MaterialSlot_link_set(PointerRNA *ptr, int value) if (value) { ob->matbits[index] = 1; - /* ob->colbits |= (1 << index); */ /* DEPRECATED */ + /* DEPRECATED */ + // ob->colbits |= (1 << index); } else { ob->matbits[index] = 0; - /* ob->colbits &= ~(1 << index); */ /* DEPRECATED */ + /* DEPRECATED */ + // ob->colbits &= ~(1 << index); } } diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index af31f16f4e0..58a89b7ffdc 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1495,7 +1495,7 @@ static const EnumPropertyItem *rna_ImageFormatSettings_exr_codec_itemf(bContext int i = 1, totitem = 0; if (imf->depth == 16) { - return rna_enum_exr_codec_items; /* All compression types are defined for halfs */ + return rna_enum_exr_codec_items; /* All compression types are defined for half-float. */ } for (i = 0; i < R_IMF_EXR_CODEC_MAX; i++) { @@ -2102,7 +2102,7 @@ static char *rna_TransformOrientationSlot_path(PointerRNA *ptr) } } - /* Should not happen, but in case, just return defqult path. */ + /* Should not happen, but in case, just return default path. */ BLI_assert(0); return BLI_strdup("transform_orientation_slots[0]"); } @@ -7712,7 +7712,7 @@ void RNA_def_scene(BlenderRNA *brna) prop, "Preview Range End Frame", "Alternative end frame for UI playback"); RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL); - /* Subframe for moblur debug. */ + /* Sub-frame for motion-blur debug. */ prop = RNA_def_property(srna, "show_subframe", PROP_BOOLEAN, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_boolean_sdna(prop, NULL, "r.flag", SCER_SHOW_SUBFRAME); diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 08387077cea..4481555b931 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -896,7 +896,7 @@ static void rna_def_gp_paint(BlenderRNA *brna) RNA_def_struct_path_func(srna, "rna_GpPaint_path"); RNA_def_struct_ui_text(srna, "Grease Pencil Paint", ""); - /* Use vertex color (main swith). */ + /* Use vertex color (main switch). */ prop = RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mode"); RNA_def_property_enum_items(prop, rna_enum_gpencil_paint_mode); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 06757e533a2..e4d2536eb91 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2478,7 +2478,7 @@ static void rna_FileSelectPrams_filter_glob_set(PointerRNA *ptr, const char *val BLI_strncpy(params->filter_glob, value, sizeof(params->filter_glob)); - /* Remove stupi things like last group being a wildcard-only one... */ + /* Remove stupid things like last group being a wildcard-only one. */ BLI_path_extension_glob_validate(params->filter_glob); } @@ -4658,7 +4658,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) } } - /* Heper for drawing the icon. */ + /* Helper for drawing the icon. */ prop = RNA_def_property(srna, "icon_from_show_object_viewport", PROP_INT, PROP_NONE); RNA_def_property_int_funcs( prop, "rna_SpaceView3D_icon_from_show_object_viewport_get", NULL, NULL); @@ -5702,13 +5702,13 @@ static void rna_def_space_graph(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); - /* dopesheet */ + /* Dope-sheet. */ prop = RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "DopeSheet"); RNA_def_property_pointer_sdna(prop, NULL, "ads"); RNA_def_property_ui_text(prop, "Dope Sheet", "Settings for filtering animation data"); - /* autosnap */ + /* Auto-snap. */ prop = RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "autosnap"); RNA_def_property_enum_items(prop, autosnap_items); @@ -5716,14 +5716,14 @@ static void rna_def_space_graph(BlenderRNA *brna) prop, "Auto Snap", "Automatic time snapping settings for transformations"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); - /* readonly state info */ + /* Read-only state info. */ prop = RNA_def_property(srna, "has_ghost_curves", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_SpaceGraphEditor_has_ghost_curves_get", NULL); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text( prop, "Has Ghost Curves", "Graph Editor instance has some ghost curves stored"); - /* nromalize curves */ + /* Normalize curves. */ prop = RNA_def_property(srna, "use_normalization", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_NORMALIZE); RNA_def_property_ui_text(prop, diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index cfcd9aff759..1d3a7750c39 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -649,7 +649,7 @@ static StructRNA *rna_UIList_register(Main *bmain, uiList dummyuilist = {NULL}; PointerRNA dummyul_ptr; int have_function[3]; - size_t over_alloc = 0; /* warning, if this becomes a bess, we better do another alloc */ + size_t over_alloc = 0; /* Warning, if this becomes a mess, we better do another allocation. */ /* setup dummy menu & menu type to store static properties in */ dummyuilist.type = &dummyult; @@ -669,7 +669,7 @@ static StructRNA *rna_UIList_register(Main *bmain, return NULL; } - /* check if we have registered this uilist type before, and remove it */ + /* Check if we have registered this UI-list type before, and remove it. */ ult = WM_uilisttype_find(dummyult.idname, true); if (ult && ult->rna_ext.srna) { rna_UIList_unregister(bmain, ult->rna_ext.srna); @@ -904,7 +904,7 @@ static StructRNA *rna_Menu_register(Main *bmain, Menu dummymenu = {NULL}; PointerRNA dummymtr; int have_function[2]; - size_t over_alloc = 0; /* warning, if this becomes a bess, we better do another alloc */ + size_t over_alloc = 0; /* Warning, if this becomes a mess, we better do another allocation. */ size_t description_size = 0; char _menu_descr[RNA_DYN_DESCR_MAX]; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 952054a6c53..2803d6c295f 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -243,7 +243,7 @@ void rna_userdef_is_dirty_update(Main *UNUSED(bmain), rna_userdef_is_dirty_update_impl(); } -/** Take care not to use this if we expet 'is_dirty' to be tagged. */ +/** Take care not to use this if we expect 'is_dirty' to be tagged. */ static void rna_userdef_ui_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) @@ -863,7 +863,7 @@ static StructRNA *rna_AddonPref_register(Main *bmain, PointerRNA dummy_ptr; // int have_function[1]; - /* setup dummy addon-pref & addon-pref type to store static properties in */ + /* Setup dummy add-on preference and it's type to store static properties in. */ RNA_pointer_create(NULL, &RNA_AddonPreferences, &dummy_addon, &dummy_ptr); /* validate the python class */ @@ -881,13 +881,13 @@ static StructRNA *rna_AddonPref_register(Main *bmain, return NULL; } - /* check if we have registered this addon-pref type before, and remove it */ + /* Check if we have registered this add-on preference type before, and remove it. */ apt = BKE_addon_pref_type_find(dummy_addon.module, true); if (apt && apt->rna_ext.srna) { rna_AddonPref_unregister(bmain, apt->rna_ext.srna); } - /* create a new addon-pref type */ + /* Create a new add-on preference type. */ apt = MEM_mallocN(sizeof(bAddonPrefType), "addonpreftype"); memcpy(apt, &dummy_apt, sizeof(dummy_apt)); BKE_addon_pref_type_add(apt); diff --git a/source/blender/makesrna/intern/rna_vfont.c b/source/blender/makesrna/intern/rna_vfont.c index a98a52c2252..214a32372dd 100644 --- a/source/blender/makesrna/intern/rna_vfont.c +++ b/source/blender/makesrna/intern/rna_vfont.c @@ -37,7 +37,7 @@ # include "WM_api.h" -/* matching fnction in rna_ID.c */ +/* Matching function in rna_ID.c */ static int rna_VectorFont_filepath_editable(PointerRNA *ptr, const char **UNUSED(r_info)) { VFont *vfont = (VFont *)ptr->owner_id; diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c index 5541fe3053f..6b96562b3f8 100644 --- a/source/blender/makesrna/intern/rna_wm_api.c +++ b/source/blender/makesrna/intern/rna_wm_api.c @@ -162,7 +162,7 @@ static void rna_gizmo_group_type_unlink_delayed(ReportList *reports, const char } } -/* placeholder data for final implementation of a true progressbar */ +/* Placeholder data for final implementation of a true progress-bar. */ static struct wmStaticProgress { float min; float max; diff --git a/source/blender/makesrna/intern/rna_wm_gizmo.c b/source/blender/makesrna/intern/rna_wm_gizmo.c index 00d832e2eef..e61482c91e2 100644 --- a/source/blender/makesrna/intern/rna_wm_gizmo.c +++ b/source/blender/makesrna/intern/rna_wm_gizmo.c @@ -260,7 +260,7 @@ static wmGizmo *rna_GizmoProperties_find_operator(PointerRNA *ptr) wmWindowManager *wm = (wmWindowManager *)ptr->owner_id; # endif - /* We could try workaruond this lookup, but not trivial. */ + /* We could try workaround this lookup, but not trivial. */ for (bScreen *screen = G_MAIN->screens.first; screen; screen = screen->id.next) { IDProperty *properties = ptr->data; LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { @@ -1089,7 +1089,7 @@ static void rna_def_gizmo(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); parm = RNA_def_pointer(func, "event", "Event", "", ""); RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); - /* TODO, shuold be a enum-flag */ + /* TODO, should be a enum-flag */ parm = RNA_def_enum_flag(func, "tweak", tweak_actions, 0, "Tweak", ""); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); parm = RNA_def_enum_flag( diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 412d6b87d82..b48bf722526 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -68,7 +68,8 @@ static void initData(ModifierData *md) MEMCPY_STRUCT_AFTER(amd, DNA_struct_default_get(ArrayModifierData), modifier); - /* Open the first subpanel by default, it corresspnds to Relative offset which is enabled too. */ + /* Open the first sub-panel by default, + * it corresponds to Relative offset which is enabled too. */ md->ui_expand_flag = UI_PANEL_DATA_EXPAND_ROOT | UI_SUBPANEL_DATA_EXPAND_1; } diff --git a/source/blender/modifiers/intern/MOD_collision.c b/source/blender/modifiers/intern/MOD_collision.c index 04b68a7a800..e72e0279263 100644 --- a/source/blender/modifiers/intern/MOD_collision.c +++ b/source/blender/modifiers/intern/MOD_collision.c @@ -222,7 +222,7 @@ static void deformVerts(ModifierData *md, } } - /* happens on file load (ONLY when i decomment changes in readfile.c) */ + /* Happens on file load (ONLY when I un-comment changes in readfile.c) */ if (!collmd->bvhtree) { collmd->bvhtree = bvhtree_build_from_mvert( collmd->current_x, collmd->tri, collmd->tri_num, ob->pd->pdef_sboft); diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c b/source/blender/modifiers/intern/MOD_correctivesmooth.c index 15c4e8af6ce..001c7d8d098 100644 --- a/source/blender/modifiers/intern/MOD_correctivesmooth.c +++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c @@ -423,11 +423,11 @@ static void calc_tangent_ortho(float ts[3][3]) cross_v3_v3v3(ts[1], ts[2], v_tan_a); mul_v3_fl(ts[1], dot_v3v3(ts[1], v_tan_b) < 0.0f ? -1.0f : 1.0f); - /* orthognalise tangent */ + /* Orthogonalize tangent. */ mul_v3_v3fl(t_vec_a, ts[2], dot_v3v3(ts[2], v_tan_a)); sub_v3_v3v3(ts[0], v_tan_a, t_vec_a); - /* orthognalise bitangent */ + /* Orthogonalize bi-tangent. */ mul_v3_v3fl(t_vec_a, ts[2], dot_v3v3(ts[2], ts[1])); mul_v3_v3fl(t_vec_b, ts[0], dot_v3v3(ts[0], ts[1]) / dot_v3v3(v_tan_a, v_tan_a)); sub_v3_v3(ts[1], t_vec_a); diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index f967fa5ea2f..23bfe76a5c3 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -518,7 +518,7 @@ class GeometryNodesEvaluator { * TODO(Hans): Codify this with some sort of table or refactor IDProperty use in RNA_access.c. */ struct SocketPropertyType { - /* Create the actual propery used to store the data for the modifier. */ + /* Create the actual property used to store the data for the modifier. */ IDProperty *(*create_prop)(const bNodeSocket &socket, const char *name); /* Reused to build the "soft_min" property too. */ IDProperty *(*create_min_ui_prop)(const bNodeSocket &socket, const char *name); diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index b59907cc1e9..84360caa345 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -778,7 +778,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * * use edge connectivity work this out */ if (SV_IS_VALID(vc->v[0])) { if (SV_IS_VALID(vc->v[1])) { - /* 2 edges connedted */ + /* 2 edges connected. */ /* make 2 connecting vert locations relative to the middle vert */ sub_v3_v3v3(tmp_vec1, mvert_new[vc->v[0]].co, mvert_new[i].co); sub_v3_v3v3(tmp_vec2, mvert_new[vc->v[1]].co, mvert_new[i].co); diff --git a/source/blender/modifiers/intern/MOD_simpledeform.c b/source/blender/modifiers/intern/MOD_simpledeform.c index e41e70864dc..ea31bdc6e31 100644 --- a/source/blender/modifiers/intern/MOD_simpledeform.c +++ b/source/blender/modifiers/intern/MOD_simpledeform.c @@ -256,7 +256,7 @@ static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, smd->limit[0] = min_ff(smd->limit[0], smd->limit[1]); /* Upper limit >= than lower limit */ - /* Calculate matrixs do convert between coordinate spaces */ + /* Calculate matrix to convert between coordinate spaces. */ if (smd->origin != NULL) { transf = &tmp_transf; BLI_SPACE_TRANSFORM_SETUP(transf, ob, smd->origin); @@ -314,7 +314,7 @@ static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, simpleDeform_callback = simpleDeform_stretch; break; default: - return; /* No simpledeform mode? */ + return; /* No simple-deform mode? */ } if (smd->mode == MOD_SIMPLEDEFORM_MODE_BEND) { diff --git a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c index f62980ec4fd..0f8503eddde 100644 --- a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c +++ b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.c @@ -2434,9 +2434,9 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md, vm[orig_mloop[loopstart + j].v]); BLI_assert(flip || vm[orig_medge[new_edge->old_edge].v1] == vm[orig_mloop[loopstart + j].v]); - /* The vert thats in the current loop. */ + /* The vert that's in the current loop. */ const uint new_v1 = new_edge->link_edge_groups[flip]->new_vert; - /* The vert thats in the next loop. */ + /* The vert that's in the next loop. */ const uint new_v2 = new_edge->link_edge_groups[1 - flip]->new_vert; if (k == 0 || face_verts[k - 1] != new_v1) { face_loops[k] = loopstart + j; diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c index 008e258dc7a..357cfb562a7 100644 --- a/source/blender/modifiers/intern/MOD_surfacedeform.c +++ b/source/blender/modifiers/intern/MOD_surfacedeform.c @@ -104,7 +104,7 @@ typedef struct SDefBindCalcData { * needed once when running bind, so optimizing this structure isn't a priority. */ typedef struct SDefBindPoly { - /** Coordinates copied directly from the modifiers inptut. */ + /** Coordinates copied directly from the modifiers input. */ float (*coords)[3]; /** Coordinates projected into 2D space using `normal`. */ float (*coords_v2)[2]; diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c index 1e81621246e..8ecee9b3f2e 100644 --- a/source/blender/python/intern/bpy_app_handlers.c +++ b/source/blender/python/intern/bpy_app_handlers.c @@ -286,7 +286,7 @@ void BPY_app_handlers_reset(const short do_all) } else { /* remove */ - /* PySequence_DelItem(ls, i); */ /* more obvious buw slower */ + /* PySequence_DelItem(ls, i); */ /* more obvious but slower */ PyList_SetSlice(ls, i, i + 1, NULL); } } diff --git a/source/blender/python/intern/bpy_interface_atexit.c b/source/blender/python/intern/bpy_interface_atexit.c index 8e5a6dc530b..03d51b2fd59 100644 --- a/source/blender/python/intern/bpy_interface_atexit.c +++ b/source/blender/python/intern/bpy_interface_atexit.c @@ -42,7 +42,7 @@ static PyObject *bpy_atexit(PyObject *UNUSED(self), PyObject *UNUSED(args), PyOb } static PyMethodDef meth_bpy_atexit = {"bpy_atexit", (PyCFunction)bpy_atexit, METH_NOARGS, NULL}; -static PyObject *func_bpy_atregister = NULL; /* borrowed referebce, atexit holds */ +static PyObject *func_bpy_atregister = NULL; /* borrowed reference, `atexit` holds. */ static void atexit_func_call(const char *func_name, PyObject *atexit_func_arg) { diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 2242cecab20..39ba8448795 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -605,7 +605,7 @@ static short pyrna_rotation_euler_order_get(PointerRNA *ptr, if (*r_prop_eul_order) { const short order = RNA_property_enum_get(ptr, *r_prop_eul_order); - /* Could be quat or axisangle. */ + /* Could be quaternion or axis-angle. */ if (order >= EULER_ORDER_XYZ && order <= EULER_ORDER_ZYX) { return order; } @@ -5051,7 +5051,7 @@ static PyObject *pyrna_prop_collection_find(BPy_PropertyRNA *self, PyObject *key { Py_ssize_t key_len_ssize_t; const char *key = _PyUnicode_AsStringAndSize(key_ob, &key_len_ssize_t); - const int key_len = (int)key_len_ssize_t; /* Comare with same type. */ + const int key_len = (int)key_len_ssize_t; /* Compare with same type. */ char name[256], *nameptr; int namelen; @@ -5094,7 +5094,7 @@ static bool foreach_attr_type(BPy_PropertyRNA *self, *r_attr_tot = 0; *r_attr_signed = false; - /* Note: this is fail with zero length lists, so don't let this get caled in that case. */ + /* NOTE: this is fail with zero length lists, so don't let this get called in that case. */ RNA_PROP_BEGIN (&self->ptr, itemptr, self->prop) { prop = RNA_struct_find_property(&itemptr, attr); if (prop) { diff --git a/source/blender/render/RE_multires_bake.h b/source/blender/render/RE_multires_bake.h index fd200e85719..42ee2c57fbb 100644 --- a/source/blender/render/RE_multires_bake.h +++ b/source/blender/render/RE_multires_bake.h @@ -53,7 +53,7 @@ typedef struct MultiresBakeRender { int baked_objects, baked_faces; int raytrace_structure; /* Optimization structure to be used for AO baking */ - int octree_resolution; /* Reslution of octotree when using octotree optimization structure */ + int octree_resolution; /* Resolution of octree when using octree optimization structure */ int threads; /* Number of threads to be used for baking */ float user_scale; /* User scale used to scale displacement when baking derivative map. */ diff --git a/source/blender/render/RE_pipeline.h b/source/blender/render/RE_pipeline.h index c0b87f4246a..688709d55f3 100644 --- a/source/blender/render/RE_pipeline.h +++ b/source/blender/render/RE_pipeline.h @@ -256,7 +256,7 @@ void RE_SetCamera(struct Render *re, struct Object *cam_ob); /* get current view and window transform */ void RE_GetViewPlane(struct Render *re, rctf *r_viewplane, rcti *r_disprect); -/* set the render threads based on the command-line and autothreads setting */ +/* Set the render threads based on the command-line and auto-threads setting. */ void RE_init_threadcount(Render *re); bool RE_WriteRenderViewsImage(struct ReportList *reports, diff --git a/source/blender/render/intern/initrender.c b/source/blender/render/intern/initrender.c index 80f6badb924..3494aa06833 100644 --- a/source/blender/render/intern/initrender.c +++ b/source/blender/render/intern/initrender.c @@ -177,8 +177,11 @@ void RE_SetOverrideCamera(Render *re, Object *cam_ob) re->camera_override = cam_ob; } -/* call this after InitState() */ -/* per render, there's one persistent viewplane. Parts will set their own viewplanes */ +/** + * Per render, there's one persistent view-plane. Parts will set their own view-planes. + * + * \note call this after #RE_InitState(). + */ void RE_SetCamera(Render *re, Object *cam_ob) { CameraParams params; diff --git a/source/blender/render/intern/pipeline.c b/source/blender/render/intern/pipeline.c index d9515bca2d5..99404c1a1f5 100644 --- a/source/blender/render/intern/pipeline.c +++ b/source/blender/render/intern/pipeline.c @@ -2737,7 +2737,7 @@ void RE_init_threadcount(Render *re) void RE_layer_load_from_file( RenderLayer *layer, ReportList *reports, const char *filename, int x, int y) { - /* OCIO_TODO: assume layer was saved in defaule color space */ + /* OCIO_TODO: assume layer was saved in default color space */ ImBuf *ibuf = IMB_loadiffname(filename, IB_rect, NULL); RenderPass *rpass = NULL; diff --git a/source/blender/render/intern/render_result.c b/source/blender/render/intern/render_result.c index f135adc9f05..f73a200f3c6 100644 --- a/source/blender/render/intern/render_result.c +++ b/source/blender/render/intern/render_result.c @@ -443,7 +443,7 @@ RenderResult *render_result_new( } FOREACH_VIEW_LAYER_TO_RENDER_END; - /* previewrender doesn't do layers, so we make a default one */ + /* Preview-render doesn't do layers, so we make a default one. */ if (BLI_listbase_is_empty(&rr->layers) && !(layername && layername[0])) { rl = MEM_callocN(sizeof(RenderLayer), "new render layer"); BLI_addtail(&rr->layers, rl); diff --git a/source/blender/render/intern/render_types.h b/source/blender/render/intern/render_types.h index 6be5fb4792c..7a4374dcf7c 100644 --- a/source/blender/render/intern/render_types.h +++ b/source/blender/render/intern/render_types.h @@ -103,7 +103,7 @@ struct Render { /* Camera transform, only used by Freestyle. */ float winmat[4][4]; - /* clippping */ + /* Clipping. */ float clip_start; float clip_end; diff --git a/source/blender/render/intern/texture_procedural.c b/source/blender/render/intern/texture_procedural.c index a98f29a705d..b0ab20de10d 100644 --- a/source/blender/render/intern/texture_procedural.c +++ b/source/blender/render/intern/texture_procedural.c @@ -77,7 +77,7 @@ void RE_texture_rng_exit(void) /* ------------------------------------------------------------------------- */ -/* this allows colorbanded textures to control normals as well */ +/* This allows color-banded textures to control normals as well. */ static void tex_normal_derivate(const Tex *tex, TexResult *texres) { if (tex->flag & TEX_COLORBAND) { @@ -167,7 +167,7 @@ static int blend(const Tex *tex, const float texvec[3], TexResult *texres) /* ------------------------------------------------------------------------- */ /* ************************************************************************* */ -/* newnoise: all noisebased types now have different noisebases to choose from */ +/* newnoise: all noise-based types now have different noise-bases to choose from. */ static int clouds(const Tex *tex, const float texvec[3], TexResult *texres) { @@ -1059,7 +1059,7 @@ static void do_2d_mapping( dyt[2] *= 0.5f; } - /* if area, then reacalculate dxt[] and dyt[] */ + /* If area, then recalculate `dxt[]` and `dyt[]` */ if (areaflag) { fx = area[0]; fy = area[1]; diff --git a/source/blender/render/intern/zbuf.c b/source/blender/render/intern/zbuf.c index d74ab330dc2..33af3bbaf29 100644 --- a/source/blender/render/intern/zbuf.c +++ b/source/blender/render/intern/zbuf.c @@ -166,7 +166,7 @@ static void zbuf_add_to_span(ZSpan *zspan, const float v1[2], const float v2[2]) } for (y = my2; y >= my0; y--, xs0 += dx0) { - /* xs0 is the xcoord! */ + /* xs0 is the X-coordinate! */ span[y] = xs0; } } diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index b564ecd3f36..e9de73bc093 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -599,10 +599,12 @@ static void multibuf(ImBuf *ibuf, const float fmul) } } -/* Effect, mask and scene in strip input strips are rendered in preview resolution. They are - * already downscaled. input_preprocess() does not expect this to happen. Other strip types are - * rendered with original media resolution, unless proxies are enabled for them. With proxies - * is_proxy_image will be set correctly to true.*/ +/** + * Effect, mask and scene in strip input strips are rendered in preview resolution. + * They are already down-scaled. #input_preprocess() does not expect this to happen. + * Other strip types are rendered with original media resolution, unless proxies are + * enabled for them. With proxies `is_proxy_image` will be set correctly to true. + */ static bool seq_need_scale_to_render_size(const Sequence *seq, bool is_proxy_image) { if (is_proxy_image) { diff --git a/source/blender/simulation/intern/implicit_blender.c b/source/blender/simulation/intern/implicit_blender.c index 4c4d3e8a821..cf092d7716a 100644 --- a/source/blender/simulation/intern/implicit_blender.c +++ b/source/blender/simulation/intern/implicit_blender.c @@ -1693,7 +1693,7 @@ BLI_INLINE void dfdx_damp(float to[3][3], BLI_INLINE void dfdv_damp(float to[3][3], const float dir[3], float damping) { - /* derivative of force wrt velocity */ + /* Derivative of force with regards to velocity. */ outerproduct(to, dir, dir); mul_m3_fl(to, -damping); } @@ -1727,7 +1727,7 @@ BLI_INLINE float fbstar(float length, float L, float kb, float cb) return tempfb_fl; } -/* function to calculae bending spring force (taken from Choi & Co) */ +/* Function to calculate bending spring force (taken from Choi & Co). */ BLI_INLINE float fbstar_jacobi(float length, float L, float kb, float cb) { float tempfb_fl = kb * fb(length, L); diff --git a/source/blender/simulation/intern/implicit_eigen.cpp b/source/blender/simulation/intern/implicit_eigen.cpp index ea1729589d6..8eb227d38ab 100644 --- a/source/blender/simulation/intern/implicit_eigen.cpp +++ b/source/blender/simulation/intern/implicit_eigen.cpp @@ -904,7 +904,7 @@ BLI_INLINE void dfdx_damp(float to[3][3], BLI_INLINE void dfdv_damp(float to[3][3], const float dir[3], float damping) { - /* derivative of force wrt velocity */ + /* Derivative of force with regards to velocity. */ outerproduct(to, dir, dir); mul_m3_fl(to, -damping); } @@ -936,7 +936,7 @@ BLI_INLINE float fbstar(float length, float L, float kb, float cb) } } -/* function to calculae bending spring force (taken from Choi & Co) */ +/* Function to calculate bending spring force (taken from Choi & Co). */ BLI_INLINE float fbstar_jacobi(float length, float L, float kb, float cb) { float tempfb_fl = kb * fb(length, L); diff --git a/source/blender/windowmanager/xr/intern/wm_xr_draw.c b/source/blender/windowmanager/xr/intern/wm_xr_draw.c index 499ec136e03..cc4a7e41e82 100644 --- a/source/blender/windowmanager/xr/intern/wm_xr_draw.c +++ b/source/blender/windowmanager/xr/intern/wm_xr_draw.c @@ -129,7 +129,7 @@ void wm_xr_draw_view(const GHOST_XrDrawViewInfo *draw_view, void *customdata) /* Some systems have drawing glitches without this. */ GPU_clear_depth(1.0f); - /* Draws the view into the surface_data->viewport's framebuffers */ + /* Draws the view into the surface_data->viewport's frame-buffers. */ ED_view3d_draw_offscreen_simple(draw_data->depsgraph, draw_data->scene, &settings->shading, |