diff --git a/intern/cycles/kernel/device/oneapi/compat.h b/intern/cycles/kernel/device/oneapi/compat.h index a43b68e5b49..73384b7be59 100644 --- a/intern/cycles/kernel/device/oneapi/compat.h +++ b/intern/cycles/kernel/device/oneapi/compat.h @@ -195,9 +195,9 @@ using sycl::half; #define fmodf(x, y) sycl::fmod((x), (y)) #define lgammaf(x) sycl::lgamma((x)) -/* sycl::native::cos precision is not sufficient and -ffast-math lets - * the current DPC++ compiler overload sycl::cos with it. - * We work around this issue by directly calling the spirv implementation which +/* `sycl::native::cos` precision is not sufficient and `-ffast-math` lets + * the current DPC++ compiler overload `sycl::cos` with it. + * We work around this issue by directly calling the SPIRV implementation which * provides greater precision. */ #if defined(__SYCL_DEVICE_ONLY__) && defined(__SPIR__) # define cosf(x) __spirv_ocl_cos(((float)(x))) diff --git a/intern/ghost/intern/GHOST_ContextCGL.h b/intern/ghost/intern/GHOST_ContextCGL.h index 60098c99fe3..3134606d59b 100644 --- a/intern/ghost/intern/GHOST_ContextCGL.h +++ b/intern/ghost/intern/GHOST_ContextCGL.h @@ -27,11 +27,11 @@ class GHOST_ContextCGL : public GHOST_Context { public: /* Defines the number of simultaneous command buffers which can be in flight. * The default limit of `64` is considered to be optimal for Blender. Too many command buffers - * will result in workload fragmnetation and additional system-level overhead. This limit should + * will result in workload fragmentation and additional system-level overhead. This limit should * also only be increased if the application is consistently exceeding the limit, and there are * no command buffer leaks. * - * If this limit is reached, starting a new command buffer will fail. The Metal backend will + * If this limit is reached, starting a new command buffer will fail. The Metal back-end will * therefore stall until completion and log a warning when this limit is reached in order to * ensure correct function of the app. * diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh index 1b52fe709ac..e22348106db 100644 --- a/source/blender/blenkernel/BKE_curves.hh +++ b/source/blender/blenkernel/BKE_curves.hh @@ -692,7 +692,7 @@ int calculate_evaluated_num(int points_num, bool cyclic, int resolution); void interpolate_to_evaluated(GSpan src, bool cyclic, int resolution, GMutableSpan dst); /** - * Evaluate the Catmull Rom curve. The placement of each segment in the #dst span is desribed by + * Evaluate the Catmull Rom curve. The placement of each segment in the #dst span is described by * #evaluated_offsets. */ void interpolate_to_evaluated(const GSpan src, diff --git a/source/blender/blenkernel/BKE_mesh_mapping.h b/source/blender/blenkernel/BKE_mesh_mapping.h index 4db3ea414f4..46f62220d91 100644 --- a/source/blender/blenkernel/BKE_mesh_mapping.h +++ b/source/blender/blenkernel/BKE_mesh_mapping.h @@ -100,6 +100,7 @@ typedef struct MeshElemMap { } MeshElemMap; /* mapping */ + UvVertMap *BKE_mesh_uv_vert_map_create(const struct MPoly *mpoly, const bool *hide_poly, const bool *select_poly, diff --git a/source/blender/blenkernel/intern/blendfile.cc b/source/blender/blenkernel/intern/blendfile.cc index 68f37df9ca9..e151c671b06 100644 --- a/source/blender/blenkernel/intern/blendfile.cc +++ b/source/blender/blenkernel/intern/blendfile.cc @@ -382,7 +382,7 @@ static void setup_app_data(bContext *C, STRNCPY(bmain->filepath, bfd->filepath); } - /* baseflags, groups, make depsgraph, etc */ + /* Base-flags, groups, make depsgraph, etc. */ /* first handle case if other windows have different scenes visible */ if (mode == LOAD_UI) { wmWindowManager *wm = static_cast(bmain->wm.first); diff --git a/source/blender/blenkernel/intern/brush.cc b/source/blender/blenkernel/intern/brush.cc index 015b54f9e75..a8482f905d1 100644 --- a/source/blender/blenkernel/intern/brush.cc +++ b/source/blender/blenkernel/intern/brush.cc @@ -151,7 +151,8 @@ static void brush_make_local(Main *bmain, ID *id, const int flags) BKE_lib_id_make_local_generic_action_define(bmain, id, flags, &force_local, &force_copy); if (brush->clone.image) { - /* Special case: ima always local immediately. Clone image should only have one user anyway. */ + /* Special case: `ima` always local immediately. + * Clone image should only have one user anyway. */ /* FIXME: Recursive calls affecting other non-embedded IDs are really bad and should be avoided * in IDType callbacks. Higher-level ID management code usually does not expect such things and * does not deal properly with it. */ diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index fbaadca09cd..fa9a18859b8 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -4528,7 +4528,7 @@ static void damptrack_do_transform(float matrix[4][4], const float tarvec_in[3], } } else if (norm < 0.1f) { - /* near 0 and Pi arcsin has way better precision than arccos */ + /* Near 0 and Pi `arcsin` has way better precision than `arccos`. */ rangle = (rangle > M_PI_2) ? M_PI - asinf(norm) : asinf(norm); } diff --git a/source/blender/blenkernel/intern/fluid.cc b/source/blender/blenkernel/intern/fluid.cc index 912775f3bd1..47099b1714e 100644 --- a/source/blender/blenkernel/intern/fluid.cc +++ b/source/blender/blenkernel/intern/fluid.cc @@ -721,7 +721,7 @@ static void bb_combineMaps(FluidObjectBB *output, { int i, x, y, z; - /* Copyfill input 1 struct and clear output for new allocation. */ + /* Copy-fill input 1 struct and clear output for new allocation. */ FluidObjectBB bb1; memcpy(&bb1, output, sizeof(FluidObjectBB)); memset(output, 0, sizeof(FluidObjectBB)); @@ -3539,7 +3539,7 @@ static int manta_step( BLI_mutex_lock(&object_update_lock); - /* Loop as long as time_per_frame (sum of sub dt's) does not exceed actual framelength. */ + /* Loop as long as time_per_frame (sum of sub dt's) does not exceed actual frame-length. */ while (time_per_frame + FLT_EPSILON < frame_length) { manta_adapt_timestep(fds->fluid); dt = manta_get_timestep(fds->fluid); @@ -3582,7 +3582,7 @@ static int manta_step( fds->time_total = time_total; } - /* Total time must not exceed framecount times framelength. Correct tiny errors here. */ + /* Total time must not exceed frame-count times frame-length. Correct tiny errors here. */ CLAMP_MAX(fds->time_total, time_total_old + fds->frame_length); /* Compute shadow grid for gas simulations. Make sure to skip if bake job was canceled early. */ @@ -4652,7 +4652,7 @@ void BKE_fluid_fields_sanitize(FluidDomainSettings *settings) settings->coba_field = FLUID_DOMAIN_FIELD_DENSITY; } - /* Gas domains do not support vdb mini precision. */ + /* Gas domains do not support VDB mini precision. */ if (data_depth == VDB_PRECISION_MINI_FLOAT) { settings->openvdb_data_depth = VDB_PRECISION_HALF_FLOAT; } diff --git a/source/blender/blenkernel/intern/mesh_legacy_convert.cc b/source/blender/blenkernel/intern/mesh_legacy_convert.cc index 4926be66d27..5913751aac9 100644 --- a/source/blender/blenkernel/intern/mesh_legacy_convert.cc +++ b/source/blender/blenkernel/intern/mesh_legacy_convert.cc @@ -1163,17 +1163,17 @@ static int mesh_tessface_calc(Mesh &mesh, CustomData_add_layer(fdata, CD_ORIGINDEX, CD_ASSIGN, mface_to_poly_map, totface); add_mface_layers(mesh, fdata, ldata, totface); - /* NOTE: quad detection issue - fourth vertidx vs fourth loopidx: + /* NOTE: quad detection issue - fourth vertex-index vs fourth loop-index: * Polygons take care of their loops ordering, hence not of their vertices ordering. * Currently, our tfaces' fourth vertex index might be 0 even for a quad. * However, we know our fourth loop index is never 0 for quads * (because they are sorted for polygons, and our quads are still mere copies of their polygons). - * So we pass nullptr as MFace pointer, and #mesh_loops_to_tessdata + * So we pass nullptr as #MFace pointer, and #mesh_loops_to_tessdata * will use the fourth loop index as quad test. */ mesh_loops_to_tessdata(fdata, ldata, nullptr, mface_to_poly_map, lindices, totface); - /* NOTE: quad detection issue - fourth vertidx vs fourth loopidx: - * ...However, most TFace code uses 'MFace->v4 == 0' test to check whether it is a tri or quad. + /* NOTE: quad detection issue - fourth vert-index vs fourth loop-index: + * ...However, most #TFace code uses `MFace->v4 == 0` test to check whether it is a tri or quad. * BKE_mesh_mface_index_validate() will check this and rotate the tessellated face if needed. */ #ifdef USE_TESSFACE_QUADS diff --git a/source/blender/blenkernel/intern/mesh_mapping.cc b/source/blender/blenkernel/intern/mesh_mapping.cc index 32c8638fbcf..780e32d540a 100644 --- a/source/blender/blenkernel/intern/mesh_mapping.cc +++ b/source/blender/blenkernel/intern/mesh_mapping.cc @@ -29,7 +29,6 @@ /** \name Mesh Connectivity Mapping * \{ */ -/* ngon version wip, based on BM_uv_vert_map_create */ UvVertMap *BKE_mesh_uv_vert_map_create(const MPoly *mpoly, const bool *hide_poly, const bool *select_poly, @@ -41,6 +40,8 @@ UvVertMap *BKE_mesh_uv_vert_map_create(const MPoly *mpoly, const bool selected, const bool use_winding) { + /* NOTE: N-gon version WIP, based on #BM_uv_vert_map_create. */ + UvVertMap *vmap; UvMapVert *buf; const MPoly *mp; diff --git a/source/blender/blenkernel/intern/multires_reshape_smooth.cc b/source/blender/blenkernel/intern/multires_reshape_smooth.cc index a248251946a..c77c2f10785 100644 --- a/source/blender/blenkernel/intern/multires_reshape_smooth.cc +++ b/source/blender/blenkernel/intern/multires_reshape_smooth.cc @@ -104,7 +104,7 @@ struct LinearGrids { LinearGridElement *elements_storage; }; -/* Context which holds all information eeded during propagation and smoothing. */ +/* Context which holds all information needed during propagation and smoothing. */ struct MultiresReshapeSmoothContext { const MultiresReshapeContext *reshape_context; diff --git a/source/blender/blenkernel/intern/pbvh_intern.h b/source/blender/blenkernel/intern/pbvh_intern.h index 4666504e94f..74f0eae38f1 100644 --- a/source/blender/blenkernel/intern/pbvh_intern.h +++ b/source/blender/blenkernel/intern/pbvh_intern.h @@ -97,7 +97,7 @@ struct PBVHNode { * marking various updates that need to be applied. */ PBVHNodeFlags flag : 32; - /* Used for raycasting: how close bb is to the ray point. */ + /* Used for ray-casting: how close the bounding-box is to the ray point. */ float tmin; /* Scalar displacements for sculpt mode's layer brush. */ diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 83b5fd45d2f..1a19ccade7a 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -2800,9 +2800,9 @@ static void reference_to_scratch(Object *ob) // printf("reference_to_scratch\n"); } -/* +/** * helper function to get proper spring length - * when object is rescaled + * when object is re-scaled */ static float globallen(float *v1, float *v2, Object *ob) { diff --git a/source/blender/blenkernel/intern/subsurf_ccg.cc b/source/blender/blenkernel/intern/subsurf_ccg.cc index 6a1d9baf63a..abeb0f33a18 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.cc +++ b/source/blender/blenkernel/intern/subsurf_ccg.cc @@ -315,7 +315,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, int nverts = mp->totloop; int j, j_next; CCGFace *origf = ccgSubSurf_getFace(origss, POINTER_FROM_INT(i)); - /* uint *fv = &mp->v1; */ + // uint *fv = &mp->v1; MLoop *ml = mloop + mp->loopstart; fverts.reinitialize(nverts); diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index 4e0df875740..a1c69da6f7a 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -13,23 +13,23 @@ * A word on slot names: * * For geometry input slots, the following are valid names: - * - verts - * - edges - * - faces - * - edgefacein - * - vertfacein - * - vertedgein - * - vertfacein - * - geom + * - `verts` + * - `edges` + * - `faces` + * - `edge_face.in` + * - `vert_face.in` + * - `vert_edge.in` + * - `vert_face.in` + * - `geom` * * The basic rules are, for single-type geometry slots, use the plural of the * type name (e.g. edges). for double-type slots, use the two type names plus - * "in" (e.g. edgefacein). for three-type slots, use geom. + * "in" (e.g. `edge_face.in`). for three-type slots, use geom. * * for output slots, for single-type geometry slots, use the type name plus "out", - * (e.g. verts.out), for double-type slots, use the two type names plus "out", - * (e.g. vertfaces.out), for three-type slots, use geom. note that you can also - * use more esoteric names (e.g. geom_skirt.out) so long as the comment next to the + * (e.g. `verts.out`), for double-type slots, use the two type names plus "out", + * (e.g. `vert_faces.out`), for three-type slots, use geom. note that you can also + * use more esoteric names (e.g. `geom_skirt.out`) so long as the comment next to the * slot definition tells you what types of elements are in it. */ diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index 9e17efb2cd0..4215ec2b25b 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -1385,7 +1385,7 @@ static void offset_meet(BevelParams *bp, copy_v3_v3(meetco, off1a); } else if (fabsf(ang - (float)M_PI) < BEVEL_EPSILON_ANG) { - /* Special case: e1 and e2 are antiparallel, so bevel is into a zero-area face. + /* Special case: e1 and e2 are anti-parallel, so bevel is into a zero-area face. * Just make the offset point on the common line, at offset distance from v. */ float d = max_ff(e1->offset_r, e2->offset_l); slide_dist(e2, v, d, meetco); @@ -7600,14 +7600,14 @@ static float geometry_collide_offset(BevelParams *bp, EdgeHalf *eb) } /* Now check edge slide cases. */ - if (kb > 0.0f && ka == 0.0f /*&& bvb->selcount == 1 && bvb->edgecount > 2 */) { + if (kb > 0.0f && ka == 0.0f /* `&& bvb->selcount == 1 && bvb->edgecount > 2` */) { float t = BM_edge_calc_length(ea->e); t *= sin1 / kb; if (t >= 0.0f && t < limit) { limit = t; } } - if (kb > 0.0f && kc == 0.0f /* && bvc && ec && bvc->selcount == 1 && bvc->edgecount > 2 */) { + if (kb > 0.0f && kc == 0.0f /* `&& bvc && ec && bvc->selcount == 1 && bvc->edgecount > 2` */) { float t = BM_edge_calc_length(ec->e); t *= sin2 / kb; if (t >= 0.0f && t < limit) { diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_composite_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_composite_info.hh index c437605574d..36bb60408c6 100644 --- a/source/blender/draw/engines/workbench/shaders/infos/workbench_composite_info.hh +++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_composite_info.hh @@ -76,8 +76,10 @@ GPU_SHADER_CREATE_INFO(workbench_next_resolve_curvature) GPU_SHADER_CREATE_INFO(workbench_next_resolve_cavity) .define("WORKBENCH_CAVITY") - .sampler(8, ImageType::FLOAT_2D, "jitter_tx") /* TODO(Miguel Pozo): GPU_SAMPLER_REPEAT is set - in CavityEffect, it doesn't work here ? */ + + /* TODO(@pragma37): GPU_SAMPLER_REPEAT is set in CavityEffect, it doesn't work here? */ + .sampler(8, ImageType::FLOAT_2D, "jitter_tx") + .uniform_buf(5, "vec4", "cavity_samples[512]"); /* Variations */ diff --git a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.cc b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.cc index e00d67d4d0f..2e1ea266d78 100644 --- a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.cc +++ b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.cc @@ -221,7 +221,7 @@ void AntiAliasingPass::setup_view(View &view, int2 resolution) setup_taa_weights(sample_offset, weights_, weights_sum_); - /* TODO(Miguel Pozo): New API equivalent? */ + /* TODO(@pragma37): New API equivalent? */ const DRWView *default_view = DRW_view_default_get(); float4x4 winmat, viewmat, persmat; /* Construct new matrices from transform delta */ @@ -243,7 +243,7 @@ void AntiAliasingPass::draw(Manager &manager, GPUTexture *color_tx) { if (!enabled_) { - /* TODO(Miguel Pozo): Should render to the input color_tx and depth_tx in the first place. + /* TODO(@pragma37): Should render to the input color_tx and depth_tx in the first place. * This requires the use of TextureRefs with stencil_view() support, * but whether TextureRef will stay is still TBD. */ GPU_texture_copy(color_tx, resources.color_tx); @@ -274,7 +274,7 @@ void AntiAliasingPass::draw(Manager &manager, if (sample0_depth_tx_.is_valid()) { GPU_texture_copy(sample0_depth_tx_, resources.depth_tx); } - /* TODO(Miguel Pozo): Should render to the input depth_tx in the first place + /* TODO(@pragma37): Should render to the input depth_tx in the first place * This requires the use of TextureRef with stencil_view() support, * but whether TextureRef will stay is still TBD. */ diff --git a/source/blender/draw/engines/workbench/workbench_engine.cc b/source/blender/draw/engines/workbench/workbench_engine.cc index d2743d5733b..5e86fb5bdc4 100644 --- a/source/blender/draw/engines/workbench/workbench_engine.cc +++ b/source/blender/draw/engines/workbench/workbench_engine.cc @@ -117,11 +117,15 @@ class Instance { const int draw_as = (part->draw_as == PART_DRAW_REND) ? part->ren_as : part->draw_as; if (draw_as == PART_DRAW_PATH) { - /* TODO(Miguel Pozo): - workbench_cache_hair_populate( - wpd, ob, psys, md, object_state.color_type, object_state.texture_paint_mode, - part->omat); - */ +#if 0 /* TODO(@pragma37): */ + workbench_cache_hair_populate(wpd, + ob, + psys, + md, + object_state.color_type, + object_state.texture_paint_mode, + part->omat); +#endif } } } @@ -131,9 +135,9 @@ class Instance { if (md && BKE_modifier_is_enabled(scene_state.scene, md, eModifierMode_Realtime)) { FluidModifierData *fmd = (FluidModifierData *)md; if (fmd->domain) { - /* TODO(Miguel Pozo): +#if 0 /* TODO(@pragma37): */ workbench_volume_cache_populate(vedata, wpd->scene, ob, md, V3D_SHADING_SINGLE_COLOR); - */ +#endif if (fmd->domain->type == FLUID_DOMAIN_TYPE_GAS) { return; /* Do not draw solid in this case. */ } @@ -153,17 +157,17 @@ class Instance { mesh_sync(manager, ob_ref, object_state); } else if (ob->type == OB_CURVES) { - /* TODO(Miguel Pozo): +#if 0 /* TODO(@pragma37): */ DRWShadingGroup *grp = workbench_material_hair_setup( wpd, ob, CURVES_MATERIAL_NR, object_state.color_type); DRW_shgroup_curves_create_sub(ob, grp, NULL); - */ +#endif } else if (ob->type == OB_VOLUME) { if (scene_state.shading.type != OB_WIRE) { - /* TODO(Miguel Pozo): +#if 0 /* TODO(@pragma37): */ workbench_volume_cache_populate(vedata, wpd->scene, ob, NULL, object_state.color_type); - */ +#endif } } } @@ -174,9 +178,9 @@ class Instance { bool has_transparent_material = false; if (object_state.sculpt_pbvh) { - /* TODO(Miguel Pozo): +#if 0 /* TODO(@pragma37): */ workbench_cache_sculpt_populate(wpd, ob, object_state.color_type); - */ +#endif } else { if (object_state.use_per_material_batches) { @@ -348,7 +352,7 @@ class Instance { GPU_TEXTURE_USAGE_SHADER_READ | GPU_TEXTURE_USAGE_ATTACHMENT); if (opaque_ps.gbuffer_in_front_ps_.is_empty()) { - /* Clear only if it wont be overwitten by opaque_ps */ + /* Clear only if it wont be overwritten by `opaque_ps`. */ Framebuffer fb = Framebuffer("Workbench.Clear"); fb.ensure(GPU_ATTACHMENT_TEXTURE(resources.depth_in_front_tx)); fb.bind(); @@ -665,7 +669,7 @@ static void workbench_render_to_image(void *vedata, /* Also we weed to have a correct FBO bound for #DRW_curves_update */ // GPU_framebuffer_bind(dfbl->default_fb); - // DRW_curves_update(); /* TODO(Miguel Pozo): Check this once curves are implemented */ + // DRW_curves_update(); /* TODO(@pragma37): Check this once curves are implemented */ workbench_draw_scene(vedata); diff --git a/source/blender/draw/engines/workbench/workbench_mesh_passes.cc b/source/blender/draw/engines/workbench/workbench_mesh_passes.cc index 2f4d785216d..ae522541e89 100644 --- a/source/blender/draw/engines/workbench/workbench_mesh_passes.cc +++ b/source/blender/draw/engines/workbench/workbench_mesh_passes.cc @@ -88,7 +88,7 @@ void MeshPass::draw(ObjectRef &ref, } sub_pass->push_constant("isImageTile", tilemap != nullptr); sub_pass->push_constant("imagePremult", image && image->alpha_mode == IMA_ALPHA_PREMUL); - /* TODO(Miguel Pozo): This setting should be exposed on the user side, + /* TODO(@pragma37): This setting should be exposed on the user side, * either as a global parameter (and set it here) * or by reading the Material Clipping Threshold (and set it per material) */ sub_pass->push_constant("imageTransparencyCutoff", 0.1f); diff --git a/source/blender/draw/engines/workbench/workbench_private.hh b/source/blender/draw/engines/workbench/workbench_private.hh index 20c07061b06..8ce55ed9699 100644 --- a/source/blender/draw/engines/workbench/workbench_private.hh +++ b/source/blender/draw/engines/workbench/workbench_private.hh @@ -287,7 +287,7 @@ class ShadowPass { UniformBuffer pass_data_ = {}; - /* Draws are added to both passes and the visibily compute shader selects one of them */ + /* Draws are added to both passes and the visibly compute shader selects one of them */ PassMain pass_ps_ = {"Shadow.Pass"}; PassMain fail_ps_ = {"Shadow.Fail"}; diff --git a/source/blender/draw/engines/workbench/workbench_resources.cc b/source/blender/draw/engines/workbench/workbench_resources.cc index 25a2b284c40..5a0654f3aec 100644 --- a/source/blender/draw/engines/workbench/workbench_resources.cc +++ b/source/blender/draw/engines/workbench/workbench_resources.cc @@ -41,7 +41,7 @@ static bool get_matcap_tx(Texture &matcap_tx, StudioLight &studio_light) static float4x4 get_world_shading_rotation_matrix(float studiolight_rot_z) { - /* TODO(Miguel Pozo) C++ API ? */ + /* TODO(@pragma37): C++ API? */ float V[4][4], R[4][4]; DRW_view_viewmat_get(nullptr, V, false); axis_angle_to_mat4_single(R, 'Z', -studiolight_rot_z); @@ -148,7 +148,7 @@ void SceneResources::init(const SceneState &scene_state) world_buf.use_specular = false; } - /* TODO(Miguel Pozo) volumes_do */ + /* TODO(@pragma37): volumes_do */ cavity.init(scene_state, *this); diff --git a/source/blender/draw/engines/workbench/workbench_shadow.cc b/source/blender/draw/engines/workbench/workbench_shadow.cc index 34db0a0dfe9..61eda4dce58 100644 --- a/source/blender/draw/engines/workbench/workbench_shadow.cc +++ b/source/blender/draw/engines/workbench/workbench_shadow.cc @@ -240,7 +240,7 @@ void ShadowPass::ShadowView::compute_visibility(ObjectBoundsBuf &bounds, } if (do_visibility_) { - /* TODO(Miguel Pozo): Use regular culling for the caps pass */ + /* TODO(@pragma37): Use regular culling for the caps pass. */ if (dynamic_pass_type_shader_ == nullptr) { dynamic_pass_type_shader_ = GPU_shader_create_from_info_name( diff --git a/source/blender/draw/engines/workbench/workbench_state.cc b/source/blender/draw/engines/workbench/workbench_state.cc index 8dd20684e71..3b44abd03a7 100644 --- a/source/blender/draw/engines/workbench/workbench_state.cc +++ b/source/blender/draw/engines/workbench/workbench_state.cc @@ -41,7 +41,7 @@ void SceneState::init(Object *camera_ob /*= nullptr*/) object_mode = CTX_data_mode_enum_ex(context->object_edit, context->obact, context->object_mode); - /* TODO(Miguel Pozo): + /* TODO(@pragma37): * Check why Workbench Next exposes OB_MATERIAL, and Workbench exposes OB_RENDER */ bool is_render_mode = !v3d || ELEM(v3d->shading.type, OB_RENDER, OB_MATERIAL); @@ -109,7 +109,7 @@ void SceneState::init(Object *camera_ob /*= nullptr*/) } float4x4 matrix; - /*TODO(Miguel Pozo): New API ?*/ + /* TODO(@pragma37): New API? */ DRW_view_persmat_get(nullptr, matrix.ptr(), false); if (matrix != view_projection_matrix) { view_projection_matrix = matrix; @@ -158,7 +158,7 @@ void SceneState::init(Object *camera_ob /*= nullptr*/) } render_finished = sample >= samples_len && samples_len > 1; - /* TODO(Miguel Pozo) volumes_do */ + /* TODO(@pragma37): volumes_do */ draw_cavity = shading.flag & V3D_SHADING_CAVITY && ELEM(shading.cavity_type, V3D_SHADING_CAVITY_SSAO, V3D_SHADING_CAVITY_BOTH); @@ -205,9 +205,8 @@ ObjectState::ObjectState(const SceneState &scene_state, Object *ob) const DRWContextState *draw_ctx = DRW_context_state_get(); const Mesh *me = (ob->type == OB_MESH) ? static_cast(ob->data) : nullptr; const bool is_active = (ob == draw_ctx->obact); - /* TODO(Miguel Pozo) Is the double check needed? - * If it is, wouldn't be needed for sculpt_pbvh too? - */ + /* TODO(@pragma37): Is the double check needed? + * If it is, wouldn't be needed for sculpt_pbvh too? */ const bool is_render = DRW_state_is_image_render() && (draw_ctx->v3d == nullptr); color_type = (eV3DShadingColorType)scene_state.shading.color_type; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index f5c4bf6facc..caa94a3f49d 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2061,7 +2061,7 @@ static int edbm_duplicate_exec(bContext *C, wmOperator *op) BMO_slot_buffer_hflag_enable( bm, bmop.slots_out, "geom.out", BM_ALL_NOLOOP, BM_ELEM_SELECT, true); - /* rebuild editselection */ + /* Rebuild edit-selection. */ BM_SELECT_HISTORY_RESTORE(bm); if (!EDBM_op_finish(em, &bmop, op, true)) { @@ -4348,7 +4348,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) BMO_edge_flag_set(bm, be, ELE_EDGE_CUT, is_cut); } - /* free all allocs */ + /* Free all allocations. */ MEM_freeN(screen_vert_coords); MEM_freeN(mouse_path); @@ -4434,7 +4434,7 @@ static Base *mesh_separate_tagged( &((struct BMeshCreateParams){ .use_toolflags = true, })); - BM_mesh_elem_toolflags_ensure(bm_new); /* needed for 'duplicate' bmo */ + BM_mesh_elem_toolflags_ensure(bm_new); /* Needed for 'duplicate' BMO. */ BM_mesh_copy_init_customdata(bm_new, bm_old, &bm_mesh_allocsize_default); diff --git a/source/blender/editors/object/object_bake.cc b/source/blender/editors/object/object_bake.cc index da16c1eae60..74c11c44619 100644 --- a/source/blender/editors/object/object_bake.cc +++ b/source/blender/editors/object/object_bake.cc @@ -415,7 +415,9 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -/* Multiresbake adopted for job-system executing */ +/** + * Multi-resolution-bake adopted for job-system executing. + */ static void init_multiresbake_job(bContext *C, MultiresBakeJob *bkj) { Scene *scene = CTX_data_scene(C); diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 8d804eeaa8e..a3117f46bb9 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -3234,7 +3234,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op) tree = BLI_kdtree_3d_new(psys->totpart); - /* insert particles into kd tree */ + /* Insert particles into KD-tree. */ LOOP_SELECTED_POINTS { psys_mat_hair_to_object( ob, psmd_eval->mesh_final, psys->part->from, psys->particles + p, mat); diff --git a/source/blender/editors/transform/transform_snap_object.cc b/source/blender/editors/transform/transform_snap_object.cc index 923c1a2ff99..ec41c2dd0dd 100644 --- a/source/blender/editors/transform/transform_snap_object.cc +++ b/source/blender/editors/transform/transform_snap_object.cc @@ -729,7 +729,8 @@ static bool raycastMesh(SnapObjectContext *sctx, * very far away ray_start values (as returned in case of ortho view3d), see T50486, T38358. */ if (len_diff > 400.0f) { - len_diff -= local_scale; /* make temp start point a bit away from bbox hit point. */ + /* Make temporary start point a bit away from bounding-box hit point. */ + len_diff -= local_scale; madd_v3_v3fl(ray_start_local, ray_normal_local, len_diff); local_depth -= len_diff; } diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 189ba7575f5..356fbde0b72 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -1317,8 +1317,8 @@ static int stitch_process_data(StitchStateContainer *ssc, } } - /* take mean position here. - * For edge case, this can't be done inside the loop for shared uvverts */ + /* Take mean position here. + * For edge case, this can't be done inside the loop for shared UV-verts. */ if (ssc->mode == STITCH_EDGE && stitch_midpoints) { for (i = 0; i < state->total_separate_uvs; i++) { final_position[i].uv[0] /= final_position[i].count; diff --git a/source/blender/geometry/intern/mesh_merge_by_distance.cc b/source/blender/geometry/intern/mesh_merge_by_distance.cc index f0ec847d44a..fbd06791bd8 100644 --- a/source/blender/geometry/intern/mesh_merge_by_distance.cc +++ b/source/blender/geometry/intern/mesh_merge_by_distance.cc @@ -1037,7 +1037,7 @@ static void weld_poly_loop_ctx_setup_collapsed_and_split( /* Setup Poly/Loop. */ /* `wpoly.size()` may change during the loop, - * so make it clear that we are only working with the original wpolys. */ + * so make it clear that we are only working with the original `wpoly` items. */ IndexRange wpoly_original_range = r_weld_mesh->wpoly.index_range(); for (const int i : wpoly_original_range) { WeldPoly &wp = wpoly[i]; diff --git a/source/blender/gpu/metal/mtl_shader.mm b/source/blender/gpu/metal/mtl_shader.mm index c1df57f618c..610079a644f 100644 --- a/source/blender/gpu/metal/mtl_shader.mm +++ b/source/blender/gpu/metal/mtl_shader.mm @@ -353,7 +353,7 @@ bool MTLShader::finalize(const shader::ShaderCreateInfo *info) shader_library_compute_.label = [NSString stringWithUTF8String:this->name]; } break; case ShaderStage::ANY: { - /* Supress warnings. */ + /* Suppress warnings. */ BLI_assert_unreachable(); } break; } diff --git a/source/blender/io/usd/intern/usd_asset_utils.cc b/source/blender/io/usd/intern/usd_asset_utils.cc index 550d318cd94..fe550c9d7ad 100644 --- a/source/blender/io/usd/intern/usd_asset_utils.cc +++ b/source/blender/io/usd/intern/usd_asset_utils.cc @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0-or-later - * Copyright 2023 NVIDIA Corportation. All rights reserved. */ + * Copyright 2023 NVIDIA Corporation. All rights reserved. */ #include "usd_asset_utils.h" @@ -29,10 +29,12 @@ static const int UDIM_END_TILE = 1100; namespace blender::io::usd { -/* The following is copied from _SplitUdimPattern() in - * USD library source file materialParamsUtils.cpp. - * Split a udim file path such as /someDir/myFile..exr into a - * prefix (/someDir/myFile.) and suffix (.exr). */ +/** + * The following is copied from `_SplitUdimPattern()` in + * USD library source file `materialParamsUtils.cpp`. + * Split a UDIM file path such as `/someDir/myFile..exr` into a + * prefix `/someDir/myFile.` and suffix `.exr`. + */ static std::pair split_udim_pattern(const std::string &path) { static const std::vector patterns = {UDIM_PATTERN, UDIM_PATTERN2}; diff --git a/source/blender/io/usd/tests/usd_export_test.cc b/source/blender/io/usd/tests/usd_export_test.cc index 36ff45ccf7a..580e65a378b 100644 --- a/source/blender/io/usd/tests/usd_export_test.cc +++ b/source/blender/io/usd/tests/usd_export_test.cc @@ -98,9 +98,9 @@ class UsdExportTest : public BlendfileLoadingBaseTest { return pxr::UsdPrim(); } - /* - * Loop the sockets on the Blender bNode, and fail if any of their values do - * not match the equivalent Attribtue values on the UsdPrim. + /** + * Loop the sockets on the Blender `bNode`, and fail if any of their values do + * not match the equivalent Attribute values on the `UsdPrim`. */ const void compare_blender_node_to_usd_prim(const bNode *bsdf_node, const pxr::UsdPrim &bsdf_prim) diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 6e39ad0d4f7..8f9ae28b441 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -77,7 +77,7 @@ typedef struct bNodeStack { char _pad[4]; } bNodeStack; -/* ns->datatype, shadetree only */ +/** #bNodeStack.datatype (shade-tree only). */ #define NS_OSA_VECTORS 1 #define NS_OSA_VALUES 2 @@ -659,9 +659,9 @@ typedef struct bNodeTree { /** #NodeTree.flag */ #define NTREE_DS_EXPAND (1 << 0) /* for animation editors */ -#define NTREE_COM_OPENCL (1 << 1) /* use opencl */ +#define NTREE_COM_OPENCL (1 << 1) /* Use OPENCL. */ #define NTREE_TWO_PASS (1 << 2) /* two pass */ -#define NTREE_COM_GROUPNODE_BUFFER (1 << 3) /* use groupnode buffers */ +#define NTREE_COM_GROUPNODE_BUFFER (1 << 3) /* Use group-node buffers. */ #define NTREE_VIEWER_BORDER (1 << 4) /* use a border for viewer nodes */ /* NOTE: DEPRECATED, use (id->tag & LIB_TAG_LOCALIZED) instead. */ diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index c85b40a9342..a17d70a10a0 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1596,7 +1596,7 @@ typedef struct ToolSettings { /** Keyframe type (see DNA_curve_types.h). */ char keyframe_type; - /* Multires. */ + /** Multi-resolution meshes. */ char multires_subdiv_type; /** Edge tagging, store operator settings (no UI access). */ diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 3c2fd5af543..49099d921c4 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -262,7 +262,7 @@ typedef struct wmWindow { struct bScreen *screen DNA_DEPRECATED; - /** Winid also in screens, is for retrieving this window after read. */ + /** Window-ID also in screens, is for retrieving this window after read. */ int winid; /** Window coords. */ short posx, posy, sizex, sizey; @@ -512,7 +512,7 @@ enum { /** * This is similar to addon-preferences, - * however unlike add-ons key-config's aren't saved to disk. + * however unlike add-ons key-configurations aren't saved to disk. * * #wmKeyConfigPref is written to DNA, * #wmKeyConfigPrefType_Runtime has the RNA type. diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index 4fb30ca3d9e..4ee39b7d2db 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -8,9 +8,7 @@ * (including relevant operators). */ -/* placed up here because of crappy - * winsock stuff. - */ +/* Placed up here because of crappy WINSOCK stuff. */ #include #include /* for open flags (O_BINARY, O_RDONLY). */ #include @@ -377,7 +375,7 @@ static void wm_window_match_replace_by_file_wm(bContext *C, * to avoid clearing the wrong wm. */ wm_window_clear_drawable(oldwm); - /* only first wm in list has ghostwins */ + /* Only first `wm` in list has GHOST-windows. */ LISTBASE_FOREACH (wmWindow *, win, &wm->windows) { LISTBASE_FOREACH (wmWindow *, oldwin, &oldwm->windows) { if (oldwin->winid == win->winid) { @@ -1443,7 +1441,7 @@ void wm_history_file_read(void) wm_history_files_free(); - /* read list of recent opened files from recent-files.txt to memory */ + /* Read list of recent opened files from #BLENDER_HISTORY_FILE to memory. */ for (l = lines, num = 0; l && (num < U.recent_files); l = l->next) { const char *line = static_cast(l->link); /* don't check if files exist, causes slow startup for remote/external drives */ @@ -1526,7 +1524,7 @@ static void wm_history_file_update(void) } recent = static_cast(G.recent_files.first); - /* refresh recent-files.txt of recent opened files, when current file was changed */ + /* Refresh #BLENDER_HISTORY_FILE of recent opened files, when current file was changed. */ if (!(recent) || (BLI_path_cmp(recent->filepath, blendfile_path) != 0)) { recent = wm_file_history_find(blendfile_path); @@ -1547,7 +1545,7 @@ static void wm_history_file_update(void) /* add current file to the beginning of list */ BLI_addhead(&(G.recent_files), recent); - /* write current file to recent-files.txt */ + /* Write current file to #BLENDER_HISTORY_FILE. */ wm_history_file_write(); /* also update most recent files on System */ @@ -2053,7 +2051,7 @@ void wm_autosave_delete(void) char str[FILE_MAX]; BLI_path_join(str, sizeof(str), BKE_tempdir_base(), BLENDER_QUIT_FILE); - /* if global undo; remove tempsave, otherwise rename */ + /* For global undo; remove temporarily saved file, otherwise rename. */ if (U.uiflag & USER_GLOBALUNDO) { BLI_delete(filepath, false, false); } diff --git a/source/blender/windowmanager/intern/wm_init_exit.cc b/source/blender/windowmanager/intern/wm_init_exit.cc index 7ad481669d9..577f148576a 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.cc +++ b/source/blender/windowmanager/intern/wm_init_exit.cc @@ -599,7 +599,7 @@ void WM_exit_ex(bContext *C, const bool do_python) (void)do_python; #endif - ED_file_exit(); /* for fsmenu */ + ED_file_exit(); /* For file-selector menu data. */ /* Delete GPU resources and context. The UI also uses GPU resources and so * is also deleted with the context active. */ diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index aa82a7d0b3a..0f8940d75be 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1756,7 +1756,7 @@ void wm_test_opengl_deprecation_warning(bContext *C) return; } - /* Have we already shown a message during this Blender session. bgl calls are done in a draw + /* Have we already shown a message during this Blender session. `bgl` calls are done in a draw * handler that will run many times. */ if (message_shown) { return;