diff options
85 files changed, 169 insertions, 165 deletions
diff --git a/intern/ghost/intern/GHOST_ModifierKeys.h b/intern/ghost/intern/GHOST_ModifierKeys.h index f83e861f8b6..e2afc879411 100644 --- a/intern/ghost/intern/GHOST_ModifierKeys.h +++ b/intern/ghost/intern/GHOST_ModifierKeys.h @@ -55,19 +55,19 @@ struct GHOST_ModifierKeys { */ bool equals(const GHOST_ModifierKeys &keys) const; - /** Bitfield that stores the appropriate key state. */ + /** Bit-field that stores the appropriate key state. */ uint8_t m_LeftShift : 1; - /** Bitfield that stores the appropriate key state. */ + /** Bit-field that stores the appropriate key state. */ uint8_t m_RightShift : 1; - /** Bitfield that stores the appropriate key state. */ + /** Bit-field that stores the appropriate key state. */ uint8_t m_LeftAlt : 1; - /** Bitfield that stores the appropriate key state. */ + /** Bit-field that stores the appropriate key state. */ uint8_t m_RightAlt : 1; - /** Bitfield that stores the appropriate key state. */ + /** Bit-field that stores the appropriate key state. */ uint8_t m_LeftControl : 1; - /** Bitfield that stores the appropriate key state. */ + /** Bit-field that stores the appropriate key state. */ uint8_t m_RightControl : 1; - /** Bitfield that stores the appropriate key state. */ + /** Bit-field that stores the appropriate key state. */ uint8_t m_LeftOS : 1; uint8_t m_RightOS : 1; }; diff --git a/intern/ghost/intern/GHOST_System.cpp b/intern/ghost/intern/GHOST_System.cpp index bfb7c958048..714565568dc 100644 --- a/intern/ghost/intern/GHOST_System.cpp +++ b/intern/ghost/intern/GHOST_System.cpp @@ -8,7 +8,7 @@ #include "GHOST_System.h" #include <chrono> -#include <cstdio> /* just for printf */ +#include <cstdio> /* Just for #printf. */ #include "GHOST_DisplayManager.h" #include "GHOST_EventManager.h" diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h index b741489d929..0048ad4dde5 100644 --- a/source/blender/blenkernel/BKE_main.h +++ b/source/blender/blenkernel/BKE_main.h @@ -113,8 +113,10 @@ typedef struct Main { char filepath[1024]; /* 1024 = FILE_MAX */ short versionfile, subversionfile; /* see BLENDER_FILE_VERSION, BLENDER_FILE_SUBVERSION */ short minversionfile, minsubversionfile; - uint64_t build_commit_timestamp; /* commit's timestamp from buildinfo */ - char build_hash[16]; /* hash from buildinfo */ + /** Commit timestamp from `buildinfo`. */ + uint64_t build_commit_timestamp; + /** Commit Hash from `buildinfo`. */ + char build_hash[16]; /** Indicate the #Main.filepath (file) is the recovered one. */ bool recovered; /** All current ID's exist in the last memfile undo step. */ diff --git a/source/blender/blenkernel/BKE_mball.h b/source/blender/blenkernel/BKE_mball.h index 7d265ceb102..5ffaa13d9d2 100644 --- a/source/blender/blenkernel/BKE_mball.h +++ b/source/blender/blenkernel/BKE_mball.h @@ -88,7 +88,7 @@ void BKE_mball_translate(struct MetaBall *mb, const float offset[3]); */ struct MetaElem *BKE_mball_element_add(struct MetaBall *mb, int type); -/* *** select funcs *** */ +/* *** Select functions *** */ int BKE_mball_select_count(const struct MetaBall *mb); int BKE_mball_select_count_multi(struct Base **bases, int bases_len); diff --git a/source/blender/blenkernel/BKE_nla.h b/source/blender/blenkernel/BKE_nla.h index 2613f4286f0..9d3000759ab 100644 --- a/source/blender/blenkernel/BKE_nla.h +++ b/source/blender/blenkernel/BKE_nla.h @@ -7,7 +7,7 @@ * \ingroup bke */ -/* temp constant defined for these funcs only... */ +/** Temp constant defined for these functions only. */ #define NLASTRIP_MIN_LEN_THRESH 0.1f #ifdef __cplusplus diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 75654a86409..7d019dcc7cb 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -477,7 +477,7 @@ struct bNodeTree *ntreeAddTreeEmbedded(struct Main *bmain, const char *name, const char *idname); -/* copy/free funcs, need to manage ID users */ +/* Copy/free functions, need to manage ID users. */ /** * Free (or release) any data used by this node-tree. diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h index 48402123365..efb8c2a9bb1 100644 --- a/source/blender/blenkernel/BKE_pointcache.h +++ b/source/blender/blenkernel/BKE_pointcache.h @@ -285,7 +285,7 @@ void BKE_ptcache_ids_from_object(struct ListBase *lb, struct Scene *scene, int duplis); -/****************** Query funcs ****************************/ +/****************** Query functions ****************************/ /** * Check whether object has a point cache. diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c index 8384e94e6d5..c3384239cb6 100644 --- a/source/blender/blenkernel/intern/camera.c +++ b/source/blender/blenkernel/intern/camera.c @@ -350,7 +350,7 @@ void BKE_camera_params_from_view3d(CameraParams *params, /* orthographic view */ float sensor_size = BKE_camera_sensor_size( params->sensor_fit, params->sensor_x, params->sensor_y); - /* Halve, otherwise too extreme low zbuffer quality. */ + /* Halve, otherwise too extreme low Z-buffer quality. */ params->clip_end *= 0.5f; params->clip_start = -params->clip_end; @@ -401,7 +401,7 @@ void BKE_camera_params_compute_viewplane( pixsize *= params->zoom; /* compute view plane: - * fully centered, zbuffer fills in jittered between -.5 and +.5 */ + * Fully centered, Z-buffer fills in jittered between `-.5` and `+.5`. */ viewplane.xmin = -0.5f * (float)winx; viewplane.ymin = -0.5f * params->ycor * (float)winy; viewplane.xmax = 0.5f * (float)winx; diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 0b07d2f979f..cd381e15635 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -1283,9 +1283,8 @@ static void trackto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *tar cob->matrix[2][1] = 0; cob->matrix[2][2] = size[2]; - /* targetmat[2] instead of ownermat[2] is passed to vectomat - * for backwards compatibility it seems... (Aligorith) - */ + /* NOTE(@joshualung): `targetmat[2]` instead of `ownermat[2]` is passed to #vectomat + * for backwards compatibility it seems. */ sub_v3_v3v3(vec, cob->matrix[3], ct->matrix[3]); vectomat( vec, ct->matrix[2], (short)data->reserved1, (short)data->reserved2, data->flags, totmat); diff --git a/source/blender/blenkernel/intern/curve.cc b/source/blender/blenkernel/intern/curve.cc index aebdb8cc690..ca390fae424 100644 --- a/source/blender/blenkernel/intern/curve.cc +++ b/source/blender/blenkernel/intern/curve.cc @@ -2247,7 +2247,7 @@ static void minimum_twist_between_two_points(BevPoint *current_point, BevPoint * static void make_bevel_list_3D_minimum_twist(BevList *bl) { - BevPoint *bevp2, *bevp1, *bevp0; /* standard for all make_bevel_list_3D_* funcs */ + BevPoint *bevp2, *bevp1, *bevp0; /* Standard for all make_bevel_list_3D_* functions. */ int nr; float q[4]; @@ -2358,7 +2358,7 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl) static void make_bevel_list_3D_tangent(BevList *bl) { - BevPoint *bevp2, *bevp1, *bevp0; /* standard for all make_bevel_list_3D_* funcs */ + BevPoint *bevp2, *bevp1, *bevp0; /* Standard for all make_bevel_list_3D_* functions. */ int nr; float bevp0_tan[3]; diff --git a/source/blender/blenkernel/intern/lib_remap.c b/source/blender/blenkernel/intern/lib_remap.c index 28b0337d9a2..2ebdc6788d9 100644 --- a/source/blender/blenkernel/intern/lib_remap.c +++ b/source/blender/blenkernel/intern/lib_remap.c @@ -817,7 +817,7 @@ void BKE_libblock_relink_ex( Main *bmain, void *idv, void *old_idv, void *new_idv, const short remap_flags) { - /* Should be able to replace all _relink() funcs (constraints, rigidbody, etc.) ? */ + /* Should be able to replace all _relink() functions (constraints, rigidbody, etc.) ? */ ID *id = idv; ID *old_id = old_idv; diff --git a/source/blender/blenkernel/intern/particle_distribute.c b/source/blender/blenkernel/intern/particle_distribute.c index ed1d93647ce..561043b553e 100644 --- a/source/blender/blenkernel/intern/particle_distribute.c +++ b/source/blender/blenkernel/intern/particle_distribute.c @@ -453,7 +453,7 @@ static int distribute_binary_search(const float *sum, int n, float value) return low; } -/* the max number if calls to rng_* funcs within psys_thread_distribute_particle +/* the max number if calls to rng_* functions within psys_thread_distribute_particle * be sure to keep up to date if this changes */ #define PSYS_RND_DIST_SKIP 3 diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c index e065180b600..70d442021fe 100644 --- a/source/blender/blenkernel/intern/pbvh_bmesh.c +++ b/source/blender/blenkernel/intern/pbvh_bmesh.c @@ -2005,7 +2005,7 @@ bool BKE_pbvh_bmesh_update_topology(PBVH *pbvh, BLI_mempool_destroy(queue_pool); } - /* Unmark nodes */ + /* Unmark nodes. */ for (int n = 0; n < pbvh->totnode; n++) { PBVHNode *node = &pbvh->nodes[n]; diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index cefc577d1f1..03f0c3ff1e9 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -1662,7 +1662,7 @@ static void direct_link_area(BlendDataReader *reader, ScrArea *area) LISTBASE_FOREACH_MUTABLE (ConsoleLine *, cl, &sconsole->history) { BLO_read_data_address(reader, &cl->line); if (cl->line) { - /* the allocted length is not written, so reset here */ + /* The allocated length is not written, so reset here. */ cl->len_alloc = cl->len + 1; } else { diff --git a/source/blender/blenlib/BLI_listbase_wrapper.hh b/source/blender/blenlib/BLI_listbase_wrapper.hh index 2d631cb2441..a32243bc411 100644 --- a/source/blender/blenlib/BLI_listbase_wrapper.hh +++ b/source/blender/blenlib/BLI_listbase_wrapper.hh @@ -42,7 +42,7 @@ template<typename T> class ListBaseWrapper { Iterator &operator++() { - /* Some types store next/prev using `void *`, so cast is necessary. */ + /* Some types store `next/prev` using `void *`, so cast is necessary. */ current_ = static_cast<T *>(current_->next); return *this; } diff --git a/source/blender/blenlib/intern/BLI_memarena.c b/source/blender/blenlib/intern/BLI_memarena.c index ada2d27f9b2..71a5dd0e044 100644 --- a/source/blender/blenlib/intern/BLI_memarena.c +++ b/source/blender/blenlib/intern/BLI_memarena.c @@ -53,7 +53,7 @@ static void memarena_buf_free_all(struct MemBuf *mb) while (mb != NULL) { struct MemBuf *mb_next = mb->next; - /* Unpoison memory because MEM_freeN might overwrite it. */ + /* Unpoison memory because #MEM_freeN might overwrite it. */ BLI_asan_unpoison(mb, (uint)MEM_allocN_len(mb)); MEM_freeN(mb); diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index 92fd7f5937b..33d387a5447 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -44,7 +44,7 @@ typedef struct ScanFillVertLink { ScanFillEdge *edge_first, *edge_last; } ScanFillVertLink; -/* local funcs */ +/* Local functions. */ #define SF_EPSILON 0.00003f #define SF_EPSILON_SQ (SF_EPSILON * SF_EPSILON) diff --git a/source/blender/blenlib/intern/string_cursor_utf8.c b/source/blender/blenlib/intern/string_cursor_utf8.c index 7a23b4bb4ad..6b7151be969 100644 --- a/source/blender/blenlib/intern/string_cursor_utf8.c +++ b/source/blender/blenlib/intern/string_cursor_utf8.c @@ -206,7 +206,7 @@ void BLI_str_cursor_step_utf8(const char *str, * less complex since it doesn't need to do multi-byte stepping. */ -/* helper funcs so we can match BLI_str_cursor_step_utf8 */ +/* Helper functions so we can match #BLI_str_cursor_step_utf8. */ static bool cursor_step_next_utf32(const char32_t *UNUSED(str), size_t maxlen, int *pos) { if ((*pos) >= (int)maxlen) { diff --git a/source/blender/blenloader/BLO_read_write.h b/source/blender/blenloader/BLO_read_write.h index 7e2f5e4b0ae..6f39670a226 100644 --- a/source/blender/blenloader/BLO_read_write.h +++ b/source/blender/blenloader/BLO_read_write.h @@ -219,8 +219,8 @@ void *BLO_read_get_new_packed_address(BlendDataReader *reader, const void *old_a typedef void (*BlendReadListFn)(BlendDataReader *reader, void *data); /** - * Updates all ->prev and ->next pointers of the list elements. - * Updates the list->first and list->last pointers. + * Updates all `->prev` and `->next` pointers of the list elements. + * Updates the `list->first` and `list->last` pointers. * When not NULL, calls the callback on every element. */ void BLO_read_list_cb(BlendDataReader *reader, struct ListBase *list, BlendReadListFn callback); diff --git a/source/blender/bmesh/intern/bmesh_log.h b/source/blender/bmesh/intern/bmesh_log.h index 5daa5dd9a68..75ff54c7d46 100644 --- a/source/blender/bmesh/intern/bmesh_log.h +++ b/source/blender/bmesh/intern/bmesh_log.h @@ -22,7 +22,7 @@ BMLog *BM_log_create(BMesh *bm); /** * Allocate and initialize a new #BMLog using existing #BMLogEntries * - * The 'entry' should be the last entry in the BMLog. Its prev pointer + * The 'entry' should be the last entry in the #BMLog. Its `prev` pointer * will be followed back to find the first entry. * * The unused IDs field of the log will be initialized by taking all diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c index f348cd58085..a1c2815ab2f 100644 --- a/source/blender/bmesh/intern/bmesh_marking.c +++ b/source/blender/bmesh/intern/bmesh_marking.c @@ -1020,7 +1020,7 @@ static BMEditSelection *bm_select_history_create(BMHeader *ele) return ese; } -/* --- macro wrapped funcs --- */ +/* --- Macro wrapped functions. --- */ bool _bm_select_history_check(BMesh *bm, const BMHeader *ele) { @@ -1075,7 +1075,7 @@ void _bm_select_history_store_after(BMesh *bm, BMEditSelection *ese_ref, BMHeade BM_select_history_store_after_notest(bm, ese_ref, (BMElem *)ele); } } -/* --- end macro wrapped funcs --- */ +/* --- End macro wrapped functions --- */ void BM_select_history_clear(BMesh *bm) { diff --git a/source/blender/bmesh/operators/bmo_connect.c b/source/blender/bmesh/operators/bmo_connect.c index 42de425103e..59a12db9241 100644 --- a/source/blender/bmesh/operators/bmo_connect.c +++ b/source/blender/bmesh/operators/bmo_connect.c @@ -18,7 +18,7 @@ #define VERT_INPUT 1 #define EDGE_OUT 1 -/* Edge spans 2 VERT_INPUT's, its a nop, +/* Edge spans 2 VERT_INPUT's, its a NOP, * but include in "edges.out" */ #define EDGE_OUT_ADJ 2 diff --git a/source/blender/bmesh/operators/bmo_removedoubles.c b/source/blender/bmesh/operators/bmo_removedoubles.c index e3275555b86..99ca49f3d4f 100644 --- a/source/blender/bmesh/operators/bmo_removedoubles.c +++ b/source/blender/bmesh/operators/bmo_removedoubles.c @@ -657,10 +657,10 @@ static void bmesh_find_doubles_common(BMesh *bm, for (int i = 0; i < verts_len; i++) { BMVert *v_check = verts[i]; if (duplicates[i] == -1) { - /* nop (others can use as target) */ + /* NOP (others can use as target). */ } else if (duplicates[i] == i) { - /* keep (others can use as target) */ + /* Keep (others can use as target). */ } else { BMVert *v_other = verts[duplicates[i]]; diff --git a/source/blender/bmesh/operators/bmo_subdivide_edgering.c b/source/blender/bmesh/operators/bmo_subdivide_edgering.c index 3d2f5947539..5a2b38dea9b 100644 --- a/source/blender/bmesh/operators/bmo_subdivide_edgering.c +++ b/source/blender/bmesh/operators/bmo_subdivide_edgering.c @@ -42,7 +42,7 @@ #define FACE_IN_STACK (1 << 2) /* -------------------------------------------------------------------- */ -/* Specialized Utility Funcs */ +/* Specialized Utility Functions */ #ifndef NDEBUG static uint bm_verts_tag_count(BMesh *bm) @@ -291,7 +291,7 @@ static void bm_edge_subdiv_as_loop( } /* -------------------------------------------------------------------- */ -/* LoopPair Cache (struct and util funcs) */ +/* LoopPair Cache (struct and utilities functions) */ /** * Use for finding spline handle direction from surrounding faces. diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index aa2c93f7c5a..eaf697e78f7 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -7083,7 +7083,7 @@ static void bevel_build_edge_polygons(BMesh *bm, BevelParams *bp, BMEdge *bme) } } - /* Fix UVs along end edge joints. A nop unless other side built already. */ + /* Fix UVs along end edge joints. A NOP unless other side built already. */ /* TODO: If some seam, may want to do selective merge. */ if (!bv1->any_seam && bv1->vmesh->mesh_kind == M_NONE) { bev_merge_end_uvs(bm, bv1, e1); diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc index ea156cd19db..fed11d59b50 100644 --- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc +++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc @@ -812,7 +812,7 @@ static void do_allEdgeDetection(unsigned int t, if (!limask[a]) { /* If the inner mask is empty. */ if (lomask[a]) { /* If the outer mask is full. */ /* - * Next we test all 4 directions around the current pixel: next/prev/up/down + * Next we test all 4 directions around the current pixel: next/previous/up/down * The test ensures that the outer mask is empty and that the inner mask * is also empty. If both conditions are true for any one of the 4 adjacent pixels * then the current pixel is counted as being a true outer edge pixel. @@ -882,7 +882,7 @@ static void do_adjacentEdgeDetection(unsigned int t, if (!limask[a]) { /* If the inner mask is empty. */ if (lomask[a]) { /* If the outer mask is full. */ /* - * Next we test all 4 directions around the current pixel: next/prev/up/down + * Next we test all 4 directions around the current pixel: next/previous/up/down * The test ensures that the outer mask is empty and that the inner mask * is also empty. If both conditions are true for any one of the 4 adjacent pixels * then the current pixel is counted as being a true outer edge pixel. diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.cc b/source/blender/compositor/operations/COM_VectorBlurOperation.cc index 71c61a6e588..8add3924033 100644 --- a/source/blender/compositor/operations/COM_VectorBlurOperation.cc +++ b/source/blender/compositor/operations/COM_VectorBlurOperation.cc @@ -190,7 +190,10 @@ struct ZSpan { float clipcrop; }; -/* each zbuffer has coordinates transformed to local rect coordinates, so we can simply clip */ +/** + * Each Z-buffer has coordinates transformed to local rectangle coordinates, + * so we can simply clip. + */ void zbuf_alloc_span(ZSpan *zspan, int rectx, int recty, float clipcrop) { memset(zspan, 0, sizeof(ZSpan)); @@ -528,7 +531,7 @@ void antialias_tagbuf(int xsize, int ysize, char *rectmove) } } - /* last: pixels with 0 we fill in zbuffer, with 1 we skip for mask */ + /* last: pixels with 0 we fill in Z-buffer, with 1 we skip for mask */ for (y = 2; y < ysize; y++) { /* setup rows */ row1 = rectmove + (y - 2) * xsize; diff --git a/source/blender/draw/engines/overlay/overlay_antialiasing.c b/source/blender/draw/engines/overlay/overlay_antialiasing.c index 780915b7fc4..5bdc1096edc 100644 --- a/source/blender/draw/engines/overlay/overlay_antialiasing.c +++ b/source/blender/draw/engines/overlay/overlay_antialiasing.c @@ -34,8 +34,8 @@ * - Works without geometry shader. * - Can inflate line thickness. * - Coverage is very close to perfect and can even be filtered (Blackman-Harris, gaussian). - * - Wires can "bleed" / overlap non-line objects since the filter is in screenspace. - * - Only uses one additional lightweight fullscreen buffer (compared to MSAA/SMAA). + * - Wires can "bleed" / overlap non-line objects since the filter is in screen-space. + * - Only uses one additional lightweight full-screen buffer (compared to MSAA/SMAA). * - No convergence time (compared to TAA). */ diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 9761aa8c789..e1bee89db60 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -1504,7 +1504,7 @@ void DRW_draw_callbacks_post_scene(void) DRW_draw_region_info(); - /* annotations - temporary drawing buffer (screenspace) */ + /* Annotations - temporary drawing buffer (screen-space). */ /* XXX: Or should we use a proper draw/overlay engine for this case? */ if (((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) && (do_annotations)) { GPU_depth_test(GPU_DEPTH_NONE); diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 786204a52ed..6df9dc1e86d 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -608,7 +608,7 @@ static AnimKeylistDrawListElem *ed_keylist_draw_list_add_elem( return draw_elem; } -/* *************************** Channel Drawing Funcs *************************** */ +/* *************************** Channel Drawing Functions *************************** */ void draw_summary_channel(struct AnimKeylistDrawList *draw_list, bAnimContext *ac, diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c index e27cd255217..52e6200978c 100644 --- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c +++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c @@ -516,7 +516,7 @@ static void gpencil_brush_grab_calc_dvec(tGP_BrushEditData *gso) float mval_f[2]; - /* convert from 2D screenspace to 3D... */ + /* Convert from 2D screen-space to 3D. */ mval_f[0] = (float)(gso->mval[0] - gso->mval_prev[0]); mval_f[1] = (float)(gso->mval[1] - gso->mval_prev[1]); @@ -700,8 +700,8 @@ static bool gpencil_brush_pinch_apply(tGP_BrushEditData *gso, /* ----------------------------------------------- */ /* Twist Brush - Rotate Around midpoint */ -/* Take the screenspace coordinates of the point, rotate this around the brush midpoint, - * convert the rotated point and convert it into "data" space +/* Take the screen-space coordinates of the point, rotate this around the brush midpoint, + * convert the rotated point and convert it into "data" space. */ static bool gpencil_brush_twist_apply(tGP_BrushEditData *gso, @@ -807,7 +807,7 @@ static bool gpencil_brush_randomize_apply(tGP_BrushEditData *gso, /* apply random to position */ if (gso->brush->gpencil_settings->sculpt_mode_flag & GP_SCULPT_FLAGMODE_APPLY_POSITION) { /* Jitter is applied perpendicular to the mouse movement vector - * - We compute all effects in screenspace (since it's easier) + * - We compute all effects in screen-space (since it's easier) * and then project these to get the points/distances in * view-space as needed. */ @@ -989,8 +989,8 @@ static void gpencil_brush_clone_add(bContext *C, tGP_BrushEditData *gso) float delta[3]; size_t strokes_added = 0; - /* Compute amount to offset the points by */ - /* NOTE: This assumes that screenspace strokes are NOT used in the 3D view... */ + /* Compute amount to offset the points by. */ + /* NOTE: This assumes that screen-space strokes are NOT used in the 3D view. */ gpencil_brush_calc_midpoint(gso); /* this puts the cursor location into gso->dvec */ sub_v3_v3v3(delta, gso->dvec, data->buffer_midpoint); @@ -1063,7 +1063,7 @@ static void gpencil_brush_clone_adjust(tGP_BrushEditData *gso) /* For each of the stored strokes, apply the offset to each point */ /* NOTE: Again this assumes that in the 3D view, - * we only have 3d space and not screenspace strokes... */ + * we only have 3d space and not screen-space strokes. */ for (snum = 0; snum < data->totitems; snum++) { bGPDstroke *gps = data->new_strokes[snum]; bGPDspoint *pt; diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index a19265720e8..95f43733a36 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -2071,7 +2071,7 @@ static bool gpencil_generic_stroke_select(bContext *C, for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) { bGPDspoint *pt_active = (pt->runtime.pt_orig) ? pt->runtime.pt_orig : pt; - /* convert point coords to screenspace */ + /* Convert point coords to screen-space. */ const bool is_inside = is_inside_fn(gsc.region, gpstroke_iter.diff_mat, &pt->x, user_data); if (strokemode == false) { const bool is_select = (pt_active->flag & GP_SPOINT_SELECT) != 0; diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 3dffa2ba9fc..acb0e53aa55 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -227,7 +227,7 @@ bool ED_object_base_deselect_all(const struct Scene *scene, /** * Single object duplicate, if `dupflag == 0`, fully linked, else it uses the flags given. * Leaves selection of base/object unaltered. - * \note don't call this within a loop since clear_* funcs loop over the entire database. + * \note don't call this within a loop since clear_* functions loop over the entire database. * \note caller must do `DAG_relations_tag_update(bmain);` * this is not done automatic since we may duplicate many objects in a batch. */ diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index e508c96b4f1..bdd830e0046 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -54,7 +54,7 @@ enum eView2D_CommonViewTypes { #define V2D_SCROLL_HEIGHT ((0.45f * U.widget_unit) + (2.0f * U.pixelsize)) #define V2D_SCROLL_WIDTH ((0.45f * U.widget_unit) + (2.0f * U.pixelsize)) -/* Alpha of scrollbar when at minimum size. */ +/* Alpha of scroll-bar when at minimum size. */ #define V2D_SCROLL_MIN_ALPHA (0.4f) /* Minimum size needs to include outline which varies with line width. */ @@ -84,7 +84,7 @@ enum eView2D_CommonViewTypes { /* ------------------------------------------ */ /* Macros: */ -/* test if mouse in a scrollbar (assume that scroller availability has been tested) */ +/* Test if mouse in a scroll-bar (assume that scroller availability has been tested). */ #define IN_2D_VERT_SCROLL(v2d, co) (BLI_rcti_isect_pt_v(&v2d->vert, co)) #define IN_2D_HORIZ_SCROLL(v2d, co) (BLI_rcti_isect_pt_v(&v2d->hor, co)) @@ -350,8 +350,8 @@ struct View2D *UI_view2d_fromcontext(const struct bContext *C); struct View2D *UI_view2d_fromcontext_rwin(const struct bContext *C); /** - * Get scrollbar sizes of the current 2D view. - * The size will be zero if the view has its scrollbars disabled. + * Get scroll-bar sizes of the current 2D view. + * The size will be zero if the view has its scroll-bars disabled. * * \param mapped: whether to use view2d_scroll_mapped which changes flags */ diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 6ee421fb4d2..ea1770db6f5 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -959,7 +959,7 @@ static void ui_apply_but_undo(uiBut *but) str = ""; } - /* delayed, after all other funcs run, popups are closed, etc */ + /* Delayed, after all other functions run, popups are closed, etc. */ uiAfterFunc *after = ui_afterfunc_new(); BLI_strncpy(after->undostr, str, min_zz(str_len_clip + 1, sizeof(after->undostr))); } @@ -991,7 +991,7 @@ static void ui_apply_but_autokey(bContext *C, uiBut *but) static void ui_apply_but_funcs_after(bContext *C) { - /* copy to avoid recursive calls */ + /* Copy to avoid recursive calls. */ ListBase funcs = UIAfterFuncs; BLI_listbase_clear(&UIAfterFuncs); diff --git a/source/blender/editors/interface/interface_ops.cc b/source/blender/editors/interface/interface_ops.cc index 73ff678e658..603b2c96713 100644 --- a/source/blender/editors/interface/interface_ops.cc +++ b/source/blender/editors/interface/interface_ops.cc @@ -1635,7 +1635,7 @@ static void UI_OT_jump_to_target_button(wmOperatorType *ot) #ifdef WITH_PYTHON /* ------------------------------------------------------------------------- */ -/* EditSource Utility funcs and operator, +/* EditSource Utility functions and operator, * NOTE: this includes utility functions and button matching checks. */ struct uiEditSourceStore { @@ -1847,7 +1847,7 @@ static void UI_OT_editsource(wmOperatorType *ot) * \{ */ /** - * EditTranslation utility funcs and operator, + * EditTranslation utility functions and operator. * * \note this includes utility functions and button matching checks. * this only works in conjunction with a Python operator! diff --git a/source/blender/editors/interface/interface_region_menu_popup.cc b/source/blender/editors/interface/interface_region_menu_popup.cc index 0647e1a4a70..f88cabb2b70 100644 --- a/source/blender/editors/interface/interface_region_menu_popup.cc +++ b/source/blender/editors/interface/interface_region_menu_popup.cc @@ -322,7 +322,7 @@ uiPopupBlockHandle *ui_popup_menu_create( uiPopupMenu *pup = MEM_cnew<uiPopupMenu>(__func__); pup->block = UI_block_begin(C, nullptr, __func__, UI_EMBOSS_PULLDOWN); - pup->block->flag |= UI_BLOCK_NUMSELECT; /* default menus to numselect */ + pup->block->flag |= UI_BLOCK_NUMSELECT; /* Default menus to numeric-selection. */ pup->layout = UI_block_layout( pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, UI_MENU_PADDING, style); pup->slideout = but ? ui_block_is_menu(but->block) : false; diff --git a/source/blender/editors/interface/interface_template_list.cc b/source/blender/editors/interface/interface_template_list.cc index f0c91588f98..d8a9591a021 100644 --- a/source/blender/editors/interface/interface_template_list.cc +++ b/source/blender/editors/interface/interface_template_list.cc @@ -767,7 +767,7 @@ static void ui_template_list_layout_draw(const bContext *C, uiItemL(col, "", ICON_NONE); } - /* add scrollbar */ + /* Add scroll-bar. */ if (items->tot_items > visual_info.visual_items) { uiLayoutColumn(row, false); uiDefButI(block, @@ -916,7 +916,7 @@ static void ui_template_list_layout_draw(const bContext *C, uiItemL(subrow, "", ICON_NONE); } - /* add scrollbar */ + /* Add scroll-bar. */ if (items->tot_items > visual_info.visual_items) { /* col = */ uiLayoutColumn(row, false); uiDefButI(block, @@ -940,7 +940,7 @@ static void ui_template_list_layout_draw(const bContext *C, box = uiLayoutListBox(layout, ui_list, &input_data->active_dataptr, input_data->activeprop); /* For grip button. */ glob = uiLayoutColumn(box, true); - /* For scrollbar. */ + /* For scroll-bar. */ row = uiLayoutRow(glob, false); const bool show_names = (flags & UI_TEMPLATE_LIST_NO_NAMES) == 0; diff --git a/source/blender/editors/interface/view2d.cc b/source/blender/editors/interface/view2d.cc index b5a86ebe18b..52e278cd4b0 100644 --- a/source/blender/editors/interface/view2d.cc +++ b/source/blender/editors/interface/view2d.cc @@ -87,11 +87,11 @@ BLI_INLINE void clamp_rctf_to_rcti(rcti *dst, const rctf *src) * \{ */ /** - * helper to allow scrollbars to dynamically hide - * - returns a copy of the scrollbar settings with the flags to display - * horizontal/vertical scrollbars removed - * - input scroll value is the v2d->scroll var - * - hide flags are set per region at drawtime + * Helper to allow scroll-bars to dynamically hide: + * - Returns a copy of the scroll-bar settings with the flags to display + * horizontal/vertical scroll-bars removed. + * - Input scroll value is the v2d->scroll var. + * - Hide flags are set per region at draw-time. */ static int view2d_scroll_mapped(int scroll) { @@ -115,7 +115,7 @@ void UI_view2d_mask_from_win(const View2D *v2d, rcti *r_mask) /** * Called each time #View2D.cur changes, to dynamically update masks. * - * \param mask_scroll: Optionally clamp scrollbars by this region. + * \param mask_scroll: Optionally clamp scroll-bars by this region. */ static void view2d_masks(View2D *v2d, const rcti *mask_scroll) { @@ -177,7 +177,7 @@ static void view2d_masks(View2D *v2d, const rcti *mask_scroll) /* Currently, all regions that have vertical scale handles, * also have the scrubbing area at the top. - * So the scrollbar has to move down a bit. */ + * So the scroll-bar has to move down a bit. */ if (scroll & V2D_SCROLL_VERTICAL_HANDLES) { v2d->vert.ymax -= UI_TIME_SCRUB_MARGIN_Y; } @@ -377,7 +377,7 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize) rctf *cur, *tot; /* use mask as size of region that View2D resides in, as it takes into account - * scrollbars already - keep in sync with zoomx/zoomy in view_zoomstep_apply_ex! */ + * scroll-bars already - keep in sync with zoomx/zoomy in #view_zoomstep_apply_ex! */ winx = (float)(BLI_rcti_size_x(&v2d->mask) + 1); winy = (float)(BLI_rcti_size_y(&v2d->mask) + 1); @@ -1326,8 +1326,8 @@ struct View2DScrollers { /* focus bubbles */ /* focus bubbles */ /* focus bubbles */ - int vert_min, vert_max; /* vertical scrollbar */ - int hor_min, hor_max; /* horizontal scrollbar */ + int vert_min, vert_max; /* vertical scroll-bar */ + int hor_min, hor_max; /* horizontal scroll-bar */ /** Exact size of slider backdrop. */ rcti hor, vert; @@ -1380,7 +1380,7 @@ void UI_view2d_scrollers_calc(View2D *v2d, r_scrollers->hor = hor; /* scroller 'buttons': - * - These should always remain within the visible region of the scrollbar + * - These should always remain within the visible region of the scroll-bar * - They represent the region of 'tot' that is visible in 'cur' */ @@ -1473,14 +1473,14 @@ void UI_view2d_scrollers_draw_ex(View2D *v2d, const rcti *mask_custom, bool use_ uchar scrollers_back_color[4]; - /* Color for scrollbar backs */ + /* Color for scroll-bar backs. */ UI_GetThemeColor4ubv(TH_BACK, scrollers_back_color); /* make copies of rects for less typing */ vert = scrollers.vert; hor = scrollers.hor; - /* horizontal scrollbar */ + /* Horizontal scroll-bar. */ if (scroll & V2D_SCROLL_HORIZONTAL) { uiWidgetColors wcol = btheme->tui.wcol_scroll; /* 0..255 -> min...1 */ @@ -1515,7 +1515,7 @@ void UI_view2d_scrollers_draw_ex(View2D *v2d, const rcti *mask_custom, bool use_ UI_draw_widget_scroll(&wcol, &hor, &slider, state); } - /* vertical scrollbar */ + /* Vertical scroll-bar. */ if (scroll & V2D_SCROLL_VERTICAL) { uiWidgetColors wcol = btheme->tui.wcol_scroll; rcti slider; diff --git a/source/blender/editors/interface/view2d_ops.cc b/source/blender/editors/interface/view2d_ops.cc index ec15c4ffc9f..5f7d82e7b9a 100644 --- a/source/blender/editors/interface/view2d_ops.cc +++ b/source/blender/editors/interface/view2d_ops.cc @@ -1821,11 +1821,11 @@ static bool scroller_activate_poll(bContext *C) View2D *v2d = ®ion->v2d; wmEvent *event = win->eventstate; - /* check if mouse in scrollbars, if they're enabled */ + /* Check if mouse in scroll-bars, if they're enabled. */ return (UI_view2d_mouse_in_scrollers(region, v2d, event->xy) != 0); } -/* initialize customdata for scroller manipulation operator */ +/* Initialize #wmOperator.customdata for scroller manipulation operator. */ static void scroller_activate_init(bContext *C, wmOperator *op, const wmEvent *event, @@ -2065,7 +2065,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, const wmEvent * ARegion *region = CTX_wm_region(C); View2D *v2d = ®ion->v2d; - /* check if mouse in scrollbars, if they're enabled */ + /* check if mouse in scroll-bars, if they're enabled */ const char in_scroller = UI_view2d_mouse_in_scrollers(region, v2d, event->xy); /* if in a scroller, init customdata then set modal handler which will diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c index 15e20d13e79..55e9c32e41b 100644 --- a/source/blender/editors/mesh/editmesh_extrude.c +++ b/source/blender/editors/mesh/editmesh_extrude.c @@ -791,8 +791,8 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w /* 2D rotate by 90d while adding. * (x, y) = (y, -x) * - * accumulate the screenspace normal in 2D, - * with screenspace edge length weighting the result. */ + * Accumulate the screen-space normal in 2D, + * with screen-space edge length weighting the result. */ if (line_point_side_v2(co1, co2, mval_f) >= 0.0f) { nor[0] += (co1[1] - co2[1]); nor[1] += -(co1[0] - co2[0]); diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 98fd2726204..3c3b66b4b1d 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -297,10 +297,9 @@ static void test_constraint( if (con->type == CONSTRAINT_TYPE_KINEMATIC) { bKinematicConstraint *data = con->data; - /* bad: we need a separate set of checks here as poletarget is - * optional... otherwise poletarget must exist too or else - * the constraint is deemed invalid - */ + /* Bad: we need a separate set of checks here as pole-target is optional... + * otherwise pole-target must exist too or else the constraint is deemed invalid. */ + /* default IK check ... */ if (BKE_object_exists_check(bmain, data->tar) == 0) { data->tar = NULL; diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 9307efce68b..29f78b2a0ef 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -859,7 +859,7 @@ static AZone *area_actionzone_refresh_xy(ScrArea *area, const int xy[2], const b /* Check if we even have scroll bars. */ if (((az->direction == AZ_SCROLL_HOR) && !(scroll_flag & V2D_SCROLL_HORIZONTAL)) || ((az->direction == AZ_SCROLL_VERT) && !(scroll_flag & V2D_SCROLL_VERTICAL))) { - /* no scrollbars, do nothing. */ + /* No scroll-bars, do nothing. */ } else if (test_only) { if (isect_value != 0) { diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index d352dd81c0b..2b92f47509e 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -1523,7 +1523,7 @@ static void project_face_seams_init(const ProjPaintState *ps, static void screen_px_from_ortho(const float uv[2], const float v1co[3], const float v2co[3], - const float v3co[3], /* Screenspace coords */ + const float v3co[3], /* Screen-space coords */ const float uv1co[2], const float uv2co[2], const float uv3co[2], diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index ed9d86e1a4e..33986e9fac1 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -449,7 +449,7 @@ static void box_select_action(bAnimContext *ac, const rcti rect, short mode, sho filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS); ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); - /* Get beztriple editing/validation funcs. */ + /* Get beztriple editing/validation functions. */ sel_data.select_cb = ANIM_editkeyframes_select(selectmode); if (ELEM(mode, ACTKEYS_BORDERSEL_FRAMERANGE, ACTKEYS_BORDERSEL_ALLKEYS)) { @@ -693,7 +693,7 @@ static void region_select_action_keys( filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS); ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); - /* Get beztriple editing/validation funcs. */ + /* Get beztriple editing/validation functions. */ sel_data.select_cb = ANIM_editkeyframes_select(selectmode); sel_data.ok_cb = ANIM_editkeyframes_ok(mode); @@ -936,7 +936,7 @@ static void markers_selectkeys_between(bAnimContext *ac) min -= 0.5f; max += 0.5f; - /* get editing funcs + data */ + /* Get editing functions + data. */ ok_cb = ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE); select_cb = ANIM_editkeyframes_select(SELECT_ADD); diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 74b7fa3719a..209d60d4f58 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -603,7 +603,7 @@ static void buttons_navigation_bar_region_draw(const bContext *C, ARegion *regio } ED_region_panels_layout(C, region); - /* ED_region_panels_layout adds vertical scrollbars, we don't want them. */ + /* #ED_region_panels_layout adds vertical scroll-bars, we don't want them. */ region->v2d.scroll &= ~V2D_SCROLL_VERTICAL; ED_region_panels_draw(C, region); } diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c index 72df2b74b11..3a4a2faa5f7 100644 --- a/source/blender/editors/space_clip/clip_buttons.c +++ b/source/blender/editors/space_clip/clip_buttons.c @@ -57,7 +57,7 @@ static void metadata_panel_context_draw(const bContext *C, Panel *panel) SpaceClip *space_clip = CTX_wm_space_clip(C); /* NOTE: This might not be exactly the same image buffer as shown in the * clip editor itself, since that might be coming from proxy, or being - * postprocessed (stabilized or undistored). + * postprocessed (stabilized or undistorted). * Ideally we need to query metadata from an original image or movie without * reading actual pixels to speed up the process. */ ImBuf *ibuf = ED_space_clip_get_buffer(space_clip); diff --git a/source/blender/editors/space_console/console_intern.h b/source/blender/editors/space_console/console_intern.h index deaaff05a33..8e2ebc9b8e9 100644 --- a/source/blender/editors/space_console/console_intern.h +++ b/source/blender/editors/space_console/console_intern.h @@ -15,7 +15,7 @@ struct wmOperatorType; /* console_draw.c */ void console_textview_main(struct SpaceConsole *sc, const struct ARegion *region); -/* needed to calculate the scrollbar */ +/* Needed to calculate the scroll-bar. */ int console_textview_height(struct SpaceConsole *sc, const struct ARegion *region); int console_char_pick(struct SpaceConsole *sc, const struct ARegion *region, const int mval[2]); diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index ef22b1b9f0b..11234d446da 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -280,7 +280,7 @@ static bool console_line_column_from_index( return false; } -/* static funcs for text editing */ +/* Static functions for text editing. */ /* similar to the text editor, with some not used. keep compatible */ static const EnumPropertyItem console_move_type_items[] = { diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 18a885e24c2..93aa5cf992d 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -1046,7 +1046,7 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *region) layout->attribute_column_header_h = 0; layout->offset_top = layout->attribute_column_header_h; layout->height = (int)(BLI_rctf_size_y(&v2d->cur) - 2 * layout->tile_border_y); - /* Padding by full scrollbar H is too much, can overlap tile border Y. */ + /* Padding by full scroll-bar H is too much, can overlap tile border Y. */ layout->rows = (layout->height - V2D_SCROLL_HEIGHT + layout->tile_border_y) / (layout->tile_h + 2 * layout->tile_border_y); layout->tile_w = VERTLIST_MAJORCOLUMN_WIDTH; diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 0ce3e1a797a..2329d46f39b 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -585,7 +585,7 @@ static bool box_select_graphkeys(bAnimContext *ac, initialize_box_select_key_editing_data( sipo, incl_handles, mode, ac, data, &scaled_rectf, &ked, &mapping_flag); - /* Get beztriple editing/validation funcs. */ + /* Get beztriple editing/validation functions. */ const KeyframeEditFunc select_cb = ANIM_editkeyframes_select(selectmode); const KeyframeEditFunc ok_cb = ANIM_editkeyframes_ok(mode); @@ -1145,7 +1145,7 @@ static void markers_selectkeys_between(bAnimContext *ac) min -= 0.5f; max += 0.5f; - /* get editing funcs + data */ + /* Get editing functions + data. */ ok_cb = ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE); select_cb = ANIM_editkeyframes_select(SELECT_ADD); diff --git a/source/blender/editors/space_node/node_view.cc b/source/blender/editors/space_node/node_view.cc index 00756083580..33a75385022 100644 --- a/source/blender/editors/space_node/node_view.cc +++ b/source/blender/editors/space_node/node_view.cc @@ -240,7 +240,7 @@ static int snode_bg_viewmove_invoke(bContext *C, wmOperator *op, const wmEvent * NodeViewMove *nvm; Image *ima; ImBuf *ibuf; - const float pad = 32.0f; /* better be bigger than scrollbars */ + const float pad = 32.0f; /* Better be bigger than scroll-bars. */ void *lock; diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index 912dc436a95..3c52f79a80e 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -3859,7 +3859,7 @@ static void outliner_update_viewable_area(ARegion *region, int sizex = outliner_width(space_outliner, tree_width, right_column_width); int sizey = tree_height; - /* Extend size to allow for horizontal scrollbar and extra offset. */ + /* Extend size to allow for horizontal scroll-bar and extra offset. */ sizey += V2D_SCROLL_HEIGHT + OL_Y_OFFSET; UI_view2d_totRect_set(®ion->v2d, sizex, sizey); diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 46c459dd0bc..a976bb6c34b 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -925,12 +925,12 @@ static void calc_text_rcts(SpaceText *st, ARegion *region, rcti *scroll, rcti *b hlstart = (lhlstart * pix_available) / ltexth; hlend = (lhlend * pix_available) / ltexth; - /* The scrollbar is non-linear sized. */ + /* The scroll-bar is non-linear sized. */ if (pix_bardiff > 0) { /* the start of the highlight is in the current viewport */ if (st->runtime.viewlines && lhlstart >= st->top && lhlstart <= st->top + st->runtime.viewlines) { - /* Speed the progression of the start of the highlight through the scrollbar. */ + /* Speed the progression of the start of the highlight through the scroll-bar. */ hlstart = (((pix_available - pix_bardiff) * lhlstart) / ltexth) + (pix_bardiff * (lhlstart - st->top) / st->runtime.viewlines); } @@ -951,7 +951,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *region, rcti *scroll, rcti *b /* the end of the highlight is in the current viewport */ if (st->runtime.viewlines && lhlend >= st->top && lhlend <= st->top + st->runtime.viewlines) { - /* Speed the progression of the end of the highlight through the scrollbar. */ + /* Speed the progression of the end of the highlight through the scroll-bar. */ hlend = (((pix_available - pix_bardiff) * lhlend) / ltexth) + (pix_bardiff * (lhlend - st->top) / st->runtime.viewlines); } @@ -994,7 +994,7 @@ static void draw_textscroll(const SpaceText *st, rcti *scroll, rcti *back) float col[4]; float rad; - /* background so highlights don't go behind the scrollbar */ + /* Background so highlights don't go behind the scroll-bar. */ uint pos = GPU_vertformat_attr_add( immVertexFormat(), "pos", GPU_COMP_I32, 2, GPU_FETCH_INT_TO_FLOAT); immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); diff --git a/source/blender/editors/space_view3d/view3d_iterators.c b/source/blender/editors/space_view3d/view3d_iterators.c index 60141fd00cd..34f68e87880 100644 --- a/source/blender/editors/space_view3d/view3d_iterators.c +++ b/source/blender/editors/space_view3d/view3d_iterators.c @@ -247,7 +247,7 @@ typedef struct foreachScreenFace_userData { } foreachScreenFace_userData; /** - * \note foreach funcs should be called while drawing or directly after + * \note foreach functions should be called while drawing or directly after * if not, #ED_view3d_init_mats_rv3d() can be used for selection tools * but would not give correct results with dupli's for eg. which don't * use the object matrix in the usual way. diff --git a/source/blender/editors/space_view3d/view3d_select.cc b/source/blender/editors/space_view3d/view3d_select.cc index e76696f31cf..447bf99b000 100644 --- a/source/blender/editors/space_view3d/view3d_select.cc +++ b/source/blender/editors/space_view3d/view3d_select.cc @@ -4317,7 +4317,7 @@ static void do_circle_select_pose__doSelectBone(void *userData, bool is_point_done = false; int points_proj_tot = 0; - /* project head location to screenspace */ + /* Project head location to screen-space. */ if (screen_co_a[0] != IS_CLIPPED) { points_proj_tot++; if (pchan_circle_doSelectJoint(data, pchan, screen_co_a)) { @@ -4325,7 +4325,7 @@ static void do_circle_select_pose__doSelectBone(void *userData, } } - /* project tail location to screenspace */ + /* Project tail location to screen-space. */ if (screen_co_b[0] != IS_CLIPPED) { points_proj_tot++; if (pchan_circle_doSelectJoint(data, pchan, screen_co_b)) { @@ -4431,7 +4431,7 @@ static void do_circle_select_armature__doSelectBone(void *userData, bool is_edge_done = false; int points_proj_tot = 0; - /* project head location to screenspace */ + /* Project head location to screen-space. */ if (screen_co_a[0] != IS_CLIPPED) { points_proj_tot++; if (armature_circle_doSelectJoint(data, ebone, screen_co_a, true)) { @@ -4439,7 +4439,7 @@ static void do_circle_select_armature__doSelectBone(void *userData, } } - /* project tail location to screenspace */ + /* Project tail location to screen-space. */ if (screen_co_b[0] != IS_CLIPPED) { points_proj_tot++; if (armature_circle_doSelectJoint(data, ebone, screen_co_b, false)) { diff --git a/source/blender/editors/transform/transform_gizmo_extrude_3d.c b/source/blender/editors/transform/transform_gizmo_extrude_3d.c index a3b5fd2c575..0271f8e1988 100644 --- a/source/blender/editors/transform/transform_gizmo_extrude_3d.c +++ b/source/blender/editors/transform/transform_gizmo_extrude_3d.c @@ -101,7 +101,7 @@ static void gizmo_mesh_extrude_orientation_matrix_set_for_adjust(struct GizmoExt for (int j = 0; j < 3; j++) { copy_v3_v3(ggd->adjust[0]->matrix_basis[j], mat[j]); } - /* nop when (i == 2). */ + /* NOP when (i == 2). */ swap_v3_v3(ggd->adjust[0]->matrix_basis[ggd->adjust_axis], ggd->adjust[0]->matrix_basis[2]); } diff --git a/source/blender/editors/transform/transform_mode_edge_slide.c b/source/blender/editors/transform/transform_mode_edge_slide.c index 85285e38bdd..8a29321413e 100644 --- a/source/blender/editors/transform/transform_mode_edge_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_slide.c @@ -360,7 +360,7 @@ static void edge_slide_data_init_mval(MouseInput *mi, EdgeSlideData *sld, float } /** - * Calculate screenspace `mval_start` / `mval_end`, optionally slide direction. + * Calculate screen-space `mval_start` / `mval_end`, optionally slide direction. */ static void calcEdgeSlide_mval_range(TransInfo *t, TransDataContainer *tc, diff --git a/source/blender/editors/transform/transform_snap_object.cc b/source/blender/editors/transform/transform_snap_object.cc index 503452b312e..6d643ae7180 100644 --- a/source/blender/editors/transform/transform_snap_object.cc +++ b/source/blender/editors/transform/transform_snap_object.cc @@ -572,7 +572,7 @@ static void iter_snap_objects(SnapObjectContext *sctx, /** \} */ /* -------------------------------------------------------------------- */ -/** \name Ray Cast Funcs +/** \name Ray Cast Functions * \{ */ /* Store all ray-hits @@ -1195,7 +1195,7 @@ static bool raycastObjects(SnapObjectContext *sctx, /** \} */ /* -------------------------------------------------------------------- */ -/** \name Surface Snap Funcs +/** \name Surface Snap Functions * \{ */ struct NearestWorldObjUserData { diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 2eeeacf694b..12e77c6ef00 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -54,7 +54,7 @@ #include "WM_api.h" #include "WM_types.h" -/* ********* general editor util funcs, not BKE stuff please! ********* */ +/* ********* general editor util functions, not BKE stuff please! ********* */ void ED_editors_init_for_undo(Main *bmain) { diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 1fe9b5b6c78..e66629f8fb0 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -1834,7 +1834,7 @@ static void uv_map_clip_correct(const Scene *scene, /** \name UV Unwrap Operator * \{ */ -/* Assumes UV Map exists, doesn't run update funcs. */ +/* Assumes UV Map exists, doesn't run update functions. */ static void uvedit_unwrap(const Scene *scene, Object *obedit, const UnwrapOptions *options, diff --git a/source/blender/geometry/intern/uv_parametrizer.cc b/source/blender/geometry/intern/uv_parametrizer.cc index f074febe23a..b15c8b6e319 100644 --- a/source/blender/geometry/intern/uv_parametrizer.cc +++ b/source/blender/geometry/intern/uv_parametrizer.cc @@ -22,11 +22,11 @@ /* Utils */ #define param_assert(condition) \ - if (!(condition)) { /*printf("Assertion %s:%d\n", __FILE__, __LINE__); abort();*/ \ + if (!(condition)) { /* `printf("Assertion %s:%d\n", __FILE__, __LINE__); abort();` */ \ } \ (void)0 #define param_warning(message) \ - {/*printf("Warning %s:%d: %s\n", __FILE__, __LINE__, message);*/}(void)0 + {/* `printf("Warning %s:%d: %s\n", __FILE__, __LINE__, message);` */}(void)0 /* Special Purpose Hash */ diff --git a/source/blender/imbuf/intern/cache.c b/source/blender/imbuf/intern/cache.c index 4e1563c62ab..98d33ac061f 100644 --- a/source/blender/imbuf/intern/cache.c +++ b/source/blender/imbuf/intern/cache.c @@ -167,7 +167,7 @@ void imb_tile_cache_tile_free(ImBuf *ibuf, int tx, int ty) /** \} */ /* -------------------------------------------------------------------- */ -/** \name Init/Exit +/** \name Initialize/Exit * \{ */ static void imb_thread_cache_init(ImThreadTileCache *cache) diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c index 4530959e5ac..f4775fa5fe8 100644 --- a/source/blender/imbuf/intern/imageprocess.c +++ b/source/blender/imbuf/intern/imageprocess.c @@ -219,7 +219,7 @@ void bilinear_interpolation(const ImBuf *in, ImBuf *out, float u, float v, int x 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); bilinear_interpolation_color(in, outI, outF, u, v); diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index a8150fd1648..29dfcc1b8f8 100644 --- a/source/blender/imbuf/intern/iris.c +++ b/source/blender/imbuf/intern/iris.c @@ -88,7 +88,7 @@ typedef struct MFileOffset { #define DIRTY_FLAG_EOF (1 << 0) #define DIRTY_FLAG_ENCODING (1 << 1) -/* funcs */ +/* Functions. */ static void readheader(MFileOffset *inf, IMAGE *image); static int writeheader(FILE *outf, IMAGE *image); diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 6d8c4a5c446..da4aaf8522e 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -1498,7 +1498,7 @@ static int imb_exr_split_channel_name(ExrChannel *echan, char *layname, char *pa bool ok = false; if (len == 2) { - /* some multilayers are using two-letter channels name, + /* Some multi-layers are using two-letter channels name, * like, MX or NZ, which is basically has structure of * <pass_prefix><component> * diff --git a/source/blender/io/gpencil/intern/gpencil_io_base.hh b/source/blender/io/gpencil/intern/gpencil_io_base.hh index 4987ab34ffc..f712ed839d9 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_base.hh +++ b/source/blender/io/gpencil/intern/gpencil_io_base.hh @@ -70,7 +70,7 @@ class GpencilIO { float stroke_color_[4], fill_color_[4]; /* Geometry functions. */ - /** Convert to screenspace. */ + /** Convert to screen-space. */ bool gpencil_3D_point_to_screen_space(const float3 co, float2 &r_co); /** Convert to render space. */ float2 gpencil_3D_point_to_render_space(const float3 co); diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h index 0fcf232cdaa..58b8504430a 100644 --- a/source/blender/makesdna/DNA_fileglobal_types.h +++ b/source/blender/makesdna/DNA_fileglobal_types.h @@ -29,9 +29,9 @@ typedef struct FileGlobal { int fileflags; int globalf; - /** Commit timestamp from buildinfo. */ + /** Commit timestamp from `buildinfo`. */ uint64_t build_commit_timestamp; - /** Hash from buildinfo. */ + /** Hash from `buildinfo`. */ char build_hash[16]; /** File path where this was saved, for recover (1024 = FILE_MAX). */ char filepath[1024]; diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 2cde54bc0ed..23b76e855b2 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -401,7 +401,7 @@ typedef struct ImageFormatData { /** R_IMF_PLANES_BW, R_IMF_PLANES_RGB, R_IMF_PLANES_RGBA. */ char planes; - /** Generic options for all image types, alpha zbuffer. */ + /** Generic options for all image types, alpha Z-buffer. */ char flag; /** (0 - 100), eg: JPEG quality. */ diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index ba0ccabb16c..4d4bd9ef775 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -437,7 +437,7 @@ typedef struct ARegion_Runtime { * Lazy initialize, zero'd when unset, relative to #ARegion.winrct x/y min. */ rcti visible_rect; - /* The offset needed to not overlap with window scrollbars. Only used by HUD regions for now. */ + /* The offset needed to not overlap with window scroll-bars. Only used by HUD regions for now. */ int offset_x, offset_y; /* Maps uiBlock->name to uiBlock for faster lookups. */ diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index f25201bf5b4..a974330a2ac 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -1636,7 +1636,7 @@ enum { typedef struct ConsoleLine { struct ConsoleLine *next, *prev; - /* keep these 3 vars so as to share free, realloc funcs */ + /* Keep these 3 vars so as to share free, realloc functions. */ /** Allocated length. */ int len_alloc; /** Real len - strlen(). */ diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h index d08865cefb5..7e53c1e4d37 100644 --- a/source/blender/makesdna/DNA_view2d_types.h +++ b/source/blender/makesdna/DNA_view2d_types.h @@ -19,9 +19,9 @@ extern "C" { typedef struct View2D { /** Tot - area that data can be drawn in; cur - region of tot that is visible in viewport. */ rctf tot, cur; - /** Vert - vertical scrollbar region; hor - horizontal scrollbar region. */ + /** Vert - vertical scroll-bar region; hor - horizontal scroll-bar region. */ rcti vert, hor; - /** Mask - region (in screenspace) within which 'cur' can be viewed. */ + /** Mask - region (in screen-space) within which 'cur' can be viewed. */ rcti mask; /** Min/max sizes of 'cur' rect (only when keepzoom not set). */ @@ -29,7 +29,7 @@ typedef struct View2D { /** Allowable zoom factor range (only when (keepzoom & V2D_LIMITZOOM)) is set. */ float minzoom, maxzoom; - /** Scroll - scrollbars to display (bit-flag). */ + /** Scroll - scroll-bars to display (bit-flag). */ short scroll; /** Scroll_ui - temp settings used for UI drawing of scrollers. */ short scroll_ui; @@ -56,7 +56,7 @@ typedef struct View2D { short around; /* Usually set externally (as in, not in view2d files). */ - /** Alpha of vertical and horizontal scrollbars (range is [0, 255]). */ + /** Alpha of vertical and horizontal scroll-bars (range is [0, 255]). */ char alpha_vert, alpha_hor; char _pad[6]; @@ -124,11 +124,11 @@ enum { /** Scroller flags for View2D (#View2D.scroll). */ enum { - /* left scrollbar */ + /* Left scroll-bar. */ V2D_SCROLL_LEFT = (1 << 0), V2D_SCROLL_RIGHT = (1 << 1), V2D_SCROLL_VERTICAL = (V2D_SCROLL_LEFT | V2D_SCROLL_RIGHT), - /* horizontal scrollbar */ + /* Horizontal scroll-bar. */ V2D_SCROLL_TOP = (1 << 2), V2D_SCROLL_BOTTOM = (1 << 3), /* UNUSED = (1 << 4), */ @@ -137,11 +137,11 @@ enum { V2D_SCROLL_VERTICAL_HANDLES = (1 << 5), /* display horizontal scale handles */ V2D_SCROLL_HORIZONTAL_HANDLES = (1 << 6), - /* induce hiding of scrollbars - set by region drawing in response to size of region */ + /* Induce hiding of scroll-bar - set by region drawing in response to size of region. */ V2D_SCROLL_VERTICAL_HIDE = (1 << 7), V2D_SCROLL_HORIZONTAL_HIDE = (1 << 8), - /* scrollbar extends beyond its available window - - * set when calculating scrollbars for drawing */ + /* Scroll-bar extends beyond its available window - + * set when calculating scroll-bar for drawing */ V2D_SCROLL_VERTICAL_FULLR = (1 << 9), V2D_SCROLL_HORIZONTAL_FULLR = (1 << 10), }; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 1ba057d9c40..2b422f9aebf 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -391,7 +391,7 @@ enum { #define RV3D_PAINTING (1 << 5) /*#define RV3D_IS_GAME_ENGINE (1 << 5) */ /* UNUSED */ /** - * Disable zbuffer offset, skip calls to #ED_view3d_polygon_offset. + * Disable Z-buffer offset, skip calls to #ED_view3d_polygon_offset. * Use when precise surface depth is needed and picking bias isn't, see T45434). */ #define RV3D_ZOFFSET_DISABLED 64 diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index e7766e4a05e..353b2903fb1 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -355,7 +355,7 @@ typedef enum ParameterFlag { /** * This allows for non-breaking API updates, * when adding non-critical new parameter to a callback function. - * This way, old py code defining funcs without that parameter would still work. + * This way, old Python code defining functions without that parameter would still work. * WARNING: any parameter after the first PYFUNC_OPTIONAL one will be considered as optional! * \note only for input parameters! */ diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index dbf5f434248..daae1d6f3e4 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -3585,7 +3585,7 @@ static void rna_difference_matte_t2_set(PointerRNA *ptr, float value) chroma->t2 = value; } -/* Button Set Funcs for Matte Nodes */ +/* Button Set Functions for Matte Nodes */ static void rna_Matte_t1_set(PointerRNA *ptr, float value) { bNode *node = (bNode *)ptr->data; diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index 169613999cd..364adb5458b 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -4277,6 +4277,6 @@ char *BPy_BMElem_StringFromHType(const char htype) static void bm_dealloc_editmode_warn(BPy_BMesh *self) { if (self->flag & BPY_BMFLAG_IS_WRAPPED) { - /* currently nop - this works without warnings now */ + /* Currently NOP - this works without warnings now. */ } } diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index 007a2fdbb8e..681c5404ed9 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -28,8 +28,8 @@ # include "BLI_string.h" -/* Only for BLI_strncpy_wchar_from_utf8, - * should replace with py funcs but too late in release now. */ +/* Only for #BLI_strncpy_wchar_from_utf8, + * should replace with Python functions but too late in release now. */ # include "BLI_string_utf8.h" #endif diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index 7fe0b9455e6..3b3ffb321c3 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -655,7 +655,7 @@ void BPy_init_modules(struct bContext *C) PyModule_AddObject(mod, m->ml_name, (PyObject *)PyCFunction_New(m, NULL)); } - /* register funcs (bpy_rna.c) */ + /* Register functions (`bpy_rna.c`). */ PyModule_AddObject(mod, meth_bpy_register_class.ml_name, (PyObject *)PyCFunction_New(&meth_bpy_register_class, NULL)); diff --git a/source/blender/python/intern/bpy_gizmo_wrap.c b/source/blender/python/intern/bpy_gizmo_wrap.c index ad235e691c4..99720e7a1ba 100644 --- a/source/blender/python/intern/bpy_gizmo_wrap.c +++ b/source/blender/python/intern/bpy_gizmo_wrap.c @@ -150,7 +150,7 @@ void BPY_RNA_gizmo_wrapper(wmGizmoType *gzt, void *userdata) /* don't do translations here yet */ #if 0 - /* Use i18n context from rna_ext.srna if possible (py gizmogroups). */ + /* Use i18n context from rna_ext.srna if possible (py gizmo-groups). */ if (gt->rna_ext.srna) { RNA_def_struct_translation_context(gt->srna, RNA_struct_translation_context(gt->rna_ext.srna)); } diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index f6e8f2f88ec..07ce44f5f3b 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -4074,7 +4074,7 @@ static void pyrna_dir_members_rna(PyObject *list, PointerRNA *ptr) { const char *idname; - /* For looping over attrs and funcs. */ + /* For looping over attributes and functions. */ PointerRNA tptr; PropertyRNA *iterprop; @@ -5937,7 +5937,7 @@ static PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *dat len = RNA_property_array_length(ptr, prop); } - /* Resolve the array from a new pytype. */ + /* Resolve the array from a new Python type. */ /* TODO(Kazanbas): make multi-dimensional sequences here. */ @@ -8735,10 +8735,10 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param else if (ret_len == 1) { err = pyrna_py_to_prop(&funcptr, pret_single, retdata_single, ret, ""); - /* when calling operator funcs only gives Function.result with - * no line number since the func has finished calling on error, - * re-raise the exception with more info since it would be slow to - * create prefix on every call (when there are no errors) */ + /* When calling operator functions only gives `Function.result` with no line number + * since the function has finished calling on error, re-raise the exception with more + * information since it would be slow to create prefix on every call + * (when there are no errors). */ if (err == -1) { PyC_Err_Format_Prefix(PyExc_RuntimeError, "class %.200s, function %.200s: incompatible return value ", diff --git a/source/blender/python/intern/bpy_rna_array.c b/source/blender/python/intern/bpy_rna_array.c index 8506ec97bc3..48ba028edf0 100644 --- a/source/blender/python/intern/bpy_rna_array.c +++ b/source/blender/python/intern/bpy_rna_array.c @@ -927,7 +927,7 @@ PyObject *pyrna_py_from_array_index(BPy_PropertyArrayRNA *self, /* just in case check */ len = RNA_property_multi_array_length(ptr, prop, arraydim); if (index >= len || index < 0) { - /* this shouldn't happen because higher level funcs must check for invalid index */ + /* This shouldn't happen because higher level functions must check for invalid index. */ CLOG_WARN(BPY_LOG_RNA, "invalid index %d for array with length=%d", index, len); PyErr_SetString(PyExc_IndexError, "out of range"); diff --git a/source/blender/python/intern/bpy_utils_units.c b/source/blender/python/intern/bpy_utils_units.c index 1e5856a3285..075a68f31f9 100644 --- a/source/blender/python/intern/bpy_utils_units.c +++ b/source/blender/python/intern/bpy_utils_units.c @@ -90,7 +90,7 @@ static PyObject *py_structseq_from_strings(PyTypeObject *py_type, const char **str_iter; PyStructSequence_Field *desc; - /* initialize array */ + /* Initialize array. */ /* We really populate the contexts' fields here! */ for (str_iter = str_items, desc = py_sseq_desc->fields; *str_iter; str_iter++, desc++) { desc->name = (char *)*str_iter; @@ -101,7 +101,7 @@ static PyObject *py_structseq_from_strings(PyTypeObject *py_type, PyStructSequence_InitType(py_type, py_sseq_desc); - /* initialize pytype */ + /* Initialize the Python type. */ py_struct_seq = PyStructSequence_New(py_type); BLI_assert(py_struct_seq != NULL); diff --git a/source/blender/python/mathutils/mathutils.h b/source/blender/python/mathutils/mathutils.h index 7115c55b1c6..27d84a80601 100644 --- a/source/blender/python/mathutils/mathutils.h +++ b/source/blender/python/mathutils/mathutils.h @@ -6,7 +6,7 @@ * \ingroup pymathutils */ -/* Can cast different mathutils types to this, use for generic funcs */ +/* Can cast different mathutils types to this, use for generic functions. */ #include "BLI_compiler_attrs.h" @@ -21,7 +21,7 @@ extern char BaseMathObject_owner_doc[]; ((struct_name *)((base_type ? (base_type)->tp_alloc(base_type, 0) : \ _PyObject_GC_New(&(root_type))))) -/** BaseMathObject.flag */ +/** #BaseMathObject.flag */ enum { /** * Do not own the memory used in this vector, @@ -43,7 +43,7 @@ enum { float *_data; \ /** If this vector references another object, otherwise NULL, *Note* this owns its reference */ \ PyObject *cb_user; \ - /** Which user funcs do we adhere to, RNA, etc */ \ + /** Which user functions do we adhere to, RNA, etc */ \ unsigned char cb_type; \ /** Sub-type: location, rotation... \ * to avoid defining many new functions for every attribute of the same type */ \ diff --git a/source/blender/sequencer/intern/sound.c b/source/blender/sequencer/intern/sound.c index c4992848cb5..69ccbdcb54e 100644 --- a/source/blender/sequencer/intern/sound.c +++ b/source/blender/sequencer/intern/sound.c @@ -26,7 +26,8 @@ #include "sequencer.h" #include "strip_time.h" -/* Unlike _update_sound_ funcs, these ones take info from audaspace to update sequence length! */ +/* Unlike _update_sound_ functions, + * these ones take info from audaspace to update sequence length! */ #ifdef WITH_AUDASPACE static bool sequencer_refresh_sound_length_recursive(Main *bmain, Scene *scene, ListBase *seqbase) { diff --git a/source/creator/creator_intern.h b/source/creator/creator_intern.h index b035bd42ce7..29ef6d96f15 100644 --- a/source/creator/creator_intern.h +++ b/source/creator/creator_intern.h @@ -72,14 +72,14 @@ enum { # define BUILD_DATE #endif -/* from buildinfo.c */ +/* From `buildinfo.c`. */ #ifdef BUILD_DATE extern char build_date[]; extern char build_time[]; extern char build_hash[]; extern unsigned long build_commit_timestamp; -/* TODO(sergey): ideally size need to be in sync with buildinfo.c */ +/* TODO(@sergey): ideally size need to be in sync with `buildinfo.c`. */ extern char build_commit_date[16]; extern char build_commit_time[16]; |