diff --git a/intern/ghost/GHOST_ISystem.hh b/intern/ghost/GHOST_ISystem.hh index a29dbc0f21b..ef4495096d2 100644 --- a/intern/ghost/GHOST_ISystem.hh +++ b/intern/ghost/GHOST_ISystem.hh @@ -6,7 +6,7 @@ * \ingroup GHOST * %Main interface file for C++ Api with declaration of GHOST_ISystem interface * class. - * Contains the doxygen documentation main page. + * Contains the DOXYGEN documentation main page. */ #pragma once diff --git a/source/blender/blenkernel/BKE_grease_pencil.hh b/source/blender/blenkernel/BKE_grease_pencil.hh index 8e07057c5ad..1ff028fcf9e 100644 --- a/source/blender/blenkernel/BKE_grease_pencil.hh +++ b/source/blender/blenkernel/BKE_grease_pencil.hh @@ -104,7 +104,7 @@ class Drawing : public ::GreasePencilDrawing { /** * Add a user for this drawing. When a drawing has multiple users, both users are allowed to - * modifify this drawings data. + * modify this drawings data. */ void add_user() const; /** diff --git a/source/blender/blenkernel/BKE_lib_remap.h b/source/blender/blenkernel/BKE_lib_remap.h index 3cd28a7f5c2..93fd831e578 100644 --- a/source/blender/blenkernel/BKE_lib_remap.h +++ b/source/blender/blenkernel/BKE_lib_remap.h @@ -89,8 +89,8 @@ enum { ID_REMAP_FORCE_USER_REFCOUNT = 1 << 17, /** * Do NOT handle user count for IDs (used in some cases when dealing with IDs from different - * BMains, if usercount will be recomputed anyway afterwards, like e.g. in memfile reading during - * undo step decoding). + * BMains, if user-count will be recomputed anyway afterwards, like e.g. + * in memfile reading during undo step decoding). */ ID_REMAP_SKIP_USER_REFCOUNT = 1 << 18, /** diff --git a/source/blender/blenkernel/BKE_mesh_legacy_convert.hh b/source/blender/blenkernel/BKE_mesh_legacy_convert.hh index 0c6a82f1596..e23221eea31 100644 --- a/source/blender/blenkernel/BKE_mesh_legacy_convert.hh +++ b/source/blender/blenkernel/BKE_mesh_legacy_convert.hh @@ -95,7 +95,7 @@ void BKE_mesh_convert_mfaces_to_mpolys(Mesh *mesh); * the difference is how active/render/clone/stencil indices are handled here. * * normally they're being set from `pdata` which totally makes sense for meshes which are - * already converted to #BMesh ures, but when loading older files indices shall be updated in + * already converted to #BMesh structures, but when loading older files indices shall be updated in * other way around, so newly added `pdata` and `ldata` would have this indices set based on * `pdata` layer. * diff --git a/source/blender/blenkernel/intern/armature.cc b/source/blender/blenkernel/intern/armature.cc index fa852ad1ab9..98392fb3882 100644 --- a/source/blender/blenkernel/intern/armature.cc +++ b/source/blender/blenkernel/intern/armature.cc @@ -2197,7 +2197,7 @@ void vec_roll_to_mat3_normalized(const float nor[3], const float roll, float r_m if (theta <= SAFE_THRESHOLD) { /* When nor is close to negative Y axis (0,-1,0) the theta precision is very bad, - * so recompute it from x and z instead, using the series expansion for sqrt. */ + * so recompute it from x and z instead, using the series expansion for `sqrt`. */ theta = theta_alt * 0.5f + theta_alt * theta_alt * 0.125f; } diff --git a/source/blender/blenkernel/intern/fluid.cc b/source/blender/blenkernel/intern/fluid.cc index 39266d44f47..f20b41814ac 100644 --- a/source/blender/blenkernel/intern/fluid.cc +++ b/source/blender/blenkernel/intern/fluid.cc @@ -859,7 +859,7 @@ static void update_velocities(FluidEffectorSettings *fes, nearest.index = -1; /* Distance between two opposing vertices in a unit cube. - * I.e. the unit cube diagonal or sqrt(3). + * I.e. the unit cube diagonal or `sqrt(3)`. * This value is our nearest neighbor search distance. */ const float surface_distance = 1.732; /* find_nearest uses squared distance */ @@ -1703,7 +1703,7 @@ static void update_distances(int index, BVHTreeNearest nearest = {0}; nearest.index = -1; /* Distance between two opposing vertices in a unit cube. - * I.e. the unit cube diagonal or sqrt(3). + * I.e. the unit cube diagonal or `sqrt(3)`. * This value is our nearest neighbor search distance. */ const float surface_distance = 1.732; /* find_nearest uses squared distance. */ @@ -1825,7 +1825,7 @@ static void sample_mesh(FluidFlowSettings *ffs, nearest.index = -1; /* Distance between two opposing vertices in a unit cube. - * I.e. the unit cube diagonal or sqrt(3). + * I.e. the unit cube diagonal or `sqrt(3)`. * This value is our nearest neighbor search distance. */ const float surface_distance = 1.732; /* find_nearest uses squared distance. */ diff --git a/source/blender/blenkernel/intern/gpencil_geom_legacy.cc b/source/blender/blenkernel/intern/gpencil_geom_legacy.cc index 1a24b6d2064..698abdfed5a 100644 --- a/source/blender/blenkernel/intern/gpencil_geom_legacy.cc +++ b/source/blender/blenkernel/intern/gpencil_geom_legacy.cc @@ -1049,14 +1049,14 @@ bool BKE_gpencil_stroke_smooth_point(bGPDstroke *gps, /* This function uses a binomial kernel, which is the discrete version of gaussian blur. * The weight for a vertex at the relative index point_index is - * w = nCr(n, j + n/2) / 2^n = (n/1 * (n-1)/2 * ... * (n-j-n/2)/(j+n/2)) / 2^n + * `w = nCr(n, j + n/2) / 2^n = (n/1 * (n-1)/2 * ... * (n-j-n/2)/(j+n/2)) / 2^n` * All weights together sum up to 1 * This is equivalent to doing multiple iterations of averaging neighbors, * where n = iterations * 2 and -n/2 <= j <= n/2 * - * Now the problem is that nCr(n, j + n/2) is very hard to compute for n > 500, since even + * Now the problem is that `nCr(n, j + n/2)` is very hard to compute for `n > 500`, since even * double precision isn't sufficient. A very good robust approximation for n > 20 is - * nCr(n, j + n/2) / 2^n = sqrt(2/(pi*n)) * exp(-2*j*j/n) + * `nCr(n, j + n/2) / 2^n = sqrt(2/(pi*n)) * exp(-2*j*j/n)` * * There is one more problem left: The old smooth algorithm was doing a more aggressive * smooth. To solve that problem, choose a different n/2, which does not match the range and @@ -1064,8 +1064,8 @@ bool BKE_gpencil_stroke_smooth_point(bGPDstroke *gps, * * keep_shape is a new option to stop the stroke from severely deforming. * It uses different partially negative weights. - * w = 2 * (nCr(n, j + n/2) / 2^n) - (nCr(3*n, j + n) / 2^(3*n)) - * ~ 2 * sqrt(2/(pi*n)) * exp(-2*j*j/n) - sqrt(2/(pi*3*n)) * exp(-2*j*j/(3*n)) + * w = `2 * (nCr(n, j + n/2) / 2^n) - (nCr(3*n, j + n) / 2^(3*n))` + * ~ `2 * sqrt(2/(pi*n)) * exp(-2*j*j/n) - sqrt(2/(pi*3*n)) * exp(-2*j*j/(3*n))` * All weights still sum up to 1. * Note these weights only work because the averaging is done in relative coordinates. */ @@ -1117,7 +1117,7 @@ bool BKE_gpencil_stroke_smooth_point(bGPDstroke *gps, } total_w += w - w2; /* The accumulated weight total_w should be - * ~sqrt(M_PI * n_half) * exp((iterations * iterations) / n_half) < 100 + * `~sqrt(M_PI * n_half) * exp((iterations * iterations) / n_half) < 100` * here, but sometimes not quite. */ mul_v3_fl(sco, float(1.0 / total_w)); /* Shift back to global coordinates. */ diff --git a/source/blender/blenlib/BLI_math_base_safe.h b/source/blender/blenlib/BLI_math_base_safe.h index c349c9a0b65..b072c6ce88c 100644 --- a/source/blender/blenlib/BLI_math_base_safe.h +++ b/source/blender/blenlib/BLI_math_base_safe.h @@ -7,7 +7,7 @@ /** \file * \ingroup bli * - * This file provides safe alternatives to common math functions like sqrt, powf. + * This file provides safe alternatives to common math functions like `sqrt`, `powf`. * In this context "safe" means that the output is not NaN if the input is not NaN. */ diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index ad4d6805c28..37da5110a22 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -1051,9 +1051,11 @@ static float voronoi_Cr(float x, float y, float z) return t; } -/* Signed version of all 6 of the above, just 2x-1, not really correct though - * (range is potentially (0, sqrt(6)). - * Used in the musgrave functions */ +/** + * Signed version of all 6 of the above, just 2x-1, not really correct though + * (range is potentially `(0, sqrt(6))`. + * Used in the musgrave functions. + */ static float voronoi_F1S(float x, float y, float z) { float da[4], pa[12]; diff --git a/source/blender/blenlib/tests/BLI_string_test.cc b/source/blender/blenlib/tests/BLI_string_test.cc index 6de71b134cc..79c82348a0e 100644 --- a/source/blender/blenlib/tests/BLI_string_test.cc +++ b/source/blender/blenlib/tests/BLI_string_test.cc @@ -850,7 +850,7 @@ TEST(string, StringNLen) EXPECT_EQ(1, BLI_strnlen("x", 1)); EXPECT_EQ(1, BLI_strnlen("x", 100)); - // ü is \xc3\xbc + /* `ü` is `\xc3\xbc`. */ EXPECT_EQ(2, BLI_strnlen("ü", 100)); EXPECT_EQ(0, BLI_strnlen("this is a longer string", 0)); diff --git a/source/blender/blenloader/intern/readblenentry.cc b/source/blender/blenloader/intern/readblenentry.cc index 96b36d5192e..5b225966c81 100644 --- a/source/blender/blenloader/intern/readblenentry.cc +++ b/source/blender/blenloader/intern/readblenentry.cc @@ -45,7 +45,7 @@ /* local prototypes --------------------- */ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp); -/* Access routines used by filesel. */ +/* Access routines used by file-selector. */ void BLO_datablock_info_free(BLODataBlockInfo *datablock_info) { diff --git a/source/blender/blenloader/intern/versioning_250.cc b/source/blender/blenloader/intern/versioning_250.cc index 7e0897f05e3..68af5debb09 100644 --- a/source/blender/blenloader/intern/versioning_250.cc +++ b/source/blender/blenloader/intern/versioning_250.cc @@ -288,7 +288,7 @@ static void area_add_window_regions(ScrArea *area, SpaceLink *sl, ListBase *lb) SpaceGraph *sipo = (SpaceGraph *)sl; memcpy(®ion->v2d, &sipo->v2d, sizeof(View2D)); - /* init mainarea view2d */ + /* Initialize main-area view2d. */ region->v2d.scroll |= (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES); region->v2d.scroll |= (V2D_SCROLL_LEFT | V2D_SCROLL_VERTICAL_HANDLES); @@ -1148,7 +1148,7 @@ void blo_do_versions_250(FileData *fd, Library * /*lib*/, Main *bmain) } if (!MAIN_VERSION_FILE_ATLEAST(bmain, 250, 10)) { - /* properly initialize hair clothsim data on old files */ + /* Properly initialize hair cloth-simulation data on old files. */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Cloth) { diff --git a/source/blender/blenloader/intern/versioning_280.cc b/source/blender/blenloader/intern/versioning_280.cc index 5147a4944de..5c675deccf2 100644 --- a/source/blender/blenloader/intern/versioning_280.cc +++ b/source/blender/blenloader/intern/versioning_280.cc @@ -1245,7 +1245,7 @@ static void square_roughness_node_insert(bNodeTree *ntree) bNodeSocket *fromsock, bNode *tonode, bNodeSocket *tosock) { - /* Add sqrt node. */ + /* Add `sqrt` node. */ bNode *node = nodeAddStaticNode(nullptr, ntree, SH_NODE_MATH); node->custom1 = NODE_MATH_POWER; node->locx = 0.5f * (fromnode->locx + tonode->locx); diff --git a/source/blender/bmesh/intern/bmesh_opdefines.cc b/source/blender/bmesh/intern/bmesh_opdefines.cc index 1e94dc4462f..34ba873fa0c 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.cc +++ b/source/blender/bmesh/intern/bmesh_opdefines.cc @@ -46,7 +46,7 @@ * 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. + * rather than DOXYGEN syntax. * * template (py quotes used because nested comments don't work * on all C compilers): diff --git a/source/blender/bmesh/intern/bmesh_polygon.cc b/source/blender/bmesh/intern/bmesh_polygon.cc index bdef2f635b8..592c8f18168 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.cc +++ b/source/blender/bmesh/intern/bmesh_polygon.cc @@ -289,7 +289,7 @@ static int bm_vert_tri_find_unique_edge(BMVert *verts[3]) { /* find the most 'unique' loop, (greatest difference to others) */ #if 1 - /* optimized version that avoids sqrt */ + /* Optimized version that avoids `sqrt`. */ float difs[3]; for (int i_prev = 1, i_curr = 2, i_next = 0; i_next < 3; i_prev = i_curr, i_curr = i_next++) { const float *co = verts[i_curr]->co; diff --git a/source/blender/bmesh/tools/bmesh_bevel.cc b/source/blender/bmesh/tools/bmesh_bevel.cc index 4c79a0cdad0..00838f3806d 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.cc +++ b/source/blender/bmesh/tools/bmesh_bevel.cc @@ -3582,11 +3582,11 @@ static void adjust_the_cycle_or_chain(BoundVert *vstart, bool iscycle) v = vstart; int i = 0; - /* Sqrt of factor to weight down importance of spec match. */ + /* Square root of factor to weight down importance of spec match. */ double weight = BEVEL_MATCH_SPEC_WEIGHT; EdgeHalf *eleft, *eright, *enextleft; do { - /* Except at end of chain, v's indep variable is offset_r of v->efirst. */ + /* Except at end of chain, v's indep variable is offset_r of `v->efirst`. */ if (iscycle || i < np - 1) { eright = v->efirst; eleft = v->elast; @@ -5292,7 +5292,7 @@ static BMEdge *snap_edge_for_center_vmesh_vert(int i, * interpolates in the current boundvert's frep [= interpolation face] or the next one's. * Similarly, when n is odd, the center row (ring ns2) is ambiguous as to * whether it interpolates in the current boundvert's frep or the previous one's. - * Parameter frep_beats_next should have an array of size n_bndv of bools + * Parameter frep_beats_next should have an array of size n_bndv of booleans * that say whether the tie should be broken in favor of the next boundvert's * frep (if true) or the current one's. * For vertices in the center polygon (when ns is odd), the snapping edge depends @@ -7306,12 +7306,12 @@ static void find_even_superellipse_chords_general(int seg, float r, double *xval } /** - * Find equidistant points (x0,y0), (x1,y1)... (xn,yn) on the superellipse + * Find equidistant points `(x0,y0), (x1,y1)... (xn,yn)` on the superellipse * function in the first quadrant. For special profiles (linear, arc, * rectangle) the point can be calculated easily, for any other profile a more * expensive search procedure must be used because there is no known closed * form for equidistant parametrization. - * xvals and yvals should be size n+1. + * `xvals` and `yvals` should be size `n+1`. */ static void find_even_superellipse_chords(int n, float r, double *xvals, double *yvals) { diff --git a/source/blender/bmesh/tools/bmesh_decimate_dissolve.cc b/source/blender/bmesh/tools/bmesh_decimate_dissolve.cc index a54231d6a97..6b601d44fb8 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_dissolve.cc +++ b/source/blender/bmesh/tools/bmesh_decimate_dissolve.cc @@ -389,7 +389,7 @@ void BM_mesh_decimate_dissolve_ex(BMesh *bm, earray[i] = e_iter; } /* Remove all edges/verts left behind from dissolving, - * nullptr'ing the vertex array so we don't re-use. */ + * nulling the vertex array so we don't re-use. */ for (i = bm->totedge - 1; i != -1; i--) { e_iter = earray[i]; diff --git a/source/blender/bmesh/tools/bmesh_path_uv.cc b/source/blender/bmesh/tools/bmesh_path_uv.cc index 36d95bbf132..1d38e29dc3d 100644 --- a/source/blender/bmesh/tools/bmesh_path_uv.cc +++ b/source/blender/bmesh/tools/bmesh_path_uv.cc @@ -126,7 +126,7 @@ LinkNode *BM_mesh_calc_path_uv_vert(BMesh *bm, BMFace *f; /* NOTE: would pass BM_EDGE except we are looping over all faces anyway. */ - // BM_mesh_elem_index_ensure(bm, BM_LOOP); // NOT NEEDED FOR FACETAG + // BM_mesh_elem_index_ensure(bm, BM_LOOP); /* NOTE: not needed for facetag. */ BM_ITER_MESH (f, &viter, bm, BM_FACES_OF_MESH) { BMLoop *l_first = BM_FACE_FIRST_LOOP(f); @@ -556,7 +556,7 @@ LinkNode *BM_mesh_calc_path_uv_face(BMesh *bm, const void *const f_endpoints[2] = {f_src, f_dst}; /* NOTE: would pass BM_EDGE except we are looping over all faces anyway. */ - // BM_mesh_elem_index_ensure(bm, BM_LOOP); // NOT NEEDED FOR FACETAG + // BM_mesh_elem_index_ensure(bm, BM_LOOP); /* NOTE: not needed for facetag. */ { BMFace *f; diff --git a/source/blender/compositor/operations/COM_InpaintOperation.cc b/source/blender/compositor/operations/COM_InpaintOperation.cc index d6cb75c7e0b..f075bc062a2 100644 --- a/source/blender/compositor/operations/COM_InpaintOperation.cc +++ b/source/blender/compositor/operations/COM_InpaintOperation.cc @@ -179,7 +179,7 @@ void InpaintSimpleOperation::pix_step(int x, int y) weight = 1.0f; } else { - weight = M_SQRT1_2; /* 1.0f / sqrt(2) */ + weight = M_SQRT1_2; /* `1.0f / sqrt(2)`. */ } madd_v3_v3fl(pix, this->get_pixel(x_ofs, y_ofs), weight); diff --git a/source/blender/draw/engines/eevee_next/eevee_instance.cc b/source/blender/draw/engines/eevee_next/eevee_instance.cc index 24e26d84561..2b075e2d5ed 100644 --- a/source/blender/draw/engines/eevee_next/eevee_instance.cc +++ b/source/blender/draw/engines/eevee_next/eevee_instance.cc @@ -357,8 +357,8 @@ void Instance::render_read_result(RenderLayer *render_layer, const char *view_na BLI_mutex_lock(&render->update_render_passes_mutex); /* WORKAROUND: We use texture read to avoid using a frame-buffer to get the render result. * However, on some implementation, we need a buffer with a few extra bytes for the read to - * happen correctly (see GLTexture::read()). So we need a custom memory allocation. */ - /* Avoid memcpy(), replace the pointer directly. */ + * happen correctly (see #GLTexture::read()). So we need a custom memory allocation. */ + /* Avoid `memcpy()`, replace the pointer directly. */ RE_pass_set_buffer_data(rp, result); BLI_mutex_unlock(&render->update_render_passes_mutex); } diff --git a/source/blender/draw/engines/overlay/overlay_extra.cc b/source/blender/draw/engines/overlay/overlay_extra.cc index 1218fc84722..89591e1cfa0 100644 --- a/source/blender/draw/engines/overlay/overlay_extra.cc +++ b/source/blender/draw/engines/overlay/overlay_extra.cc @@ -671,8 +671,8 @@ void OVERLAY_light_cache_populate(OVERLAY_Data *vedata, Object *ob) * `y = (1/sqrt(1 + x^2) - a)/((1 - a) b)` * x being the tangent of the angle between the light direction and the generatrix of the cone. * We solve the case where spot attenuation y = 1 and y = 0 - * root for y = 1 is sqrt(1/c^2 - 1) - * root for y = 0 is sqrt(1/a^2 - 1) + * root for y = 1 is `sqrt(1/c^2 - 1)`. + * root for y = 0 is `sqrt(1/a^2 - 1)` * and use that to position the blend circle. */ float a = cosf(la->spotsize * 0.5f); float b = la->spotblend; diff --git a/source/blender/editors/interface/interface_handlers.cc b/source/blender/editors/interface/interface_handlers.cc index a870528045b..4f450b28db7 100644 --- a/source/blender/editors/interface/interface_handlers.cc +++ b/source/blender/editors/interface/interface_handlers.cc @@ -4700,12 +4700,12 @@ static int ui_do_but_TEX( if (ELEM(event->type, LEFTMOUSE, EVT_BUT_OPEN, EVT_PADENTER, EVT_RETKEY) && event->val == KM_PRESS) { if (ELEM(event->type, EVT_PADENTER, EVT_RETKEY) && !UI_but_is_utf8(but)) { - /* pass - allow filesel, enter to execute */ + /* Pass, allow file-selector, enter to execute. */ } else if (ELEM(but->emboss, UI_EMBOSS_NONE, UI_EMBOSS_NONE_OR_STATUS) && ((event->modifier & KM_CTRL) == 0)) { - /* pass */ + /* Pass. */ } else { if (!ui_but_extra_operator_icon_mouse_over_get(but, data->region, event)) { diff --git a/source/blender/editors/space_action/action_edit.cc b/source/blender/editors/space_action/action_edit.cc index f89dec3d5eb..c0c737ee128 100644 --- a/source/blender/editors/space_action/action_edit.cc +++ b/source/blender/editors/space_action/action_edit.cc @@ -712,7 +712,7 @@ void ACTION_OT_paste(wmOperatorType *ot) "frame"; /* api callbacks */ - // ot->invoke = WM_operator_props_popup; // better wait for action redo panel + // ot->invoke = WM_operator_props_popup; /* Better wait for action redo panel. */ ot->get_description = actkeys_paste_description; ot->exec = actkeys_paste_exec; ot->poll = ED_operator_action_active; diff --git a/source/blender/editors/space_view3d/space_view3d.cc b/source/blender/editors/space_view3d/space_view3d.cc index 783a5ca22ad..5cfa7622577 100644 --- a/source/blender/editors/space_view3d/space_view3d.cc +++ b/source/blender/editors/space_view3d/space_view3d.cc @@ -448,7 +448,7 @@ static void view3d_main_region_init(wmWindowManager *wm, ARegion *region) keymap = WM_keymap_ensure(wm->defaultconf, "Grease Pencil Paint Mode", 0, 0); WM_event_add_keymap_handler(®ion->handlers, keymap); - /* editfont keymap swallows all... */ + /* Edit-font key-map swallows almost all (because of text input). */ keymap = WM_keymap_ensure(wm->defaultconf, "Font", 0, 0); WM_event_add_keymap_handler(®ion->handlers, keymap); diff --git a/source/blender/geometry/intern/uv_pack.cc b/source/blender/geometry/intern/uv_pack.cc index 5f504576c50..14f420b2f92 100644 --- a/source/blender/geometry/intern/uv_pack.cc +++ b/source/blender/geometry/intern/uv_pack.cc @@ -277,8 +277,7 @@ void PackIsland::finalize_geometry_(const UVPackIsland_Params ¶ms, MemArena * computing convex hull. * In the future, we might also detect special-cases for speed or efficiency, such as * rectangle approximation, circle approximation, detecting if the shape has any holes, - * analysing the shape for rotational symmetry or removing overlaps. - */ + * analyzing the shape for rotational symmetry or removing overlaps. */ BLI_assert(triangle_vertices_.size() >= 3); calculate_pre_rotation_(params); @@ -1329,7 +1328,7 @@ static uv_phi find_best_fit_for_island(const PackIsland *island, const float bitmap_scale = 1.0f / occupancy.bitmap_scale_reciprocal; /* TODO: If `target_aspect_y != 1.0f`, to avoid aliasing issues, we should probably iterate - * seperately on `scan_line_x` and `scan_line_y`. See also: Bresenham's algorithm. */ + * Separately on `scan_line_x` and `scan_line_y`. See also: Bresenham's algorithm. */ const float sqrt_target_aspect_y = sqrtf(target_aspect_y); const int scan_line_x = int(scan_line * sqrt_target_aspect_y); const int scan_line_y = int(scan_line / sqrt_target_aspect_y); diff --git a/source/blender/gpu/shaders/common/gpu_shader_test_lib.glsl b/source/blender/gpu/shaders/common/gpu_shader_test_lib.glsl index 15512f2cdfa..54b4747c74c 100644 --- a/source/blender/gpu/shaders/common/gpu_shader_test_lib.glsl +++ b/source/blender/gpu/shaders/common/gpu_shader_test_lib.glsl @@ -1,5 +1,5 @@ -// clang-format off +/* clang-format off */ #ifndef GPU_METAL bool is_integer(bool v) { return true; } #endif @@ -78,7 +78,7 @@ uint to_type(mat3x4 v) { return TEST_TYPE_MAT3X4; } uint to_type(mat4x2 v) { return TEST_TYPE_MAT4X2; } uint to_type(mat4x3 v) { return TEST_TYPE_MAT4X3; } uint to_type(mat4x4 v) { return TEST_TYPE_MAT4X4; } -// clang-format on +/* clang-format on */ #define WRITE_MATRIX(v) \ TestOutputRawData raw; \ @@ -113,7 +113,7 @@ uint to_type(mat4x4 v) { return TEST_TYPE_MAT4X4; } raw.data[0] = uint(v); \ return raw; -// clang-format off +/* clang-format off */ #ifndef GPU_METAL TestOutputRawData as_raw_data(bool v) { WRITE_INT_SCALAR(v); } #endif @@ -138,7 +138,7 @@ TestOutputRawData as_raw_data(mat3x4 v) { WRITE_MATRIX(v); } TestOutputRawData as_raw_data(mat4x2 v) { WRITE_MATRIX(v); } TestOutputRawData as_raw_data(mat4x3 v) { WRITE_MATRIX(v); } TestOutputRawData as_raw_data(mat4x4 v) { WRITE_MATRIX(v); } -// clang-format on +/* clang-format on */ int g_test_id = 0; diff --git a/source/blender/io/collada/EffectExporter.cpp b/source/blender/io/collada/EffectExporter.cpp index 6d02ede6331..a412ea3429a 100644 --- a/source/blender/io/collada/EffectExporter.cpp +++ b/source/blender/io/collada/EffectExporter.cpp @@ -210,9 +210,11 @@ void EffectsExporter::operator()(Material *ma, Object *ob) set_transparency(ep, ma); /* TODO: */ - // set_shininess(ep, ma); shininess not supported for lambert - // set_ambient(ep, ma); - // set_specular(ep, ma); +#if 0 + set_shininess(ep, ma); /* Shininess not supported for lambert. */ + set_ambient(ep, ma); + set_specular(ep, ma); +#endif get_images(ma, material_image_map); std::string active_uv(getActiveUVLayerName(ob)); diff --git a/source/blender/io/collada/MaterialExporter.h b/source/blender/io/collada/MaterialExporter.h index 397d6192f74..fbc7f3ed0d0 100644 --- a/source/blender/io/collada/MaterialExporter.h +++ b/source/blender/io/collada/MaterialExporter.h @@ -36,7 +36,7 @@ class MaterialsExporter : COLLADASW::LibraryMaterials { BCExportSettings &export_settings; }; -// used in forEachMaterialInScene +/* Used in `forEachMaterialInScene`. */ template class ForEachMaterialFunctor { std::vector mMat; /* contains list of material names, to avoid duplicate calling of f */ diff --git a/source/blender/makesdna/DNA_boid_types.h b/source/blender/makesdna/DNA_boid_types.h index 6de123a1959..620c5c8dfcc 100644 --- a/source/blender/makesdna/DNA_boid_types.h +++ b/source/blender/makesdna/DNA_boid_types.h @@ -109,7 +109,7 @@ typedef struct BoidData { short state_id, mode; } BoidData; -// planned for near future +/* Planned for near future. */ // typedef enum BoidConditionMode { // eBoidConditionType_Then = 0, // eBoidConditionType_And = 1, @@ -161,7 +161,7 @@ typedef struct BoidState { float volume, falloff; } BoidState; -// planned for near future +/* Planned for near future. */ // typedef struct BoidSignal { // struct BoidSignal *next, *prev; // float loc[3]; diff --git a/source/blender/modifiers/intern/MOD_array.cc b/source/blender/modifiers/intern/MOD_array.cc index 226faa8f2af..9f3bcab82af 100644 --- a/source/blender/modifiers/intern/MOD_array.cc +++ b/source/blender/modifiers/intern/MOD_array.cc @@ -159,7 +159,7 @@ static void dm_mvert_map_doubles(int *doubles_map, const int source_verts_num, const float dist) { - const float dist3 = (float(M_SQRT3) + 0.00005f) * dist; /* Just above sqrt(3) */ + const float dist3 = (float(M_SQRT3) + 0.00005f) * dist; /* Just above `sqrt(3)`. */ int i_source, i_target, i_target_low_bound, target_end, source_end; SortVertsElem *sve_source, *sve_target, *sve_target_low_bound; bool target_scan_completed; diff --git a/source/blender/modifiers/intern/MOD_hook.cc b/source/blender/modifiers/intern/MOD_hook.cc index 85cf5a7ffa7..fa63977657c 100644 --- a/source/blender/modifiers/intern/MOD_hook.cc +++ b/source/blender/modifiers/intern/MOD_hook.cc @@ -177,7 +177,7 @@ static float hook_falloff(const HookData_cb *hd, const float len_sq) goto finally; } else if (hd->falloff_type == eHook_Falloff_InvSquare) { - /* avoid sqrt below */ + /* Avoid `sqrt` below. */ fac = 1.0f - (len_sq / hd->falloff_sq); goto finally; } diff --git a/source/blender/modifiers/intern/MOD_screw.cc b/source/blender/modifiers/intern/MOD_screw.cc index 810f582e0bf..5a70d290595 100644 --- a/source/blender/modifiers/intern/MOD_screw.cc +++ b/source/blender/modifiers/intern/MOD_screw.cc @@ -532,7 +532,7 @@ static Mesh *modify_mesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh vc->e[0] = vc->e[1] = nullptr; vc->v[0] = vc->v[1] = SV_UNUSED; - /* Length in 2D, don't sqrt because this is only for comparison. */ + /* Length in 2D, don't `sqrt` because this is only for comparison. */ vc->dist_sq = vc->co[other_axis_1] * vc->co[other_axis_1] + vc->co[other_axis_2] * vc->co[other_axis_2]; diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.cc b/source/blender/modifiers/intern/MOD_surfacedeform.cc index 1d7eda277f2..db39f102894 100644 --- a/source/blender/modifiers/intern/MOD_surfacedeform.cc +++ b/source/blender/modifiers/intern/MOD_surfacedeform.cc @@ -697,7 +697,7 @@ BLI_INLINE SDefBindWeightData *computeBindWeights(SDefBindCalcData *const data, bpoly->point_edgemid_angles[1] = max_ff(0, point_angles[1]); /* Compute the distance scale for the corner. The base value is the orthogonal - * distance from the corner to the chord, scaled by sqrt(2) to preserve the old + * distance from the corner to the chord, scaled by `sqrt(2)` to preserve the old * values in case of a square grid. This doesn't use the centroid because the * LOOPTRI method only uses these three vertices. */ bpoly->scale_mid = area_tri_v2(vert0_v2, corner_v2, vert1_v2) /