From d377ef2543a9988ecaa2c0d6dfccf671fd7a5800 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 2 Jan 2024 18:12:54 +0100 Subject: [PATCH] Clang Format: bump to version 17 Along with the 4.1 libraries upgrade, we are bumping the clang-format version from 8-12 to 17. This affects quite a few files. If not already the case, you may consider pointing your IDE to the clang-format binary bundled with the Blender precompiled libraries. --- intern/cycles/blender/mesh.cpp | 9 +- intern/cycles/blender/python.cpp | 3 +- intern/cycles/blender/sync.cpp | 6 +- intern/cycles/bvh/binning.cpp | 2 +- intern/cycles/device/metal/bvh.mm | 2 +- intern/cycles/device/metal/kernel.mm | 6 +- intern/cycles/device/metal/queue.mm | 3 +- intern/cycles/hydra/curves.cpp | 6 +- intern/cycles/hydra/curves.h | 7 +- intern/cycles/hydra/mesh.cpp | 6 +- intern/cycles/hydra/mesh.h | 7 +- intern/cycles/hydra/pointcloud.cpp | 6 +- intern/cycles/hydra/pointcloud.h | 7 +- intern/cycles/hydra/volume.h | 7 +- intern/cycles/integrator/denoiser_oidn.cpp | 3 +- intern/cycles/integrator/pass_accessor.cpp | 6 +- .../cycles/integrator/path_trace_display.cpp | 3 +- .../cycles/integrator/path_trace_work_cpu.cpp | 6 +- .../cycles/integrator/path_trace_work_gpu.cpp | 3 +- intern/cycles/integrator/render_scheduler.cpp | 3 +- intern/cycles/kernel/bvh/local.h | 13 +- intern/cycles/kernel/bvh/shadow_all.h | 15 +- intern/cycles/kernel/bvh/volume.h | 9 +- intern/cycles/kernel/bvh/volume_all.h | 11 +- .../closure/bsdf_principled_hair_huang.h | 3 +- intern/cycles/kernel/device/cpu/bvh.h | 3 +- intern/cycles/kernel/device/oneapi/kernel.cpp | 15 +- intern/cycles/kernel/geom/subd_triangle.h | 592 +++++++++--------- intern/cycles/kernel/integrator/guiding.h | 6 +- .../integrator/intersect_volume_stack.h | 3 +- .../kernel/integrator/shade_background.h | 3 +- .../cycles/kernel/integrator/shade_surface.h | 3 +- .../cycles/kernel/integrator/shade_volume.h | 3 +- .../cycles/kernel/integrator/surface_shader.h | 3 +- intern/cycles/kernel/light/background.h | 3 +- intern/cycles/kernel/osl/services.cpp | 3 +- intern/cycles/kernel/osl/types.h | 6 +- intern/cycles/kernel/sample/pattern.h | 2 +- intern/cycles/kernel/types.h | 7 +- intern/cycles/kernel/util/nanovdb.h | 6 +- intern/cycles/kernel/util/profiling.h | 2 +- intern/cycles/scene/alembic.h | 6 +- intern/cycles/scene/geometry_attributes.cpp | 3 +- intern/cycles/scene/image.cpp | 6 +- intern/cycles/scene/pass.cpp | 3 +- intern/cycles/session/denoising.cpp | 3 +- intern/cycles/session/merge.cpp | 6 +- intern/cycles/util/path.cpp | 2 +- intern/ghost/GHOST_Types.h | 4 +- intern/ghost/intern/GHOST_Context.hh | 2 +- intern/ghost/intern/GHOST_ContextEGL.cc | 5 +- intern/ghost/intern/GHOST_ContextWGL.hh | 2 +- intern/ghost/intern/GHOST_SystemCocoa.hh | 2 +- intern/ghost/intern/GHOST_SystemCocoa.mm | 6 +- intern/ghost/intern/GHOST_SystemWayland.cc | 6 +- intern/ghost/intern/GHOST_SystemWin32.cc | 6 +- intern/ghost/intern/GHOST_SystemX11.cc | 6 +- intern/ghost/intern/GHOST_WindowWayland.cc | 3 +- intern/ghost/intern/GHOST_WindowWin32.cc | 3 +- intern/ghost/intern/GHOST_WindowX11.cc | 2 +- intern/ghost/intern/GHOST_XrContext.cc | 3 +- .../intern/mallocn_guarded_impl.c | 4 +- intern/iksolver/intern/IK_QJacobianSolver.cpp | 2 +- intern/libmv/intern/stub.cc | 4 +- intern/libmv/libmv/simple_pipeline/detect.cc | 2 +- .../shaders/glsl_compute_kernel.glsl | 4 +- .../topology/mesh_topology_compare.cc | 3 +- .../internal/topology/topology_refiner_impl.h | 3 +- intern/rigidbody/RBI_hull_api.h | 2 +- .../blender/asset_system/AS_asset_catalog.hh | 3 +- .../asset_system/intern/asset_catalog.cc | 3 +- .../intern/asset_library_service.cc | 5 +- .../tests/asset_catalog_tree_test.cc | 3 +- source/blender/blenfont/intern/blf_glyph.cc | 9 +- source/blender/blenkernel/BKE_cloth.hh | 12 +- source/blender/blenkernel/BKE_context.hh | 3 +- source/blender/blenkernel/BKE_idprop.h | 20 +- source/blender/blenkernel/BKE_main.hh | 2 +- source/blender/blenkernel/BKE_mesh_types.hh | 6 +- source/blender/blenkernel/BKE_subsurf.hh | 6 +- source/blender/blenkernel/BKE_volume_grid.hh | 3 +- .../blender/blenkernel/intern/DerivedMesh.cc | 8 +- source/blender/blenkernel/intern/action.cc | 3 +- source/blender/blenkernel/intern/anim_sys.cc | 3 +- source/blender/blenkernel/intern/appdir.cc | 15 +- .../blenkernel/intern/armature_update.cc | 3 +- source/blender/blenkernel/intern/attribute.cc | 3 +- .../blenkernel/intern/bake_items_serialize.cc | 3 +- .../blenkernel/intern/bake_items_socket.cc | 3 +- .../blenkernel/intern/blender_user_menu.cc | 3 +- .../intern/blendfile_link_append.cc | 9 +- source/blender/blenkernel/intern/bpath.cc | 6 +- .../blender/blenkernel/intern/collection.cc | 3 +- .../blender/blenkernel/intern/constraint.cc | 3 +- source/blender/blenkernel/intern/curve.cc | 6 +- .../blenkernel/intern/curves_geometry.cc | 3 +- .../blender/blenkernel/intern/customdata.cc | 9 +- .../blender/blenkernel/intern/dynamicpaint.cc | 11 +- source/blender/blenkernel/intern/effect.cc | 6 +- source/blender/blenkernel/intern/fluid.cc | 18 +- source/blender/blenkernel/intern/fmodifier.cc | 9 +- .../intern/geometry_component_curves.cc | 3 +- .../blenkernel/intern/geometry_fields.cc | 12 +- .../blenkernel/intern/gpencil_curve_legacy.cc | 3 +- .../blenkernel/intern/gpencil_legacy.cc | 12 +- .../intern/gpencil_modifier_legacy.cc | 3 +- source/blender/blenkernel/intern/image.cc | 6 +- source/blender/blenkernel/intern/image_gen.cc | 3 +- .../blender/blenkernel/intern/image_save.cc | 3 +- source/blender/blenkernel/intern/ipo.cc | 6 +- source/blender/blenkernel/intern/lattice.cc | 3 +- source/blender/blenkernel/intern/layer.cc | 3 +- source/blender/blenkernel/intern/lib_id.cc | 5 +- .../blenkernel/intern/lib_id_delete.cc | 6 +- .../blender/blenkernel/intern/lib_override.cc | 30 +- source/blender/blenkernel/intern/lib_query.cc | 3 +- source/blender/blenkernel/intern/main.cc | 6 +- .../blender/blenkernel/intern/main_namemap.cc | 2 +- .../blenkernel/intern/mask_rasterize.cc | 6 +- source/blender/blenkernel/intern/material.cc | 3 +- .../blenkernel/intern/mball_tessellate.cc | 2 +- .../blender/blenkernel/intern/mesh_compare.cc | 6 +- .../blender/blenkernel/intern/mesh_mapping.cc | 6 +- .../blender/blenkernel/intern/mesh_mirror.cc | 9 +- .../blender/blenkernel/intern/mesh_normals.cc | 3 +- .../blender/blenkernel/intern/mesh_remap.cc | 9 +- source/blender/blenkernel/intern/modifier.cc | 3 +- source/blender/blenkernel/intern/node.cc | 9 +- .../intern/node_tree_anonymous_attributes.cc | 6 +- .../intern/node_tree_field_inferencing.cc | 9 +- .../blenkernel/intern/node_tree_zones.cc | 3 +- source/blender/blenkernel/intern/object.cc | 18 +- .../blender/blenkernel/intern/object_dupli.cc | 6 +- .../blender/blenkernel/intern/packedFile.cc | 3 +- source/blender/blenkernel/intern/paint.cc | 6 +- source/blender/blenkernel/intern/particle.cc | 9 +- .../blenkernel/intern/particle_system.cc | 3 +- source/blender/blenkernel/intern/pbvh.cc | 15 +- .../blender/blenkernel/intern/pbvh_bmesh.cc | 8 +- .../blender/blenkernel/intern/pbvh_pixels.cc | 8 +- .../blenkernel/intern/pbvh_pixels_copy.cc | 3 +- .../blenkernel/intern/pbvh_uv_islands.cc | 3 +- .../blender/blenkernel/intern/pointcache.cc | 11 +- source/blender/blenkernel/intern/rigidbody.cc | 6 +- .../blender/blenkernel/intern/shrinkwrap.cc | 8 +- .../blenkernel/intern/subdiv_foreach.cc | 6 +- .../blender/blenkernel/intern/subdiv_mesh.cc | 3 +- source/blender/blenkernel/intern/tracking.cc | 2 +- source/blender/blenkernel/intern/vfont.cc | 9 +- source/blender/blenkernel/intern/volume.cc | 3 +- .../blender/blenkernel/intern/writeffmpeg.cc | 3 +- source/blender/blenlib/BLI_assert.h | 6 +- source/blender/blenlib/BLI_bitmap.h | 12 +- .../blender/blenlib/BLI_compiler_typecheck.h | 4 +- source/blender/blenlib/BLI_dot_export.hh | 6 +- .../blenlib/BLI_generic_virtual_array.hh | 2 +- source/blender/blenlib/BLI_hash.hh | 6 +- source/blender/blenlib/BLI_hash_tables.hh | 9 +- source/blender/blenlib/BLI_map_slots.hh | 4 +- source/blender/blenlib/BLI_math_color.h | 2 +- source/blender/blenlib/BLI_memory_utils.hh | 15 +- .../blenlib/BLI_parameter_pack_utils.hh | 4 +- source/blender/blenlib/BLI_utildefines.h | 6 +- source/blender/blenlib/BLI_utildefines_iter.h | 7 +- source/blender/blenlib/BLI_virtual_array.hh | 11 +- source/blender/blenlib/BLI_winstuff.h | 6 +- source/blender/blenlib/intern/BLI_ghash.c | 4 +- source/blender/blenlib/intern/BLI_kdopbvh.c | 9 +- source/blender/blenlib/intern/array_store.c | 3 +- source/blender/blenlib/intern/array_utils.c | 3 +- .../blender/blenlib/intern/expr_pylike_eval.c | 6 +- source/blender/blenlib/intern/fileops_c.cc | 8 +- .../blenlib/intern/generic_virtual_array.cc | 2 +- source/blender/blenlib/intern/hash_md5.c | 2 +- source/blender/blenlib/intern/hash_mm2a.c | 2 +- source/blender/blenlib/intern/index_mask.cc | 3 +- .../blender/blenlib/intern/math_base_inline.c | 11 +- source/blender/blenlib/intern/mesh_boolean.cc | 3 +- source/blender/blenlib/intern/noise.c | 4 +- source/blender/blenlib/intern/scanfill.c | 6 +- .../blenlib/intern/string_cursor_utf8.c | 12 +- .../blender/blenlib/intern/string_search.cc | 3 +- .../blenlib/tests/BLI_array_store_test.cc | 3 +- .../performance/BLI_ghash_performance_test.cc | 4 +- source/blender/blenloader/intern/readfile.cc | 3 +- .../blenloader/intern/versioning_250.cc | 3 +- .../blenloader/intern/versioning_260.cc | 6 +- .../blenloader/intern/versioning_270.cc | 15 +- .../blenloader/intern/versioning_280.cc | 42 +- .../blenloader/intern/versioning_290.cc | 9 +- .../blenloader/intern/versioning_300.cc | 9 +- .../blenloader/intern/versioning_400.cc | 15 +- .../blenloader/intern/versioning_defaults.cc | 6 +- .../blenloader/intern/versioning_legacy.cc | 72 ++- .../blenloader/tests/blendfile_load_test.cc | 3 +- .../blender/blentranslation/BLT_translation.h | 2 +- source/blender/bmesh/bmesh_class.hh | 39 +- source/blender/bmesh/intern/bmesh_core.cc | 3 +- source/blender/bmesh/intern/bmesh_edgeloop.cc | 3 +- source/blender/bmesh/intern/bmesh_mesh.cc | 9 +- .../bmesh/intern/bmesh_mesh_convert.cc | 3 +- .../bmesh/intern/bmesh_mesh_normals.cc | 6 +- .../blender/bmesh/intern/bmesh_operators.cc | 3 +- source/blender/bmesh/intern/bmesh_polygon.cc | 3 +- .../bmesh/intern/bmesh_polygon_edgenet.cc | 9 +- source/blender/bmesh/intern/bmesh_query.cc | 6 +- .../bmesh/intern/bmesh_walkers_impl.cc | 6 +- .../bmesh/operators/bmo_connect_pair.cc | 6 +- .../blender/bmesh/operators/bmo_dissolve.cc | 9 +- source/blender/bmesh/operators/bmo_dupe.cc | 6 +- .../blender/bmesh/operators/bmo_fill_grid.cc | 3 +- source/blender/bmesh/operators/bmo_hull.cc | 3 +- source/blender/bmesh/operators/bmo_inset.cc | 3 +- .../bmesh/operators/bmo_offset_edgeloops.cc | 3 +- .../bmesh/operators/bmo_removedoubles.cc | 2 +- .../bmesh/operators/bmo_subdivide_edgering.cc | 3 +- source/blender/bmesh/tools/bmesh_bevel.cc | 8 +- .../bmesh/tools/bmesh_decimate_collapse.cc | 4 +- .../bmesh/tools/bmesh_decimate_dissolve.cc | 3 +- source/blender/bmesh/tools/bmesh_edgenet.cc | 3 +- source/blender/bmesh/tools/bmesh_intersect.cc | 6 +- .../bmesh/tools/bmesh_intersect_edges.cc | 13 +- .../blender/bmesh/tools/bmesh_region_match.cc | 9 +- .../intern/COM_FullFrameExecutionModel.cc | 3 +- .../blender/compositor/intern/COM_MetaData.cc | 3 +- .../compositor/intern/COM_NodeGraph.cc | 3 +- .../intern/COM_NodeOperationBuilder.cc | 3 +- .../intern/COM_TiledExecutionModel.cc | 3 +- .../blender/compositor/nodes/COM_ImageNode.cc | 3 +- .../compositor/nodes/COM_RenderLayersNode.cc | 3 +- .../operations/COM_DoubleEdgeMaskOperation.cc | 3 +- .../operations/COM_PreviewOperation.cc | 3 +- .../operations/COM_SMAAOperation.cc | 4 +- .../COM_VariableSizeBokehBlurOperation.h | 2 +- .../operations/COM_VectorBlurOperation.cc | 3 +- .../realtime_compositor/intern/scheduler.cc | 3 +- ...OM_ComputeSummedAreaTableOperation_test.cc | 3 +- .../intern/builder/deg_builder_cache.cc | 6 +- .../deg_builder_relations_view_layer.cc | 3 +- .../debug/deg_debug_relations_graphviz.cc | 6 +- .../depsgraph/intern/depsgraph_query.cc | 3 +- .../draw/engines/eevee/eevee_lightcache.cc | 3 +- .../draw/engines/eevee/eevee_materials.cc | 3 +- .../draw/engines/eevee/eevee_renderpasses.cc | 9 +- .../draw/engines/eevee/eevee_shadows.cc | 3 +- .../engines/eevee_next/eevee_cryptomatte.cc | 3 +- .../engines/eevee_next/eevee_lightprobe.hh | 3 +- .../draw/engines/eevee_next/eevee_shader.cc | 3 +- .../draw/engines/eevee_next/eevee_sync.cc | 3 +- .../draw/engines/eevee_next/eevee_sync.hh | 6 +- .../eevee_next/shaders/eevee_film_lib.glsl | 3 +- .../draw/engines/gpencil/gpencil_draw_data.cc | 3 +- .../draw/engines/gpencil/gpencil_material.hh | 6 +- .../draw/engines/image/image_drawing_mode.hh | 3 +- .../draw/engines/overlay/overlay_armature.cc | 3 +- .../draw/engines/overlay/overlay_edit_uv.cc | 8 +- .../draw/engines/overlay/overlay_grid.cc | 3 +- .../overlay/overlay_next_background.hh | 3 +- .../draw/engines/overlay/overlay_paint.cc | 3 +- source/blender/draw/intern/DRW_gpu_wrapper.hh | 3 +- .../draw_cache_extract_mesh_render_data.cc | 3 +- .../draw/intern/draw_cache_impl_lattice.cc | 2 +- .../draw/intern/draw_cache_impl_particles.cc | 12 +- source/blender/draw/intern/draw_debug.cc | 2 +- .../blender/draw/intern/draw_manager_data.cc | 7 +- .../blender/draw/intern/draw_manager_exec.cc | 3 +- source/blender/draw/intern/draw_pbvh.cc | 3 +- source/blender/draw/intern/draw_sculpt.cc | 3 +- .../extract_mesh_vbo_pos_nor.cc | 6 +- .../mesh_extractors/extract_mesh_vbo_tan.cc | 3 +- .../common_subdiv_patch_evaluation_comp.glsl | 2 +- .../editors/animation/anim_channels_edit.cc | 3 +- .../blender/editors/animation/anim_filter.cc | 6 +- .../blender/editors/animation/anim_markers.cc | 3 +- .../editors/animation/keyframes_draw.cc | 3 +- .../blender/editors/armature/armature_add.cc | 3 +- .../blender/editors/armature/armature_edit.cc | 3 +- .../editors/armature/armature_naming.cc | 3 +- .../editors/armature/armature_relations.cc | 6 +- .../editors/armature/armature_select.cc | 12 +- .../editors/armature/armature_skinning.cc | 6 +- .../editors/armature/armature_utils.cc | 3 +- .../blender/editors/armature/meshlaplacian.h | 2 +- .../blender/editors/armature/pose_select.cc | 6 +- .../editors/armature/pose_transform.cc | 9 +- source/blender/editors/curve/editcurve.cc | 6 +- .../blender/editors/curve/editcurve_select.cc | 23 +- .../editors/curves/intern/curves_selection.cc | 12 +- .../editors/geometry/node_group_operator.cc | 6 +- .../gizmo_library/gizmo_types/dial3d_gizmo.cc | 3 +- .../editors/gpencil_legacy/annotate_draw.cc | 6 +- .../gpencil_legacy/gpencil_armature.cc | 6 +- .../editors/gpencil_legacy/gpencil_convert.cc | 3 +- .../editors/gpencil_legacy/gpencil_edit.cc | 12 +- .../editors/gpencil_legacy/gpencil_fill.cc | 6 +- .../editors/gpencil_legacy/gpencil_paint.cc | 6 +- .../editors/gpencil_legacy/gpencil_select.cc | 3 +- .../editors/gpencil_legacy/gpencil_utils.cc | 6 +- .../gpencil_legacy/gpencil_vertex_ops.cc | 12 +- .../gpencil_legacy/gpencil_weight_paint.cc | 9 +- .../intern/grease_pencil_edit.cc | 3 +- .../intern/grease_pencil_frames.cc | 3 +- .../ED_transform_snap_object_context.hh | 2 +- source/blender/editors/interface/interface.cc | 3 +- .../interface/interface_context_menu.cc | 3 +- .../editors/interface/interface_handlers.cc | 45 +- .../editors/interface/interface_icons.cc | 3 +- .../editors/interface/interface_layout.cc | 20 +- .../editors/interface/interface_panel.cc | 9 +- .../interface/interface_region_popup.cc | 3 +- .../interface/interface_region_search.cc | 3 +- .../interface/interface_template_list.cc | 6 +- .../editors/interface/interface_templates.cc | 9 +- .../editors/interface/interface_widgets.cc | 9 +- source/blender/editors/interface/view2d.cc | 6 +- .../blender/editors/interface/view2d_ops.cc | 9 +- source/blender/editors/mask/mask_add.cc | 3 +- source/blender/editors/mesh/editface.cc | 3 +- .../editors/mesh/editmesh_automerge.cc | 2 +- .../blender/editors/mesh/editmesh_bisect.cc | 2 +- .../editors/mesh/editmesh_intersect.cc | 3 +- source/blender/editors/mesh/editmesh_knife.cc | 6 +- .../editors/mesh/editmesh_select_similar.cc | 21 +- source/blender/editors/mesh/editmesh_tools.cc | 36 +- source/blender/editors/mesh/editmesh_utils.cc | 3 +- source/blender/editors/metaball/mball_edit.cc | 3 +- .../blender/editors/object/object_bake_api.cc | 6 +- .../editors/object/object_constraint.cc | 6 +- source/blender/editors/object/object_edit.cc | 3 +- .../blender/editors/object/object_modifier.cc | 6 +- .../editors/object/object_relations.cc | 18 +- .../blender/editors/object/object_select.cc | 3 +- .../blender/editors/physics/particle_edit.cc | 3 +- .../editors/physics/particle_object.cc | 3 +- .../blender/editors/render/render_opengl.cc | 3 +- .../blender/editors/render/render_preview.cc | 6 +- .../blender/editors/render/render_update.cc | 6 +- source/blender/editors/screen/area.cc | 3 +- source/blender/editors/screen/glutil.cc | 3 +- source/blender/editors/screen/screen_edit.cc | 6 +- source/blender/editors/screen/screen_ops.cc | 2 +- .../editors/screen/screen_user_menu.cc | 3 +- .../editors/sculpt_paint/paint_hide.cc | 6 +- .../editors/sculpt_paint/paint_image.cc | 3 +- .../editors/sculpt_paint/paint_image_proj.cc | 31 +- .../blender/editors/sculpt_paint/paint_ops.cc | 3 +- .../editors/sculpt_paint/paint_stroke.cc | 5 +- .../sculpt_paint/paint_vertex_weight_ops.cc | 6 +- .../editors/sculpt_paint/paint_weight.cc | 6 +- source/blender/editors/sculpt_paint/sculpt.cc | 9 +- .../editors/sculpt_paint/sculpt_boundary.cc | 3 +- .../editors/sculpt_paint/sculpt_geodesic.cc | 6 +- .../editors/sculpt_paint/sculpt_intern.hh | 3 +- .../sculpt_paint/sculpt_paint_image.cc | 2 +- .../editors/sculpt_paint/sculpt_undo.cc | 5 +- .../editors/space_action/action_draw.cc | 9 +- .../editors/space_action/action_select.cc | 6 +- .../editors/space_clip/clip_dopesheet_draw.cc | 15 +- .../blender/editors/space_file/file_draw.cc | 3 +- source/blender/editors/space_file/filelist.cc | 6 +- .../editors/space_file/fsmenu_system.cc | 6 +- .../blender/editors/space_graph/graph_draw.cc | 15 +- .../blender/editors/space_graph/graph_edit.cc | 3 +- .../editors/space_graph/graph_select.cc | 3 +- .../editors/space_graph/graph_slider_ops.cc | 3 +- .../editors/space_image/space_image.cc | 3 +- source/blender/editors/space_nla/nla_draw.cc | 9 +- source/blender/editors/space_nla/nla_edit.cc | 3 +- .../blender/editors/space_nla/nla_select.cc | 3 +- .../blender/editors/space_node/node_draw.cc | 3 +- .../blender/editors/space_node/node_group.cc | 6 +- .../editors/space_node/node_templates.cc | 6 +- .../space_outliner/outliner_dragdrop.cc | 12 +- .../editors/space_outliner/outliner_draw.cc | 6 +- .../editors/space_outliner/outliner_select.cc | 6 +- .../editors/space_outliner/outliner_tools.cc | 3 +- .../editors/space_outliner/outliner_utils.cc | 3 +- .../editors/space_sequencer/sequencer_add.cc | 6 +- .../editors/space_sequencer/sequencer_edit.cc | 12 +- .../space_sequencer/sequencer_select.cc | 6 +- .../sequencer_timeline_draw.cc | 6 +- .../blender/editors/space_text/text_draw.cc | 9 +- source/blender/editors/space_text/text_ops.cc | 3 +- .../editors/space_view3d/view3d_buttons.cc | 3 +- .../editors/space_view3d/view3d_context.cc | 3 +- .../editors/space_view3d/view3d_draw.cc | 3 +- .../editors/space_view3d/view3d_edit.cc | 3 +- .../view3d_gizmo_preselect_type.cc | 3 +- .../space_view3d/view3d_gizmo_ruler.cc | 6 +- .../editors/space_view3d/view3d_iterators.cc | 3 +- .../space_view3d/view3d_navigate_fly.cc | 14 +- .../space_view3d/view3d_navigate_walk.cc | 11 +- .../editors/space_view3d/view3d_select.cc | 12 +- .../editors/space_view3d/view3d_utils.cc | 3 +- source/blender/editors/transform/transform.cc | 3 +- .../editors/transform/transform_convert.cc | 6 +- .../transform/transform_convert_action.cc | 3 +- .../transform/transform_convert_armature.cc | 3 +- .../transform/transform_convert_curve.cc | 3 +- .../transform_convert_gpencil_legacy.cc | 6 +- .../transform/transform_convert_node.cc | 3 +- .../transform/transform_convert_object.cc | 3 +- .../transform/transform_mode_translate.cc | 3 +- .../editors/transform/transform_ops.cc | 3 +- .../transform/transform_orientations.cc | 3 +- .../editors/transform/transform_snap.cc | 21 +- .../transform/transform_snap_object.cc | 3 +- .../transform/transform_snap_object_mesh.cc | 3 +- source/blender/editors/undo/ed_undo.cc | 3 +- .../uvedit/uvedit_clipboard_graph_iso.cc | 3 +- source/blender/editors/uvedit/uvedit_rip.cc | 3 +- .../blender/editors/uvedit/uvedit_select.cc | 15 +- .../editors/uvedit/uvedit_smart_stitch.cc | 6 +- .../editors/uvedit/uvedit_unwrap_ops.cc | 3 +- .../blender_interface/BlenderFileLoader.cpp | 3 +- .../freestyle/intern/geometry/Grid.cpp | 16 +- .../freestyle/intern/geometry/Noise.cpp | 9 +- .../freestyle/intern/geometry/VecMat.h | 3 +- .../freestyle/intern/image/ImagePyramid.cpp | 6 +- .../intern/python/BPy_FrsMaterial.cpp | 3 +- .../freestyle/intern/python/BPy_Operators.cpp | 6 +- .../intern/python/Interface1D/BPy_Stroke.cpp | 3 +- .../BPy_UnaryFunction1DDouble.cpp | 3 +- .../BPy_UnaryFunction1DEdgeNature.cpp | 3 +- .../BPy_UnaryFunction1DFloat.cpp | 3 +- .../BPy_UnaryFunction1DUnsigned.cpp | 3 +- .../BPy_UnaryFunction1DVec2f.cpp | 3 +- .../BPy_UnaryFunction1DVec3f.cpp | 3 +- .../BPy_UnaryFunction1DVectorViewShape.cpp | 3 +- .../BPy_UnaryFunction1DVoid.cpp | 3 +- .../BPy_CurveNatureF1D.cpp | 3 +- .../UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp | 3 +- .../BPy_Orientation2DF1D.cpp | 3 +- .../BPy_Orientation3DF1D.cpp | 3 +- .../BPy_Curvature2DAngleF1D.cpp | 3 +- .../BPy_GetProjectedXF1D.cpp | 3 +- .../BPy_GetProjectedYF1D.cpp | 3 +- .../BPy_GetProjectedZF1D.cpp | 3 +- .../UnaryFunction1D_double/BPy_GetXF1D.cpp | 3 +- .../UnaryFunction1D_double/BPy_GetYF1D.cpp | 3 +- .../UnaryFunction1D_double/BPy_GetZF1D.cpp | 3 +- .../BPy_ZDiscontinuityF1D.cpp | 3 +- .../BPy_QuantitativeInvisibilityF1D.cpp | 3 +- .../BPy_WithinImageBoundaryUP1D.cpp | 3 +- .../intern/scene_graph/NodeDrawingStyle.cpp | 3 +- .../intern/scene_graph/NodeGroup.cpp | 3 +- .../intern/scene_graph/NodeTransform.cpp | 3 +- .../intern/stroke/AdvancedStrokeShaders.cpp | 3 +- .../freestyle/intern/stroke/Canvas.cpp | 6 +- .../blender/freestyle/intern/stroke/Curve.cpp | 3 +- .../blender/freestyle/intern/stroke/Curve.h | 2 +- .../freestyle/intern/stroke/Operators.cpp | 3 +- .../freestyle/intern/stroke/Predicates1D.h | 6 +- .../freestyle/intern/stroke/Stroke.cpp | 3 +- .../freestyle/intern/view_map/BoxGrid.h | 4 +- .../intern/view_map/FEdgeXDetector.cpp | 3 +- .../freestyle/intern/view_map/Functions0D.cpp | 3 +- .../HeuristicGridDensityProviderFactory.h | 4 +- .../freestyle/intern/view_map/SphericalGrid.h | 4 +- .../intern/view_map/SteerableViewMap.cpp | 2 +- .../intern/view_map/ViewEdgeXBuilder.cpp | 3 +- .../freestyle/intern/view_map/ViewMap.cpp | 3 +- .../freestyle/intern/view_map/ViewMap.h | 3 +- .../intern/view_map/ViewMapBuilder.cpp | 12 +- .../freestyle/intern/winged_edge/WEdge.h | 3 +- .../intern/winged_edge/WingedEdgeBuilder.h | 3 +- source/blender/functions/FN_field.hh | 3 +- .../functions/FN_multi_function_builder.hh | 3 +- .../functions/FN_multi_function_context.hh | 3 +- .../functions/FN_multi_function_procedure.hh | 3 +- .../geometry/intern/add_curves_on_mesh.cc | 3 +- .../geometry/intern/mesh_merge_by_distance.cc | 6 +- .../geometry/intern/uv_parametrizer.cc | 8 +- .../intern/MOD_gpencil_legacy_build.cc | 3 +- .../intern/MOD_gpencil_legacy_color.cc | 6 +- .../intern/MOD_gpencil_legacy_shrinkwrap.cc | 3 +- .../intern/MOD_gpencil_legacy_tint.cc | 6 +- .../intern/lineart/lineart_chain.cc | 12 +- .../intern/lineart/lineart_cpu.cc | 24 +- .../intern/lineart/lineart_shadow.cc | 3 +- source/blender/gpu/GPU_common.h | 2 +- source/blender/gpu/GPU_matrix.h | 26 +- source/blender/gpu/dummy/dummy_framebuffer.hh | 2 +- source/blender/gpu/intern/gpu_codegen.cc | 3 +- .../blender/gpu/intern/gpu_immediate_util.cc | 2 +- source/blender/gpu/intern/gpu_shader_log.cc | 3 +- .../kernels/depth_2d_update_int24_frag.glsl | 2 +- source/blender/gpu/metal/mtl_backend.mm | 2 +- .../blender/gpu/metal/mtl_command_buffer.mm | 5 +- source/blender/gpu/metal/mtl_context.mm | 3 +- source/blender/gpu/metal/mtl_immediate.mm | 3 +- source/blender/gpu/metal/mtl_memory.mm | 25 +- source/blender/gpu/metal/mtl_shader.mm | 15 +- source/blender/gpu/metal/mtl_texture.mm | 3 +- source/blender/gpu/metal/mtl_texture_util.mm | 6 +- source/blender/gpu/opengl/gl_backend.cc | 3 +- source/blender/gpu/opengl/gl_texture.cc | 6 +- .../gpu/shaders/gpu_shader_text_frag.glsl | 2 +- .../blender/gpu/vulkan/vk_data_conversion.cc | 3 +- source/blender/gpu/vulkan/vk_shader.cc | 6 +- .../ikplugin/intern/iksolver_plugin.cc | 3 +- .../blender/ikplugin/intern/itasc_plugin.cc | 3 +- .../blender/imbuf/intern/colormanagement.cc | 3 +- source/blender/imbuf/intern/imbuf.h | 2 +- source/blender/imbuf/intern/iris.cc | 4 +- .../imbuf/intern/openexr/openexr_stub.cpp | 18 +- source/blender/io/alembic/intern/abc_util.cc | 2 +- source/blender/io/avi/intern/avi.cc | 7 +- source/blender/io/avi/intern/avi_rgb.cc | 3 +- source/blender/io/collada/AnimationImporter.h | 2 +- .../blender/io/collada/ArmatureImporter.cpp | 6 +- .../blender/io/collada/ControllerExporter.h | 2 +- source/blender/io/collada/ErrorHandler.cpp | 3 +- source/blender/io/collada/MeshImporter.cpp | 6 +- .../intern/hierarchy_context_order_test.cc | 3 +- .../common/intern/object_identifier_test.cc | 6 +- .../io/gpencil/intern/gpencil_io_base.cc | 3 +- .../io/gpencil/intern/gpencil_io_capi.cc | 3 +- source/blender/io/ply/importer/ply_import.cc | 3 +- .../io/usd/intern/usd_hierarchy_iterator.cc | 3 +- .../blender/io/usd/intern/usd_reader_light.cc | 3 +- .../io/usd/intern/usd_reader_material.cc | 6 +- .../blender/io/usd/intern/usd_reader_stage.cc | 3 +- .../blender/io/usd/intern/usd_writer_mesh.cc | 3 +- .../blender/io/usd/tests/usd_imaging_test.cc | 3 +- .../io/usd/tests/usd_stage_creation_test.cc | 3 +- source/blender/makesdna/DNA_boid_types.h | 12 +- source/blender/makesdna/DNA_defs.h | 3 +- .../makesdna/DNA_windowmanager_types.h | 8 +- source/blender/makesdna/intern/dna_defaults.c | 2 +- source/blender/makesdna/intern/makesdna.cc | 3 +- source/blender/makesrna/RNA_types.hh | 2 +- source/blender/makesrna/intern/makesrna.cc | 9 +- .../intern/rna_access_compare_override.cc | 11 +- .../blender/makesrna/intern/rna_animation.cc | 3 +- .../blender/makesrna/intern/rna_attribute.cc | 3 +- source/blender/makesrna/intern/rna_curve.cc | 3 +- source/blender/makesrna/intern/rna_fluid.cc | 3 +- source/blender/makesrna/intern/rna_internal.h | 39 +- source/blender/makesrna/intern/rna_key.cc | 3 +- source/blender/makesrna/intern/rna_lattice.cc | 3 +- source/blender/makesrna/intern/rna_mask.cc | 3 +- .../blender/makesrna/intern/rna_mesh_utils.hh | 3 +- .../makesrna/intern/rna_node_socket.cc | 2 +- .../intern/rna_node_tree_interface.cc | 5 +- source/blender/makesrna/intern/rna_rna.cc | 12 +- source/blender/makesrna/intern/rna_space.cc | 3 +- source/blender/makesrna/intern/rna_userdef.cc | 6 +- source/blender/modifiers/intern/MOD_array.cc | 3 +- .../modifiers/intern/MOD_correctivesmooth.cc | 3 +- .../modifiers/intern/MOD_laplaciansmooth.cc | 3 +- source/blender/modifiers/intern/MOD_mask.cc | 3 +- source/blender/modifiers/intern/MOD_nodes.cc | 3 +- .../intern/MOD_solidify_nonmanifold.cc | 24 +- .../modifiers/intern/MOD_volume_displace.cc | 3 +- .../modifiers/intern/MOD_volume_to_mesh.cc | 3 +- .../modifiers/intern/MOD_weighted_normal.cc | 3 +- .../modifiers/intern/MOD_weightvgproximity.cc | 5 +- .../nodes/NOD_geometry_nodes_lazy_function.hh | 6 +- .../blender/nodes/NOD_socket_declarations.hh | 6 +- .../nodes/node_composite_cryptomatte.cc | 3 +- .../nodes/node_composite_displace.cc | 3 +- .../composite/nodes/node_composite_image.cc | 3 +- .../composite/nodes/node_composite_math.cc | 3 +- .../composite/nodes/node_composite_mixrgb.cc | 3 +- .../nodes/node_geo_attribute_domain_size.cc | 3 +- .../nodes/geometry/nodes/node_geo_bake.cc | 3 +- .../node_geo_curve_endpoint_selection.cc | 3 +- .../nodes/node_geo_instance_on_points.cc | 3 +- .../nodes/node_geo_interpolate_curves.cc | 3 +- .../node_geo_mesh_face_group_boundaries.cc | 3 +- .../nodes/node_geo_simulation_output.cc | 3 +- .../nodes/node_geo_split_to_instances.cc | 3 +- .../nodes/node_geo_transform_geometry.cc | 6 +- .../intern/geometry_nodes_lazy_function.cc | 24 +- source/blender/nodes/intern/node_common.cc | 3 +- source/blender/nodes/intern/node_socket.cc | 4 +- .../nodes/shader/materialx/group_nodes.h | 2 +- .../blender/nodes/shader/node_shader_tree.cc | 3 +- .../nodes/shader/nodes/node_shader_math.cc | 3 +- .../nodes/shader/nodes/node_shader_mix.cc | 3 +- .../texture/nodes/node_texture_common.cc | 3 +- .../texture/nodes/node_texture_output.cc | 3 +- .../blender/python/generic/idprop_py_api.cc | 6 +- source/blender/python/gpu/gpu_py_element.cc | 3 +- .../blender/python/gpu/gpu_py_framebuffer.cc | 3 +- source/blender/python/gpu/gpu_py_shader.cc | 6 +- .../python/gpu/gpu_py_shader_create_info.cc | 3 +- .../blender/python/intern/bpy_app_timers.cc | 3 +- .../python/intern/bpy_app_translations.cc | 3 +- source/blender/python/intern/bpy_driver.cc | 3 +- .../python/intern/bpy_library_write.cc | 2 +- source/blender/python/intern/bpy_rna_gizmo.cc | 3 +- .../python/mathutils/mathutils_bvhtree.cc | 6 +- .../python/mathutils/mathutils_kdtree.cc | 3 +- .../python/mathutils/mathutils_noise.cc | 10 +- source/blender/render/intern/engine.cc | 3 +- source/blender/render/intern/pipeline.cc | 9 +- source/blender/render/intern/render_result.cc | 3 +- .../blender/render/intern/texture_margin.cc | 4 +- .../render/intern/texture_pointdensity.cc | 3 +- source/blender/sequencer/intern/render.cc | 3 +- .../sequencer/intern/strip_retiming.cc | 3 +- .../simulation/intern/SIM_mass_spring.cc | 3 +- source/blender/simulation/intern/implicit.h | 6 +- .../simulation/intern/implicit_blender.cc | 4 +- .../simulation/intern/implicit_eigen.cc | 4 +- .../gizmo/intern/wm_gizmo_group.cc | 6 +- .../gizmo/intern/wm_gizmo_map.cc | 6 +- .../gizmo/intern/wm_gizmo_type.cc | 3 +- .../windowmanager/intern/wm_event_system.cc | 15 +- .../blender/windowmanager/intern/wm_files.cc | 3 +- .../windowmanager/intern/wm_files_link.cc | 3 +- .../windowmanager/intern/wm_gesture.cc | 3 +- .../windowmanager/intern/wm_operator_type.cc | 3 +- .../windowmanager/intern/wm_playanim.cc | 3 +- .../windowmanager/xr/intern/wm_xr_session.cc | 3 +- source/creator/creator_args.cc | 5 +- tools/utils_maintenance/clang_format_paths.py | 4 +- 619 files changed, 2440 insertions(+), 1596 deletions(-) diff --git a/intern/cycles/blender/mesh.cpp b/intern/cycles/blender/mesh.cpp index 268afce27ca..75794cba863 100644 --- a/intern/cycles/blender/mesh.cpp +++ b/intern/cycles/blender/mesh.cpp @@ -313,7 +313,8 @@ static void attr_create_generic(Scene *scene, } if (b_attr.domain == blender::bke::AttrDomain::Corner && - meta_data.data_type == CD_PROP_BYTE_COLOR) { + meta_data.data_type == CD_PROP_BYTE_COLOR) + { Attribute *attr = attributes.add(name, TypeRGBA, ATTR_ELEMENT_CORNER_BYTE); if (is_render_color) { attr->std = ATTR_STD_VERTEX_COLOR; @@ -422,7 +423,8 @@ static set get_blender_uv_names(const ::Mesh &b_mesh) b_mesh.attributes().for_all([&](const blender::bke::AttributeIDRef &id, const blender::bke::AttributeMetaData meta_data) { if (meta_data.domain == blender::bke::AttrDomain::Corner && - meta_data.data_type == CD_PROP_FLOAT2) { + meta_data.data_type == CD_PROP_FLOAT2) + { if (!id.is_anonymous()) { uv_names.emplace(std::string_view(id.name())); } @@ -1250,7 +1252,8 @@ void BlenderSync::sync_mesh_motion(BL::Depsgraph b_depsgraph, if (new_attribute) { /* In case of new attribute, we verify if there really was any motion. */ if (b_verts_num != numverts || - memcmp(mP, &mesh->get_verts()[0], sizeof(float3) * numverts) == 0) { + memcmp(mP, &mesh->get_verts()[0], sizeof(float3) * numverts) == 0) + { /* no motion, remove attributes again */ if (b_verts_num != numverts) { VLOG_WARNING << "Topology differs, disabling motion blur for object " << ob_name; diff --git a/intern/cycles/blender/python.cpp b/intern/cycles/blender/python.cpp index 83728a65d6d..e7017282083 100644 --- a/intern/cycles/blender/python.cpp +++ b/intern/cycles/blender/python.cpp @@ -807,7 +807,8 @@ static PyObject *merge_func(PyObject * /*self*/, PyObject *args, PyObject *keywo PyObject *pyinput, *pyoutput = NULL; if (!PyArg_ParseTupleAndKeywords( - args, keywords, "OO", (char **)keyword_list, &pyinput, &pyoutput)) { + args, keywords, "OO", (char **)keyword_list, &pyinput, &pyoutput)) + { return NULL; } diff --git a/intern/cycles/blender/sync.cpp b/intern/cycles/blender/sync.cpp index 49d031b53b7..d82718d7cab 100644 --- a/intern/cycles/blender/sync.cpp +++ b/intern/cycles/blender/sync.cpp @@ -187,7 +187,8 @@ void BlenderSync::sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d if (updated_geometry) { BL::Object::particle_systems_iterator b_psys; for (b_ob.particle_systems.begin(b_psys); b_psys != b_ob.particle_systems.end(); - ++b_psys) { + ++b_psys) + { particle_system_map.set_recalc(b_ob); } } @@ -405,7 +406,8 @@ void BlenderSync::sync_integrator(BL::ViewLayer &b_view_layer, bool background) /* Only use scrambling distance in the viewport if user wants to. */ bool preview_scrambling_distance = get_boolean(cscene, "preview_scrambling_distance"); if ((preview && !preview_scrambling_distance) || - sampling_pattern == SAMPLING_PATTERN_SOBOL_BURLEY) { + sampling_pattern == SAMPLING_PATTERN_SOBOL_BURLEY) + { scrambling_distance = 1.0f; } diff --git a/intern/cycles/bvh/binning.cpp b/intern/cycles/bvh/binning.cpp index 894da7ded7c..af469dbf9b6 100644 --- a/intern/cycles/bvh/binning.cpp +++ b/intern/cycles/bvh/binning.cpp @@ -5,7 +5,7 @@ * * Adapted code from Intel Corporation. */ -//#define __KERNEL_SSE__ +// #define __KERNEL_SSE__ #include "bvh/binning.h" diff --git a/intern/cycles/device/metal/bvh.mm b/intern/cycles/device/metal/bvh.mm index 6e753688c1b..39565e65662 100644 --- a/intern/cycles/device/metal/bvh.mm +++ b/intern/cycles/device/metal/bvh.mm @@ -23,7 +23,7 @@ CCL_NAMESPACE_BEGIN metal_printf("%s\n", str.c_str()); \ } -//# define BVH_THROTTLE_DIAGNOSTICS +// # define BVH_THROTTLE_DIAGNOSTICS # ifdef BVH_THROTTLE_DIAGNOSTICS # define bvh_throttle_printf(...) printf("BVHMetalBuildThrottler::" __VA_ARGS__) # else diff --git a/intern/cycles/device/metal/kernel.mm b/intern/cycles/device/metal/kernel.mm index c300fdc9d96..c13052ac261 100644 --- a/intern/cycles/device/metal/kernel.mm +++ b/intern/cycles/device/metal/kernel.mm @@ -361,7 +361,8 @@ MetalKernelPipeline *ShaderCache::get_best_pipeline(DeviceKernel kernel, const M thread_scoped_lock lock(cache_mutex); for (auto &candidate : pipelines[kernel]) { if (candidate->loaded && - candidate->kernels_md5 == device->kernels_md5[candidate->pso_type]) { + candidate->kernels_md5 == device->kernels_md5[candidate->pso_type]) + { /* Replace existing match if candidate is more specialized. */ if (!best_match || candidate->pso_type > best_match->pso_type) { best_match = candidate.get(); @@ -795,7 +796,8 @@ void MetalKernelPipeline::compile() if (ShaderCache::running) { if (creating_new_archive || recreate_archive) { if (![archive serializeToURL:[NSURL fileURLWithPath:@(metalbin_path.c_str())] - error:&error]) { + error:&error]) + { metal_printf("Failed to save binary archive to %s, error:\n%s\n", metalbin_path.c_str(), [[error localizedDescription] UTF8String]); diff --git a/intern/cycles/device/metal/queue.mm b/intern/cycles/device/metal/queue.mm index 596f1f94cbc..81d9e781c4d 100644 --- a/intern/cycles/device/metal/queue.mm +++ b/intern/cycles/device/metal/queue.mm @@ -652,7 +652,8 @@ bool MetalDeviceQueue::enqueue(DeviceKernel kernel, ((MyDeviceMemory *)it.first)->device_copy_from__IntegratorQueueCounter(); if (IntegratorQueueCounter *queue_counter = (IntegratorQueueCounter *) - it.first->host_pointer) { + it.first->host_pointer) + { for (int i = 0; i < DEVICE_KERNEL_INTEGRATOR_NUM; i++) printf("%s%d", i == 0 ? "" : ",", int(queue_counter->num_queued[i])); } diff --git a/intern/cycles/hydra/curves.cpp b/intern/cycles/hydra/curves.cpp index 3d71c4ce7f6..4dd83047151 100644 --- a/intern/cycles/hydra/curves.cpp +++ b/intern/cycles/hydra/curves.cpp @@ -154,7 +154,8 @@ void HdCyclesCurves::PopulatePrimvars(HdSceneDelegate *sceneDelegate) for (const auto &interpolation : interpolations) { for (const HdPrimvarDescriptor &desc : - GetPrimvarDescriptors(sceneDelegate, interpolation.first)) { + GetPrimvarDescriptors(sceneDelegate, interpolation.first)) + { // Skip special primvars that are handled separately if (desc.name == HdTokens->points || desc.name == HdTokens->widths) { continue; @@ -172,7 +173,8 @@ void HdCyclesCurves::PopulatePrimvars(HdSceneDelegate *sceneDelegate) std = ATTR_STD_UV; } else if (desc.name == HdTokens->displayColor && - interpolation.first == HdInterpolationConstant) { + interpolation.first == HdInterpolationConstant) + { if (value.IsHolding() && value.GetArraySize() == 1) { const GfVec3f color = value.UncheckedGet()[0]; _instances[0]->set_color(make_float3(color[0], color[1], color[2])); diff --git a/intern/cycles/hydra/curves.h b/intern/cycles/hydra/curves.h index 134eebf6b14..76a2ce9319f 100644 --- a/intern/cycles/hydra/curves.h +++ b/intern/cycles/hydra/curves.h @@ -14,11 +14,10 @@ HDCYCLES_NAMESPACE_OPEN_SCOPE class HdCyclesCurves final : public HdCyclesGeometry { public: - HdCyclesCurves( - const PXR_NS::SdfPath &rprimId + HdCyclesCurves(const PXR_NS::SdfPath &rprimId #if PXR_VERSION < 2102 - , - const PXR_NS::SdfPath &instancerId = {} + , + const PXR_NS::SdfPath &instancerId = {} #endif ); ~HdCyclesCurves() override; diff --git a/intern/cycles/hydra/mesh.cpp b/intern/cycles/hydra/mesh.cpp index eb25623eeed..5ceaea1c7e9 100644 --- a/intern/cycles/hydra/mesh.cpp +++ b/intern/cycles/hydra/mesh.cpp @@ -311,7 +311,8 @@ void HdCyclesMesh::PopulatePrimvars(HdSceneDelegate *sceneDelegate) for (const auto &interpolation : interpolations) { for (const HdPrimvarDescriptor &desc : - GetPrimvarDescriptors(sceneDelegate, interpolation.first)) { + GetPrimvarDescriptors(sceneDelegate, interpolation.first)) + { // Skip special primvars that are handled separately if (desc.name == HdTokens->points || desc.name == HdTokens->normals) { continue; @@ -337,7 +338,8 @@ void HdCyclesMesh::PopulatePrimvars(HdSceneDelegate *sceneDelegate) } } else if (desc.name == HdTokens->displayColor && - interpolation.first == HdInterpolationConstant) { + interpolation.first == HdInterpolationConstant) + { if (value.IsHolding() && value.GetArraySize() == 1) { const GfVec3f color = value.UncheckedGet()[0]; _instances[0]->set_color(make_float3(color[0], color[1], color[2])); diff --git a/intern/cycles/hydra/mesh.h b/intern/cycles/hydra/mesh.h index f53d0ce8b02..dd4f74fd852 100644 --- a/intern/cycles/hydra/mesh.h +++ b/intern/cycles/hydra/mesh.h @@ -15,11 +15,10 @@ HDCYCLES_NAMESPACE_OPEN_SCOPE class HdCyclesMesh final : public HdCyclesGeometry { public: - HdCyclesMesh( - const PXR_NS::SdfPath &rprimId + HdCyclesMesh(const PXR_NS::SdfPath &rprimId #if PXR_VERSION < 2102 - , - const PXR_NS::SdfPath &instancerId = {} + , + const PXR_NS::SdfPath &instancerId = {} #endif ); ~HdCyclesMesh() override; diff --git a/intern/cycles/hydra/pointcloud.cpp b/intern/cycles/hydra/pointcloud.cpp index 660067fe2af..17e2283cd96 100644 --- a/intern/cycles/hydra/pointcloud.cpp +++ b/intern/cycles/hydra/pointcloud.cpp @@ -154,7 +154,8 @@ void HdCyclesPoints::PopulatePrimvars(HdSceneDelegate *sceneDelegate) for (const auto &interpolation : interpolations) { for (const HdPrimvarDescriptor &desc : - GetPrimvarDescriptors(sceneDelegate, interpolation.first)) { + GetPrimvarDescriptors(sceneDelegate, interpolation.first)) + { // Skip special primvars that are handled separately if (desc.name == HdTokens->points || desc.name == HdTokens->widths) { continue; @@ -180,7 +181,8 @@ void HdCyclesPoints::PopulatePrimvars(HdSceneDelegate *sceneDelegate) } } else if (desc.name == HdTokens->displayColor && - interpolation.first == HdInterpolationConstant) { + interpolation.first == HdInterpolationConstant) + { if (value.IsHolding() && value.GetArraySize() == 1) { const GfVec3f color = value.UncheckedGet()[0]; _instances[0]->set_color(make_float3(color[0], color[1], color[2])); diff --git a/intern/cycles/hydra/pointcloud.h b/intern/cycles/hydra/pointcloud.h index 35eda015916..c6678f9476f 100644 --- a/intern/cycles/hydra/pointcloud.h +++ b/intern/cycles/hydra/pointcloud.h @@ -14,11 +14,10 @@ HDCYCLES_NAMESPACE_OPEN_SCOPE class HdCyclesPoints final : public HdCyclesGeometry { public: - HdCyclesPoints( - const PXR_NS::SdfPath &rprimId + HdCyclesPoints(const PXR_NS::SdfPath &rprimId #if PXR_VERSION < 2102 - , - const PXR_NS::SdfPath &instancerId = {} + , + const PXR_NS::SdfPath &instancerId = {} #endif ); ~HdCyclesPoints() override; diff --git a/intern/cycles/hydra/volume.h b/intern/cycles/hydra/volume.h index c77f4c41dd1..8bb269cf3d9 100644 --- a/intern/cycles/hydra/volume.h +++ b/intern/cycles/hydra/volume.h @@ -14,11 +14,10 @@ HDCYCLES_NAMESPACE_OPEN_SCOPE class HdCyclesVolume final : public HdCyclesGeometry { public: - HdCyclesVolume( - const PXR_NS::SdfPath &rprimId + HdCyclesVolume(const PXR_NS::SdfPath &rprimId #if PXR_VERSION < 2102 - , - const PXR_NS::SdfPath &instancerId = {} + , + const PXR_NS::SdfPath &instancerId = {} #endif ); ~HdCyclesVolume() override; diff --git a/intern/cycles/integrator/denoiser_oidn.cpp b/intern/cycles/integrator/denoiser_oidn.cpp index ab10fc05814..e956699b30b 100644 --- a/intern/cycles/integrator/denoiser_oidn.cpp +++ b/intern/cycles/integrator/denoiser_oidn.cpp @@ -215,7 +215,8 @@ class OIDNDenoiseContext { DCHECK(!oidn_pass.use_compositing); if (denoise_params_.prefilter != DENOISER_PREFILTER_ACCURATE && - !is_pass_scale_needed(oidn_pass)) { + !is_pass_scale_needed(oidn_pass)) + { /* Pass data is available as-is from the render buffers. */ return; } diff --git a/intern/cycles/integrator/pass_accessor.cpp b/intern/cycles/integrator/pass_accessor.cpp index ea72cb0e1c2..ba41d10ad87 100644 --- a/intern/cycles/integrator/pass_accessor.cpp +++ b/intern/cycles/integrator/pass_accessor.cpp @@ -196,7 +196,8 @@ bool PassAccessor::get_render_tile_pixels(const RenderBuffers *render_buffers, /* Use alpha for colors passes. */ if (type == PASS_DIFFUSE_COLOR || type == PASS_GLOSSY_COLOR || - type == PASS_TRANSMISSION_COLOR) { + type == PASS_TRANSMISSION_COLOR) + { num_written_components = destination.num_components; } } @@ -206,7 +207,8 @@ bool PassAccessor::get_render_tile_pixels(const RenderBuffers *render_buffers, get_pass_float3(render_buffers, buffer_params, destination); } else if (type == PASS_COMBINED || type == PASS_SHADOW_CATCHER || - type == PASS_SHADOW_CATCHER_MATTE) { + type == PASS_SHADOW_CATCHER_MATTE) + { /* Passes with transparency as 4th component. */ get_pass_combined(render_buffers, buffer_params, destination); } diff --git a/intern/cycles/integrator/path_trace_display.cpp b/intern/cycles/integrator/path_trace_display.cpp index 0d510263e31..1ba1527acf1 100644 --- a/intern/cycles/integrator/path_trace_display.cpp +++ b/intern/cycles/integrator/path_trace_display.cpp @@ -127,7 +127,8 @@ void PathTraceDisplay::copy_pixels_to_texture( const half4 *rgba_row = rgba_pixels; half4 *mapped_rgba_row = mapped_rgba_pixels + texture_y * texture_width + texture_x; for (int y = 0; y < pixels_height; - ++y, rgba_row += pixels_width, mapped_rgba_row += texture_width) { + ++y, rgba_row += pixels_width, mapped_rgba_row += texture_width) + { memcpy(mapped_rgba_row, rgba_row, sizeof(half4) * pixels_width); } } diff --git a/intern/cycles/integrator/path_trace_work_cpu.cpp b/intern/cycles/integrator/path_trace_work_cpu.cpp index 239bab989f6..ae35635973c 100644 --- a/intern/cycles/integrator/path_trace_work_cpu.cpp +++ b/intern/cycles/integrator/path_trace_work_cpu.cpp @@ -134,13 +134,15 @@ void PathTraceWorkCPU::render_samples_full_pipeline(KernelGlobalsCPU *kernel_glo if (has_bake) { if (!kernels_.integrator_init_from_bake( - kernel_globals, state, &sample_work_tile, render_buffer)) { + kernel_globals, state, &sample_work_tile, render_buffer)) + { break; } } else { if (!kernels_.integrator_init_from_camera( - kernel_globals, state, &sample_work_tile, render_buffer)) { + kernel_globals, state, &sample_work_tile, render_buffer)) + { break; } } diff --git a/intern/cycles/integrator/path_trace_work_gpu.cpp b/intern/cycles/integrator/path_trace_work_gpu.cpp index 41882b85b64..0c0bad0d5f6 100644 --- a/intern/cycles/integrator/path_trace_work_gpu.cpp +++ b/intern/cycles/integrator/path_trace_work_gpu.cpp @@ -964,7 +964,8 @@ void PathTraceWorkGPU::copy_to_display_naive(PathTraceDisplay *display, * change of the resolution divider. However, if the display becomes smaller, shrink the * allocated memory as well. */ if (display_rgba_half_.data_width != final_width || - display_rgba_half_.data_height != final_height) { + display_rgba_half_.data_height != final_height) + { display_rgba_half_.alloc(final_width, final_height); /* TODO(sergey): There should be a way to make sure device-side memory is allocated without * transferring zeroes to the device. */ diff --git a/intern/cycles/integrator/render_scheduler.cpp b/intern/cycles/integrator/render_scheduler.cpp index 17ae2cd15e4..34736c22c40 100644 --- a/intern/cycles/integrator/render_scheduler.cpp +++ b/intern/cycles/integrator/render_scheduler.cpp @@ -971,7 +971,8 @@ bool RenderScheduler::work_need_denoise(bool &delayed, bool &ready_to_display) /* Immediately denoise when we reach the start sample or last sample. */ if (num_samples_finished == denoiser_params_.start_sample || - num_samples_finished == num_samples_) { + num_samples_finished == num_samples_) + { return true; } diff --git a/intern/cycles/kernel/bvh/local.h b/intern/cycles/kernel/bvh/local.h index 6e8db3af59d..0c2be9e0380 100644 --- a/intern/cycles/kernel/bvh/local.h +++ b/intern/cycles/kernel/bvh/local.h @@ -24,12 +24,13 @@ ccl_device #else ccl_device_inline #endif - bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, - ccl_private const Ray *ray, - ccl_private LocalIntersection *local_isect, - int local_object, - ccl_private uint *lcg_state, - int max_hits) + bool + BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, + ccl_private const Ray *ray, + ccl_private LocalIntersection *local_isect, + int local_object, + ccl_private uint *lcg_state, + int max_hits) { /* todo: * - test if pushing distance on the stack helps (for non shadow rays) diff --git a/intern/cycles/kernel/bvh/shadow_all.h b/intern/cycles/kernel/bvh/shadow_all.h index 0efb7a396c8..54310b881a9 100644 --- a/intern/cycles/kernel/bvh/shadow_all.h +++ b/intern/cycles/kernel/bvh/shadow_all.h @@ -26,13 +26,14 @@ ccl_device #else ccl_device_inline #endif - bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, - ccl_private const Ray *ray, - IntegratorShadowState state, - const uint visibility, - const uint max_hits, - ccl_private uint *r_num_recorded_hits, - ccl_private float *r_throughput) + bool + BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, + ccl_private const Ray *ray, + IntegratorShadowState state, + const uint visibility, + const uint max_hits, + ccl_private uint *r_num_recorded_hits, + ccl_private float *r_throughput) { /* todo: * - likely and unlikely for if() statements diff --git a/intern/cycles/kernel/bvh/volume.h b/intern/cycles/kernel/bvh/volume.h index d6d62c40e75..59120700f9b 100644 --- a/intern/cycles/kernel/bvh/volume.h +++ b/intern/cycles/kernel/bvh/volume.h @@ -24,10 +24,11 @@ ccl_device #else ccl_device_inline #endif - bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, - ccl_private const Ray *ray, - ccl_private Intersection *isect, - const uint visibility) + bool + BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, + ccl_private const Ray *ray, + ccl_private Intersection *isect, + const uint visibility) { /* todo: * - test if pushing distance on the stack helps (for non shadow rays) diff --git a/intern/cycles/kernel/bvh/volume_all.h b/intern/cycles/kernel/bvh/volume_all.h index 03d5b44d166..30826275deb 100644 --- a/intern/cycles/kernel/bvh/volume_all.h +++ b/intern/cycles/kernel/bvh/volume_all.h @@ -24,11 +24,12 @@ ccl_device #else ccl_device_inline #endif - uint BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, - ccl_private const Ray *ray, - Intersection *isect_array, - const uint max_hits, - const uint visibility) + uint + BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg, + ccl_private const Ray *ray, + Intersection *isect_array, + const uint max_hits, + const uint visibility) { /* todo: * - test if pushing distance on the stack helps (for non shadow rays) diff --git a/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h b/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h index 47b67862045..518820997fb 100644 --- a/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h +++ b/intern/cycles/kernel/closure/bsdf_principled_hair_huang.h @@ -747,7 +747,8 @@ ccl_device int bsdf_hair_huang_sample(const KernelGlobals kg, const float T3 = 1.0f - R3; if (cos_theta_t3 != 0.0f && - microfacet_visible(wtr, -wtrt, make_float3(wmtr.x, 0.0f, wmtr.z), wh3)) { + microfacet_visible(wtr, -wtrt, make_float3(wmtr.x, 0.0f, wmtr.z), wh3)) + { TRT = bsdf->extra->TRT * TR * make_spectrum(T3) * bsdf_Go(roughness2, cos_mi3, dot(wmtr, -wtrt)); } diff --git a/intern/cycles/kernel/device/cpu/bvh.h b/intern/cycles/kernel/device/cpu/bvh.h index 8c64777c797..2a0260df6f5 100644 --- a/intern/cycles/kernel/device/cpu/bvh.h +++ b/intern/cycles/kernel/device/cpu/bvh.h @@ -741,7 +741,8 @@ ccl_device_intersect bool kernel_embree_intersect(KernelGlobals kg, rtcIntersect1(kernel_data.device_bvh, &ctx, &ray_hit); #endif if (ray_hit.hit.geomID == RTC_INVALID_GEOMETRY_ID || - ray_hit.hit.primID == RTC_INVALID_GEOMETRY_ID) { + ray_hit.hit.primID == RTC_INVALID_GEOMETRY_ID) + { return false; } diff --git a/intern/cycles/kernel/device/oneapi/kernel.cpp b/intern/cycles/kernel/device/oneapi/kernel.cpp index 51c370c0a93..d27aebd8006 100644 --- a/intern/cycles/kernel/device/oneapi/kernel.cpp +++ b/intern/cycles/kernel/device/oneapi/kernel.cpp @@ -25,14 +25,13 @@ static OneAPIErrorCallback s_error_cb = nullptr; static void *s_error_user_ptr = nullptr; # ifdef WITH_EMBREE_GPU -static const RTCFeatureFlags CYCLES_ONEAPI_EMBREE_BASIC_FEATURES = - (const RTCFeatureFlags)(RTC_FEATURE_FLAG_TRIANGLE | RTC_FEATURE_FLAG_INSTANCE | - RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS | - RTC_FEATURE_FLAG_POINT | RTC_FEATURE_FLAG_MOTION_BLUR); -static const RTCFeatureFlags CYCLES_ONEAPI_EMBREE_ALL_FEATURES = - (const RTCFeatureFlags)(CYCLES_ONEAPI_EMBREE_BASIC_FEATURES | - RTC_FEATURE_FLAG_ROUND_CATMULL_ROM_CURVE | - RTC_FEATURE_FLAG_FLAT_CATMULL_ROM_CURVE); +static const RTCFeatureFlags CYCLES_ONEAPI_EMBREE_BASIC_FEATURES = (const RTCFeatureFlags)( + RTC_FEATURE_FLAG_TRIANGLE | RTC_FEATURE_FLAG_INSTANCE | + RTC_FEATURE_FLAG_FILTER_FUNCTION_IN_ARGUMENTS | RTC_FEATURE_FLAG_POINT | + RTC_FEATURE_FLAG_MOTION_BLUR); +static const RTCFeatureFlags CYCLES_ONEAPI_EMBREE_ALL_FEATURES = (const RTCFeatureFlags)( + CYCLES_ONEAPI_EMBREE_BASIC_FEATURES | RTC_FEATURE_FLAG_ROUND_CATMULL_ROM_CURVE | + RTC_FEATURE_FLAG_FLAT_CATMULL_ROM_CURVE); # endif void oneapi_set_error_cb(OneAPIErrorCallback cb, void *user_ptr) diff --git a/intern/cycles/kernel/geom/subd_triangle.h b/intern/cycles/kernel/geom/subd_triangle.h index e30b52b2510..058891f2024 100644 --- a/intern/cycles/kernel/geom/subd_triangle.h +++ b/intern/cycles/kernel/geom/subd_triangle.h @@ -136,90 +136,90 @@ ccl_device_noinline float subd_triangle_attribute_float(KernelGlobals kg, } else #endif /* __PATCH_EVAL__ */ - if (desc.element == ATTR_ELEMENT_FACE) - { - if (dx) - *dx = 0.0f; - if (dy) - *dy = 0.0f; + if (desc.element == ATTR_ELEMENT_FACE) { + if (dx) + *dx = 0.0f; + if (dy) + *dy = 0.0f; - return kernel_data_fetch(attributes_float, desc.offset + subd_triangle_patch_face(kg, patch)); - } - else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); - - uint4 v = subd_triangle_patch_indices(kg, patch); - - float f0 = kernel_data_fetch(attributes_float, desc.offset + v.x); - float f1 = kernel_data_fetch(attributes_float, desc.offset + v.y); - float f2 = kernel_data_fetch(attributes_float, desc.offset + v.z); - float f3 = kernel_data_fetch(attributes_float, desc.offset + v.w); - - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; + return kernel_data_fetch(attributes_float, + desc.offset + subd_triangle_patch_face(kg, patch)); } + else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); - float a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + uint4 v = subd_triangle_patch_indices(kg, patch); + + float f0 = kernel_data_fetch(attributes_float, desc.offset + v.x); + float f1 = kernel_data_fetch(attributes_float, desc.offset + v.y); + float f2 = kernel_data_fetch(attributes_float, desc.offset + v.z); + float f3 = kernel_data_fetch(attributes_float, desc.offset + v.w); + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); #ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; #endif - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_CORNER) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); - - int corners[4]; - subd_triangle_patch_corners(kg, patch, corners); - - float f0 = kernel_data_fetch(attributes_float, corners[0] + desc.offset); - float f1 = kernel_data_fetch(attributes_float, corners[1] + desc.offset); - float f2 = kernel_data_fetch(attributes_float, corners[2] + desc.offset); - float f3 = kernel_data_fetch(attributes_float, corners[3] + desc.offset); - - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; } + else if (desc.element == ATTR_ELEMENT_CORNER) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); - float a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + int corners[4]; + subd_triangle_patch_corners(kg, patch, corners); + + float f0 = kernel_data_fetch(attributes_float, corners[0] + desc.offset); + float f1 = kernel_data_fetch(attributes_float, corners[1] + desc.offset); + float f2 = kernel_data_fetch(attributes_float, corners[2] + desc.offset); + float f3 = kernel_data_fetch(attributes_float, corners[3] + desc.offset); + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); #ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; #endif - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { - if (dx) - *dx = 0.0f; - if (dy) - *dy = 0.0f; + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; + } + else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { + if (dx) + *dx = 0.0f; + if (dy) + *dy = 0.0f; - return kernel_data_fetch(attributes_float, desc.offset); - } - else { - if (dx) - *dx = 0.0f; - if (dy) - *dy = 0.0f; + return kernel_data_fetch(attributes_float, desc.offset); + } + else { + if (dx) + *dx = 0.0f; + if (dy) + *dy = 0.0f; - return 0.0f; - } + return 0.0f; + } } ccl_device_noinline float2 subd_triangle_attribute_float2(KernelGlobals kg, @@ -277,92 +277,92 @@ ccl_device_noinline float2 subd_triangle_attribute_float2(KernelGlobals kg, } else #endif /* __PATCH_EVAL__ */ - if (desc.element == ATTR_ELEMENT_FACE) - { - if (dx) - *dx = make_float2(0.0f, 0.0f); - if (dy) - *dy = make_float2(0.0f, 0.0f); + if (desc.element == ATTR_ELEMENT_FACE) { + if (dx) + *dx = make_float2(0.0f, 0.0f); + if (dy) + *dy = make_float2(0.0f, 0.0f); - return kernel_data_fetch(attributes_float2, desc.offset + subd_triangle_patch_face(kg, patch)); - } - else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); - - uint4 v = subd_triangle_patch_indices(kg, patch); - - float2 f0 = kernel_data_fetch(attributes_float2, desc.offset + v.x); - float2 f1 = kernel_data_fetch(attributes_float2, desc.offset + v.y); - float2 f2 = kernel_data_fetch(attributes_float2, desc.offset + v.z); - float2 f3 = kernel_data_fetch(attributes_float2, desc.offset + v.w); - - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; + return kernel_data_fetch(attributes_float2, + desc.offset + subd_triangle_patch_face(kg, patch)); } + else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); - float2 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float2 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float2 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + uint4 v = subd_triangle_patch_indices(kg, patch); + + float2 f0 = kernel_data_fetch(attributes_float2, desc.offset + v.x); + float2 f1 = kernel_data_fetch(attributes_float2, desc.offset + v.y); + float2 f2 = kernel_data_fetch(attributes_float2, desc.offset + v.z); + float2 f3 = kernel_data_fetch(attributes_float2, desc.offset + v.w); + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float2 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float2 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float2 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); #ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; #endif - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_CORNER) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); - - int corners[4]; - subd_triangle_patch_corners(kg, patch, corners); - - float2 f0, f1, f2, f3; - - f0 = kernel_data_fetch(attributes_float2, corners[0] + desc.offset); - f1 = kernel_data_fetch(attributes_float2, corners[1] + desc.offset); - f2 = kernel_data_fetch(attributes_float2, corners[2] + desc.offset); - f3 = kernel_data_fetch(attributes_float2, corners[3] + desc.offset); - - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; } + else if (desc.element == ATTR_ELEMENT_CORNER) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); - float2 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float2 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float2 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + int corners[4]; + subd_triangle_patch_corners(kg, patch, corners); + + float2 f0, f1, f2, f3; + + f0 = kernel_data_fetch(attributes_float2, corners[0] + desc.offset); + f1 = kernel_data_fetch(attributes_float2, corners[1] + desc.offset); + f2 = kernel_data_fetch(attributes_float2, corners[2] + desc.offset); + f3 = kernel_data_fetch(attributes_float2, corners[3] + desc.offset); + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float2 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float2 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float2 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); #ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; #endif - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { - if (dx) - *dx = make_float2(0.0f, 0.0f); - if (dy) - *dy = make_float2(0.0f, 0.0f); + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; + } + else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { + if (dx) + *dx = make_float2(0.0f, 0.0f); + if (dy) + *dy = make_float2(0.0f, 0.0f); - return kernel_data_fetch(attributes_float2, desc.offset); - } - else { - if (dx) - *dx = make_float2(0.0f, 0.0f); - if (dy) - *dy = make_float2(0.0f, 0.0f); + return kernel_data_fetch(attributes_float2, desc.offset); + } + else { + if (dx) + *dx = make_float2(0.0f, 0.0f); + if (dy) + *dy = make_float2(0.0f, 0.0f); - return make_float2(0.0f, 0.0f); - } + return make_float2(0.0f, 0.0f); + } } ccl_device_noinline float3 subd_triangle_attribute_float3(KernelGlobals kg, @@ -419,92 +419,92 @@ ccl_device_noinline float3 subd_triangle_attribute_float3(KernelGlobals kg, } else #endif /* __PATCH_EVAL__ */ - if (desc.element == ATTR_ELEMENT_FACE) - { - if (dx) - *dx = make_float3(0.0f, 0.0f, 0.0f); - if (dy) - *dy = make_float3(0.0f, 0.0f, 0.0f); + if (desc.element == ATTR_ELEMENT_FACE) { + if (dx) + *dx = make_float3(0.0f, 0.0f, 0.0f); + if (dy) + *dy = make_float3(0.0f, 0.0f, 0.0f); - return kernel_data_fetch(attributes_float3, desc.offset + subd_triangle_patch_face(kg, patch)); - } - else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); - - uint4 v = subd_triangle_patch_indices(kg, patch); - - float3 f0 = kernel_data_fetch(attributes_float3, desc.offset + v.x); - float3 f1 = kernel_data_fetch(attributes_float3, desc.offset + v.y); - float3 f2 = kernel_data_fetch(attributes_float3, desc.offset + v.z); - float3 f3 = kernel_data_fetch(attributes_float3, desc.offset + v.w); - - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; + return kernel_data_fetch(attributes_float3, + desc.offset + subd_triangle_patch_face(kg, patch)); } + else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); - float3 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float3 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float3 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + uint4 v = subd_triangle_patch_indices(kg, patch); + + float3 f0 = kernel_data_fetch(attributes_float3, desc.offset + v.x); + float3 f1 = kernel_data_fetch(attributes_float3, desc.offset + v.y); + float3 f2 = kernel_data_fetch(attributes_float3, desc.offset + v.z); + float3 f3 = kernel_data_fetch(attributes_float3, desc.offset + v.w); + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float3 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float3 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float3 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); #ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; #endif - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_CORNER) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); - - int corners[4]; - subd_triangle_patch_corners(kg, patch, corners); - - float3 f0, f1, f2, f3; - - f0 = kernel_data_fetch(attributes_float3, corners[0] + desc.offset); - f1 = kernel_data_fetch(attributes_float3, corners[1] + desc.offset); - f2 = kernel_data_fetch(attributes_float3, corners[2] + desc.offset); - f3 = kernel_data_fetch(attributes_float3, corners[3] + desc.offset); - - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; } + else if (desc.element == ATTR_ELEMENT_CORNER) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); - float3 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float3 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float3 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + int corners[4]; + subd_triangle_patch_corners(kg, patch, corners); + + float3 f0, f1, f2, f3; + + f0 = kernel_data_fetch(attributes_float3, corners[0] + desc.offset); + f1 = kernel_data_fetch(attributes_float3, corners[1] + desc.offset); + f2 = kernel_data_fetch(attributes_float3, corners[2] + desc.offset); + f3 = kernel_data_fetch(attributes_float3, corners[3] + desc.offset); + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float3 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float3 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float3 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); #ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; #endif - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { - if (dx) - *dx = make_float3(0.0f, 0.0f, 0.0f); - if (dy) - *dy = make_float3(0.0f, 0.0f, 0.0f); + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; + } + else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { + if (dx) + *dx = make_float3(0.0f, 0.0f, 0.0f); + if (dy) + *dy = make_float3(0.0f, 0.0f, 0.0f); - return kernel_data_fetch(attributes_float3, desc.offset); - } - else { - if (dx) - *dx = make_float3(0.0f, 0.0f, 0.0f); - if (dy) - *dy = make_float3(0.0f, 0.0f, 0.0f); + return kernel_data_fetch(attributes_float3, desc.offset); + } + else { + if (dx) + *dx = make_float3(0.0f, 0.0f, 0.0f); + if (dy) + *dy = make_float3(0.0f, 0.0f, 0.0f); - return make_float3(0.0f, 0.0f, 0.0f); - } + return make_float3(0.0f, 0.0f, 0.0f); + } } ccl_device_noinline float4 subd_triangle_attribute_float4(KernelGlobals kg, @@ -566,104 +566,104 @@ ccl_device_noinline float4 subd_triangle_attribute_float4(KernelGlobals kg, } else #endif /* __PATCH_EVAL__ */ - if (desc.element == ATTR_ELEMENT_FACE) - { - if (dx) - *dx = zero_float4(); - if (dy) - *dy = zero_float4(); + if (desc.element == ATTR_ELEMENT_FACE) { + if (dx) + *dx = zero_float4(); + if (dy) + *dy = zero_float4(); - return kernel_data_fetch(attributes_float4, desc.offset + subd_triangle_patch_face(kg, patch)); - } - else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); - - uint4 v = subd_triangle_patch_indices(kg, patch); - - float4 f0 = kernel_data_fetch(attributes_float4, desc.offset + v.x); - float4 f1 = kernel_data_fetch(attributes_float4, desc.offset + v.y); - float4 f2 = kernel_data_fetch(attributes_float4, desc.offset + v.z); - float4 f3 = kernel_data_fetch(attributes_float4, desc.offset + v.w); - - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; + return kernel_data_fetch(attributes_float4, + desc.offset + subd_triangle_patch_face(kg, patch)); } + else if (desc.element == ATTR_ELEMENT_VERTEX || desc.element == ATTR_ELEMENT_VERTEX_MOTION) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); - float4 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float4 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float4 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + uint4 v = subd_triangle_patch_indices(kg, patch); + + float4 f0 = kernel_data_fetch(attributes_float4, desc.offset + v.x); + float4 f1 = kernel_data_fetch(attributes_float4, desc.offset + v.y); + float4 f2 = kernel_data_fetch(attributes_float4, desc.offset + v.z); + float4 f3 = kernel_data_fetch(attributes_float4, desc.offset + v.w); + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float4 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float4 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float4 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); #ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; #endif - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_CORNER || desc.element == ATTR_ELEMENT_CORNER_BYTE) { - float2 uv[3]; - subd_triangle_patch_uv(kg, sd, uv); + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; + } + else if (desc.element == ATTR_ELEMENT_CORNER || desc.element == ATTR_ELEMENT_CORNER_BYTE) { + float2 uv[3]; + subd_triangle_patch_uv(kg, sd, uv); - int corners[4]; - subd_triangle_patch_corners(kg, patch, corners); + int corners[4]; + subd_triangle_patch_corners(kg, patch, corners); - float4 f0, f1, f2, f3; + float4 f0, f1, f2, f3; - if (desc.element == ATTR_ELEMENT_CORNER_BYTE) { - f0 = color_srgb_to_linear_v4( - color_uchar4_to_float4(kernel_data_fetch(attributes_uchar4, corners[0] + desc.offset))); - f1 = color_srgb_to_linear_v4( - color_uchar4_to_float4(kernel_data_fetch(attributes_uchar4, corners[1] + desc.offset))); - f2 = color_srgb_to_linear_v4( - color_uchar4_to_float4(kernel_data_fetch(attributes_uchar4, corners[2] + desc.offset))); - f3 = color_srgb_to_linear_v4( - color_uchar4_to_float4(kernel_data_fetch(attributes_uchar4, corners[3] + desc.offset))); + if (desc.element == ATTR_ELEMENT_CORNER_BYTE) { + f0 = color_srgb_to_linear_v4(color_uchar4_to_float4( + kernel_data_fetch(attributes_uchar4, corners[0] + desc.offset))); + f1 = color_srgb_to_linear_v4(color_uchar4_to_float4( + kernel_data_fetch(attributes_uchar4, corners[1] + desc.offset))); + f2 = color_srgb_to_linear_v4(color_uchar4_to_float4( + kernel_data_fetch(attributes_uchar4, corners[2] + desc.offset))); + f3 = color_srgb_to_linear_v4(color_uchar4_to_float4( + kernel_data_fetch(attributes_uchar4, corners[3] + desc.offset))); + } + else { + f0 = kernel_data_fetch(attributes_float4, corners[0] + desc.offset); + f1 = kernel_data_fetch(attributes_float4, corners[1] + desc.offset); + f2 = kernel_data_fetch(attributes_float4, corners[2] + desc.offset); + f3 = kernel_data_fetch(attributes_float4, corners[3] + desc.offset); + } + + if (subd_triangle_patch_num_corners(kg, patch) != 4) { + f1 = (f1 + f0) * 0.5f; + f3 = (f3 + f0) * 0.5f; + } + + float4 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); + float4 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); + float4 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); + +#ifdef __RAY_DIFFERENTIALS__ + if (dx) + *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; + if (dy) + *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; +#endif + + return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; + } + else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { + if (dx) + *dx = zero_float4(); + if (dy) + *dy = zero_float4(); + + return kernel_data_fetch(attributes_float4, desc.offset); } else { - f0 = kernel_data_fetch(attributes_float4, corners[0] + desc.offset); - f1 = kernel_data_fetch(attributes_float4, corners[1] + desc.offset); - f2 = kernel_data_fetch(attributes_float4, corners[2] + desc.offset); - f3 = kernel_data_fetch(attributes_float4, corners[3] + desc.offset); + if (dx) + *dx = zero_float4(); + if (dy) + *dy = zero_float4(); + + return zero_float4(); } - - if (subd_triangle_patch_num_corners(kg, patch) != 4) { - f1 = (f1 + f0) * 0.5f; - f3 = (f3 + f0) * 0.5f; - } - - float4 a = mix(mix(f0, f1, uv[0].x), mix(f3, f2, uv[0].x), uv[0].y); - float4 b = mix(mix(f0, f1, uv[1].x), mix(f3, f2, uv[1].x), uv[1].y); - float4 c = mix(mix(f0, f1, uv[2].x), mix(f3, f2, uv[2].x), uv[2].y); - -#ifdef __RAY_DIFFERENTIALS__ - if (dx) - *dx = sd->du.dx * b + sd->dv.dx * c - (sd->du.dx + sd->dv.dx) * a; - if (dy) - *dy = sd->du.dy * b + sd->dv.dy * c - (sd->du.dy + sd->dv.dy) * a; -#endif - - return sd->u * b + sd->v * c + (1.0f - sd->u - sd->v) * a; - } - else if (desc.element == ATTR_ELEMENT_OBJECT || desc.element == ATTR_ELEMENT_MESH) { - if (dx) - *dx = zero_float4(); - if (dy) - *dy = zero_float4(); - - return kernel_data_fetch(attributes_float4, desc.offset); - } - else { - if (dx) - *dx = zero_float4(); - if (dy) - *dy = zero_float4(); - - return zero_float4(); - } } CCL_NAMESPACE_END diff --git a/intern/cycles/kernel/integrator/guiding.h b/intern/cycles/kernel/integrator/guiding.h index 0d04963558a..10d7982918a 100644 --- a/intern/cycles/kernel/integrator/guiding.h +++ b/intern/cycles/kernel/integrator/guiding.h @@ -513,7 +513,8 @@ ccl_device_forceinline bool guiding_bsdf_init(KernelGlobals kg, { #if defined(__PATH_GUIDING__) && PATH_GUIDING_LEVEL >= 4 if (kg->opgl_surface_sampling_distribution->Init( - kg->opgl_guiding_field, guiding_point3f(P), rand)) { + kg->opgl_guiding_field, guiding_point3f(P), rand)) + { kg->opgl_surface_sampling_distribution->ApplyCosineProduct(guiding_point3f(N)); return true; } @@ -576,7 +577,8 @@ ccl_device_forceinline bool guiding_phase_init(KernelGlobals kg, } if (kg->opgl_volume_sampling_distribution->Init( - kg->opgl_guiding_field, guiding_point3f(P), rand)) { + kg->opgl_guiding_field, guiding_point3f(P), rand)) + { kg->opgl_volume_sampling_distribution->ApplySingleLobeHenyeyGreensteinProduct(guiding_vec3f(D), g); return true; diff --git a/intern/cycles/kernel/integrator/intersect_volume_stack.h b/intern/cycles/kernel/integrator/intersect_volume_stack.h index bb18d0f4c21..8503a4337bc 100644 --- a/intern/cycles/kernel/integrator/intersect_volume_stack.h +++ b/intern/cycles/kernel/integrator/intersect_volume_stack.h @@ -58,7 +58,8 @@ ccl_device void integrator_volume_stack_update_for_subsurface(KernelGlobals kg, Intersection isect; int step = 0; while (step < 2 * volume_stack_size && - scene_intersect_volume(kg, &volume_ray, &isect, visibility)) { + scene_intersect_volume(kg, &volume_ray, &isect, visibility)) + { /* Ignore self, SSS itself already enters and exits the object. */ if (isect.object != volume_ray.self.object) { shader_setup_from_ray(kg, stack_sd, &volume_ray, &isect); diff --git a/intern/cycles/kernel/integrator/shade_background.h b/intern/cycles/kernel/integrator/shade_background.h index 703bc3abaee..10d4a4c01bd 100644 --- a/intern/cycles/kernel/integrator/shade_background.h +++ b/intern/cycles/kernel/integrator/shade_background.h @@ -110,7 +110,8 @@ ccl_device_inline void integrate_background(KernelGlobals kg, float mis_weight = 1.0f; /* Check if background light exists or if we should skip PDF. */ if (!(INTEGRATOR_STATE(state, path, flag) & PATH_RAY_MIS_SKIP) && - kernel_data.background.use_mis) { + kernel_data.background.use_mis) + { mis_weight = light_sample_mis_weight_forward_background(kg, state, path_flag); } diff --git a/intern/cycles/kernel/integrator/shade_surface.h b/intern/cycles/kernel/integrator/shade_surface.h index e34eb347f13..6ed26dc1eb2 100644 --- a/intern/cycles/kernel/integrator/shade_surface.h +++ b/intern/cycles/kernel/integrator/shade_surface.h @@ -560,7 +560,8 @@ ccl_device_forceinline void integrate_surface_ao(KernelGlobals kg, const uint32_t path_flag = INTEGRATOR_STATE(state, path, flag); if (!(kernel_data.kernel_features & KERNEL_FEATURE_AO_ADDITIVE) && - !(path_flag & PATH_RAY_CAMERA)) { + !(path_flag & PATH_RAY_CAMERA)) + { return; } diff --git a/intern/cycles/kernel/integrator/shade_volume.h b/intern/cycles/kernel/integrator/shade_volume.h index 177f2650875..1b2c884e07a 100644 --- a/intern/cycles/kernel/integrator/shade_volume.h +++ b/intern/cycles/kernel/integrator/shade_volume.h @@ -1212,7 +1212,8 @@ ccl_device void integrator_shade_volume(KernelGlobals kg, # ifdef __SHADOW_LINKING__ if (shadow_linking_schedule_intersection_kernel(kg, - state)) { + state)) + { return; } # endif /* __SHADOW_LINKING__ */ diff --git a/intern/cycles/kernel/integrator/surface_shader.h b/intern/cycles/kernel/integrator/surface_shader.h index 03be2f6d1c1..22e2a56b8b7 100644 --- a/intern/cycles/kernel/integrator/surface_shader.h +++ b/intern/cycles/kernel/integrator/surface_shader.h @@ -167,7 +167,8 @@ ccl_device_inline void surface_shader_prepare_closures(KernelGlobals kg, sc->sample_weight = 0.0f; } else if ((CLOSURE_IS_BSDF_TRANSPARENT(sc->type) && - (filter_closures & FILTER_CLOSURE_TRANSPARENT))) { + (filter_closures & FILTER_CLOSURE_TRANSPARENT))) + { sc->type = CLOSURE_HOLDOUT_ID; sc->sample_weight = 0.0f; sd->flag |= SD_HOLDOUT; diff --git a/intern/cycles/kernel/light/background.h b/intern/cycles/kernel/light/background.h index 984293fa79c..002fa6e4b74 100644 --- a/intern/cycles/kernel/light/background.h +++ b/intern/cycles/kernel/light/background.h @@ -55,7 +55,8 @@ ccl_device float3 background_map_sample(KernelGlobals kg, float2 rand, ccl_priva int middle = first + step; if (kernel_data_fetch(light_background_conditional_cdf, index_v * cdf_width + middle).y < - rand.x) { + rand.x) + { first = middle + 1; count -= step + 1; } diff --git a/intern/cycles/kernel/osl/services.cpp b/intern/cycles/kernel/osl/services.cpp index 93595b0a458..9637fe7ab9d 100644 --- a/intern/cycles/kernel/osl/services.cpp +++ b/intern/cycles/kernel/osl/services.cpp @@ -712,7 +712,8 @@ static bool set_attribute_int(int i, TypeDesc type, bool derivatives, void *val) static bool set_attribute_string(ustring str, TypeDesc type, bool derivatives, void *val) { if (type.basetype == TypeDesc::STRING && type.aggregate == TypeDesc::SCALAR && - type.arraylen == 0) { + type.arraylen == 0) + { ustring *sval = (ustring *)val; sval[0] = str; diff --git a/intern/cycles/kernel/osl/types.h b/intern/cycles/kernel/osl/types.h index 8cb5779961a..d057550a6d9 100644 --- a/intern/cycles/kernel/osl/types.h +++ b/intern/cycles/kernel/osl/types.h @@ -101,11 +101,9 @@ struct ShaderGlobals { int backfacing; }; -struct OSLNoiseOptions { -}; +struct OSLNoiseOptions {}; -struct OSLTextureOptions { -}; +struct OSLTextureOptions {}; #define OSL_TEXTURE_HANDLE_TYPE_IES ((uintptr_t)0x2 << 30) #define OSL_TEXTURE_HANDLE_TYPE_SVM ((uintptr_t)0x1 << 30) diff --git a/intern/cycles/kernel/sample/pattern.h b/intern/cycles/kernel/sample/pattern.h index f02a75edcf6..18b52050242 100644 --- a/intern/cycles/kernel/sample/pattern.h +++ b/intern/cycles/kernel/sample/pattern.h @@ -12,7 +12,7 @@ CCL_NAMESPACE_BEGIN /* Pseudo random numbers, uncomment this for debugging correlations. Only run * this single threaded on a CPU for repeatable results. */ -//#define __DEBUG_CORRELATION__ +// #define __DEBUG_CORRELATION__ /* * The `path_rng_*()` functions below use a shuffled scrambled Sobol diff --git a/intern/cycles/kernel/types.h b/intern/cycles/kernel/types.h index 50713f31357..eea1df19392 100644 --- a/intern/cycles/kernel/types.h +++ b/intern/cycles/kernel/types.h @@ -341,8 +341,8 @@ enum PathRayMNEE { #define SHADOW_CATCHER_VISIBILITY_SHIFT(visibility) ((visibility) << 16) #define SHADOW_CATCHER_PATH_VISIBILITY(path_flag, visibility) \ - (((path_flag)&PATH_RAY_SHADOW_CATCHER_PASS) ? SHADOW_CATCHER_VISIBILITY_SHIFT(visibility) : \ - (visibility)) + (((path_flag) & PATH_RAY_SHADOW_CATCHER_PASS) ? SHADOW_CATCHER_VISIBILITY_SHIFT(visibility) : \ + (visibility)) #define SHADOW_CATCHER_OBJECT_VISIBILITY(is_shadow_catcher, visibility) \ (((is_shadow_catcher) ? SHADOW_CATCHER_VISIBILITY_SHIFT(visibility) : 0) | (visibility)) @@ -648,7 +648,8 @@ typedef enum PrimitiveType { } PrimitiveType; /* Convert type to index in range 0..PRIMITIVE_NUM-1. */ -#define PRIMITIVE_INDEX(type) (bitscan((uint32_t)(type)) * 2 + (((type)&PRIMITIVE_MOTION) ? 1 : 0)) +#define PRIMITIVE_INDEX(type) \ + (bitscan((uint32_t)(type)) * 2 + (((type) & PRIMITIVE_MOTION) ? 1 : 0)) /* Pack segment into type value to save space. */ #define PRIMITIVE_PACK_SEGMENT(type, segment) ((segment << PRIMITIVE_NUM_BITS) | (type)) diff --git a/intern/cycles/kernel/util/nanovdb.h b/intern/cycles/kernel/util/nanovdb.h index 6073eb1266e..2a73adaf0cd 100644 --- a/intern/cycles/kernel/util/nanovdb.h +++ b/intern/cycles/kernel/util/nanovdb.h @@ -236,8 +236,7 @@ template struct alignas(NANOVDB_DATA_ALIGNMENT) LeafFnBase { /* LeafData */ -class Fp16 { -}; +class Fp16 {}; template struct alignas(NANOVDB_DATA_ALIGNMENT) LeafData { using ValueType = float; @@ -254,8 +253,7 @@ template struct alignas(NANOVDB_DATA_ALIGNMENT) LeafData */ -class FpN { -}; +class FpN {}; template struct alignas(NANOVDB_DATA_ALIGNMENT) LeafData { using ValueType = float; diff --git a/intern/cycles/kernel/util/profiling.h b/intern/cycles/kernel/util/profiling.h index 69b3fbcaf7a..54a90e836da 100644 --- a/intern/cycles/kernel/util/profiling.h +++ b/intern/cycles/kernel/util/profiling.h @@ -17,7 +17,7 @@ CCL_NAMESPACE_BEGIN # define PROFILING_INIT_FOR_SHADER(kg, event) \ ProfilingWithShaderHelper profiling_helper((ProfilingState *)&kg->profiler, event) # define PROFILING_SHADER(object, shader) \ - profiling_helper.set_shader(object, (shader)&SHADER_MASK); + profiling_helper.set_shader(object, (shader) & SHADER_MASK); #else # define PROFILING_INIT(kg, event) # define PROFILING_EVENT(event) diff --git a/intern/cycles/scene/alembic.h b/intern/cycles/scene/alembic.h index 1d751484ac5..1234df8f9fd 100644 --- a/intern/cycles/scene/alembic.h +++ b/intern/cycles/scene/alembic.h @@ -32,11 +32,9 @@ struct MatrixSamplesData { }; /* Helpers to detect if some type is a `ccl::array`. */ -template struct is_array : public std::false_type { -}; +template struct is_array : public std::false_type {}; -template struct is_array> : public std::true_type { -}; +template struct is_array> : public std::true_type {}; /* Holds the data for a cache lookup at a given time, as well as information to * help disambiguate successes or failures to get data from the cache. */ diff --git a/intern/cycles/scene/geometry_attributes.cpp b/intern/cycles/scene/geometry_attributes.cpp index 558455b9f3c..dccf0637853 100644 --- a/intern/cycles/scene/geometry_attributes.cpp +++ b/intern/cycles/scene/geometry_attributes.cpp @@ -390,7 +390,8 @@ void GeometryManager::update_attribute_element_offset(Geometry *geom, if (geom->is_mesh()) { Mesh *mesh = static_cast(geom); if (mesh->subdivision_type == Mesh::SUBDIVISION_CATMULL_CLARK && - desc.flags & ATTR_SUBDIVIDED) { + desc.flags & ATTR_SUBDIVIDED) + { /* Indices for subdivided attributes are retrieved * from patch table so no need for correction here. */ } diff --git a/intern/cycles/scene/image.cpp b/intern/cycles/scene/image.cpp index 6ab6aba9e73..38dbdff8e3e 100644 --- a/intern/cycles/scene/image.cpp +++ b/intern/cycles/scene/image.cpp @@ -620,7 +620,8 @@ bool ImageManager::file_load_image(Image *img, int texture_limit) } if (img->metadata.colorspace != u_colorspace_raw && - img->metadata.colorspace != u_colorspace_srgb) { + img->metadata.colorspace != u_colorspace_srgb) + { /* Convert to scene linear. */ ColorSpaceManager::to_scene_linear( img->metadata.colorspace, pixels, num_pixels, is_rgba, img->metadata.compress_as_srgb); @@ -635,7 +636,8 @@ bool ImageManager::file_load_image(Image *img, int texture_limit) for (size_t i = 0; i < num_pixels; i += 4) { StorageType *pixel = &pixels[i * 4]; if (!isfinite(pixel[0]) || !isfinite(pixel[1]) || !isfinite(pixel[2]) || - !isfinite(pixel[3])) { + !isfinite(pixel[3])) + { pixel[0] = 0; pixel[1] = 0; pixel[2] = 0; diff --git a/intern/cycles/scene/pass.cpp b/intern/cycles/scene/pass.cpp index 42335e21f63..062d7cbb3d3 100644 --- a/intern/cycles/scene/pass.cpp +++ b/intern/cycles/scene/pass.cpp @@ -386,7 +386,8 @@ const Pass *Pass::find(const vector &passes, { for (const Pass *pass : passes) { if (pass->get_type() != type || pass->get_mode() != mode || - pass->get_lightgroup() != lightgroup) { + pass->get_lightgroup() != lightgroup) + { continue; } return pass; diff --git a/intern/cycles/session/denoising.cpp b/intern/cycles/session/denoising.cpp index 531f89dc6e0..d4f14ccbe3a 100644 --- a/intern/cycles/session/denoising.cpp +++ b/intern/cycles/session/denoising.cpp @@ -361,7 +361,8 @@ bool DenoiseImage::parse_channels(const ImageSpec &in_spec, string &error) /* Loop over all detected RenderLayers, check whether they contain a full set of input channels. * Any channels that won't be processed internally are also passed through. */ for (map::iterator i = file_layers.begin(); i != file_layers.end(); - ++i) { + ++i) + { const string &name = i->first; DenoiseImageLayer &layer = i->second; diff --git a/intern/cycles/session/merge.cpp b/intern/cycles/session/merge.cpp index c3b59f39f9a..e4837714366 100644 --- a/intern/cycles/session/merge.cpp +++ b/intern/cycles/session/merge.cpp @@ -157,7 +157,8 @@ static bool parse_channels(const ImageSpec &in_spec, string layername, channelname; if (parse_channel_name( - pass.channel_name, layername, pass.name, channelname, multiview_channels)) { + pass.channel_name, layername, pass.name, channelname, multiview_channels)) + { /* Channel part of a render layer. */ pass.op = parse_channel_operation(pass.name); } @@ -459,7 +460,8 @@ static bool merge_pixels(const vector &images, case MERGE_CHANNEL_SAMPLES: { const auto &samples = layer_samples.at(layer.name); for (size_t i = 0; offset < num_pixels; - offset += stride, out_offset += out_stride, i++) { + offset += stride, out_offset += out_stride, i++) + { out_pixels[out_offset] = 1.0f * samples.per_pixel[i] / samples.total; } break; diff --git a/intern/cycles/util/path.cpp b/intern/cycles/util/path.cpp index c6e82c1da8e..373b33f838d 100644 --- a/intern/cycles/util/path.cpp +++ b/intern/cycles/util/path.cpp @@ -49,7 +49,7 @@ typedef struct _stati64 path_stat_t; typedef struct _stat path_stat_t; # endif # ifndef S_ISDIR -# define S_ISDIR(x) (((x)&_S_IFDIR) == _S_IFDIR) +# define S_ISDIR(x) (((x) & _S_IFDIR) == _S_IFDIR) # endif #else typedef struct stat path_stat_t; diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index f3a3db6bcef..a45c505d4cb 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -36,12 +36,12 @@ typedef unsigned char uchar; typedef struct name##__ { \ int unused; \ MEM_CXX_CLASS_ALLOC_FUNCS(#name) \ - } * name + } *name #else # define GHOST_DECLARE_HANDLE(name) \ typedef struct name##__ { \ int unused; \ - } * name + } *name #endif /** diff --git a/intern/ghost/intern/GHOST_Context.hh b/intern/ghost/intern/GHOST_Context.hh index acd22d426a8..0f20a4f3384 100644 --- a/intern/ghost/intern/GHOST_Context.hh +++ b/intern/ghost/intern/GHOST_Context.hh @@ -201,7 +201,7 @@ bool win32_chk(bool result, const char *file = nullptr, int line = 0, const char bool win32_silent_chk(bool result); # ifndef NDEBUG -# define WIN32_CHK(x) win32_chk((x), __FILE__, __LINE__, # x) +# define WIN32_CHK(x) win32_chk((x), __FILE__, __LINE__, #x) # else # define WIN32_CHK(x) win32_chk(x) # endif diff --git a/intern/ghost/intern/GHOST_ContextEGL.cc b/intern/ghost/intern/GHOST_ContextEGL.cc index 38d18030223..a68e91e185b 100644 --- a/intern/ghost/intern/GHOST_ContextEGL.cc +++ b/intern/ghost/intern/GHOST_ContextEGL.cc @@ -147,7 +147,7 @@ static bool egl_chk(bool result, } #ifndef NDEBUG -# define EGL_CHK(x) egl_chk((x), __FILE__, __LINE__, # x) +# define EGL_CHK(x) egl_chk((x), __FILE__, __LINE__, #x) #else # define EGL_CHK(x) egl_chk(x) #endif @@ -475,7 +475,8 @@ GHOST_TSuccess GHOST_ContextEGL::initializeDrawingContext() attrib_list.clear(); if (epoxy_egl_version(m_display) >= 15 || - epoxy_has_egl_extension(m_display, "KHR_create_context")) { + epoxy_has_egl_extension(m_display, "KHR_create_context")) + { if (m_api == EGL_OPENGL_API || m_api == EGL_OPENGL_ES_API) { if (m_contextMajorVersion != 0) { attrib_list.push_back(EGL_CONTEXT_MAJOR_VERSION_KHR); diff --git a/intern/ghost/intern/GHOST_ContextWGL.hh b/intern/ghost/intern/GHOST_ContextWGL.hh index a95fb530baf..12458e33326 100644 --- a/intern/ghost/intern/GHOST_ContextWGL.hh +++ b/intern/ghost/intern/GHOST_ContextWGL.hh @@ -8,7 +8,7 @@ #pragma once -//#define WIN32_COMPOSITING +// #define WIN32_COMPOSITING #include "GHOST_Context.hh" diff --git a/intern/ghost/intern/GHOST_SystemCocoa.hh b/intern/ghost/intern/GHOST_SystemCocoa.hh index da1813a88ad..2efedc6245b 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.hh +++ b/intern/ghost/intern/GHOST_SystemCocoa.hh @@ -13,7 +13,7 @@ # error Apple OSX only! #endif // __APPLE__ -//#define __CARBONSOUND__ +// #define __CARBONSOUND__ #include "GHOST_System.hh" diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index be0d7d903e9..35dbdf56208 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -2047,7 +2047,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr) false)); } if ((modifiers & NSEventModifierFlagControl) != - (m_modifierMask & NSEventModifierFlagControl)) { + (m_modifierMask & NSEventModifierFlagControl)) + { pushEvent(new GHOST_EventKey( [event timestamp] * 1000, (modifiers & NSEventModifierFlagControl) ? GHOST_kEventKeyDown : GHOST_kEventKeyUp, @@ -2065,7 +2066,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr) false)); } if ((modifiers & NSEventModifierFlagCommand) != - (m_modifierMask & NSEventModifierFlagCommand)) { + (m_modifierMask & NSEventModifierFlagCommand)) + { pushEvent(new GHOST_EventKey( [event timestamp] * 1000, (modifiers & NSEventModifierFlagCommand) ? GHOST_kEventKeyDown : GHOST_kEventKeyUp, diff --git a/intern/ghost/intern/GHOST_SystemWayland.cc b/intern/ghost/intern/GHOST_SystemWayland.cc index dc757037116..9657154727a 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cc +++ b/intern/ghost/intern/GHOST_SystemWayland.cc @@ -4644,7 +4644,8 @@ static void keyboard_handle_keymap(void *data, if (seat->xkb.state_empty_with_shift) { seat->xkb_use_non_latin_workaround = true; for (xkb_keycode_t key_code = KEY_1 + EVDEV_OFFSET; key_code <= KEY_0 + EVDEV_OFFSET; - key_code++) { + key_code++) + { const xkb_keysym_t sym_test = xkb_state_key_get_one_sym(seat->xkb.state_empty_with_shift, key_code); if (!(sym_test >= XKB_KEY_0 && sym_test <= XKB_KEY_9)) { @@ -8534,7 +8535,8 @@ bool GHOST_SystemWayland::window_cursor_grab_set(const GHOST_TGrabCursorMode mod } else if (mode_current == GHOST_kGrabHide) { if ((init_grab_xy[0] != seat->grab_lock_xy[0]) || - (init_grab_xy[1] != seat->grab_lock_xy[1])) { + (init_grab_xy[1] != seat->grab_lock_xy[1])) + { const wl_fixed_t xy_next[2] = { gwl_window_scale_wl_fixed_from(scale_params, wl_fixed_from_int(init_grab_xy[0])), gwl_window_scale_wl_fixed_from(scale_params, wl_fixed_from_int(init_grab_xy[1])), diff --git a/intern/ghost/intern/GHOST_SystemWin32.cc b/intern/ghost/intern/GHOST_SystemWin32.cc index a38e25719a7..d52f241a496 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cc +++ b/intern/ghost/intern/GHOST_SystemWin32.cc @@ -964,7 +964,8 @@ void GHOST_SystemWin32::processWintabEvent(GHOST_WindowWin32 *window) * event queue. */ MSG msg; if (PeekMessage(&msg, window->getHWND(), message, message, PM_NOYIELD) && - msg.message != WM_QUIT) { + msg.message != WM_QUIT) + { /* Test for Win32/Wintab button down match. */ useWintabPos = wt->testCoordinates(msg.pt.x, msg.pt.y, info.x, info.y); @@ -1283,7 +1284,8 @@ GHOST_EventKey *GHOST_SystemWin32::processKeyEvent(GHOST_WindowWin32 *window, RA /* TODO: #ToUnicodeEx can respond with up to 4 utf16 chars (only 2 here). * Could be up to 24 utf8 bytes. */ if ((r = ToUnicodeEx( - vk, raw.data.keyboard.MakeCode, state, utf16, 2, 0, system->m_keylayout))) { + vk, raw.data.keyboard.MakeCode, state, utf16, 2, 0, system->m_keylayout))) + { if ((r > 0 && r < 3)) { utf16[r] = 0; conv_utf_16_to_8(utf16, utf8_char, 6); diff --git a/intern/ghost/intern/GHOST_SystemX11.cc b/intern/ghost/intern/GHOST_SystemX11.cc index c92a315b6d5..66e1d1d81ac 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cc +++ b/intern/ghost/intern/GHOST_SystemX11.cc @@ -638,7 +638,8 @@ bool GHOST_SystemX11::processEvents(bool waitForEvent) } else if (xevent.type == KeyPress) { if ((xevent.xkey.keycode == m_last_release_keycode) && - (xevent.xkey.time <= m_last_release_time)) { + (xevent.xkey.time <= m_last_release_time)) + { continue; } } @@ -1149,7 +1150,8 @@ void GHOST_SystemX11::processEvent(XEvent *xe) /* Use utf8 because its not locale repentant, from XORG docs. */ if (!(len = Xutf8LookupString( - xic, xke, utf8_buf, sizeof(utf8_array) - 5, &key_sym, &status))) { + xic, xke, utf8_buf, sizeof(utf8_array) - 5, &key_sym, &status))) + { utf8_buf[0] = '\0'; } diff --git a/intern/ghost/intern/GHOST_WindowWayland.cc b/intern/ghost/intern/GHOST_WindowWayland.cc index d2de09bf728..07787f0e66f 100644 --- a/intern/ghost/intern/GHOST_WindowWayland.cc +++ b/intern/ghost/intern/GHOST_WindowWayland.cc @@ -1276,7 +1276,8 @@ static void libdecor_frame_handle_configure(libdecor_frame *frame, win->frame.buffer_scale; const int scale_as_fractional = scale * FRACTIONAL_DENOMINATOR; if (libdecor_configuration_get_content_size( - configuration, frame, &size_next[0], &size_next[1])) { + configuration, frame, &size_next[0], &size_next[1])) + { if (fractional_scale) { frame_pending.size[0] = gwl_window_fractional_to_viewport_round(win->frame, size_next[0]); frame_pending.size[1] = gwl_window_fractional_to_viewport_round(win->frame, size_next[1]); diff --git a/intern/ghost/intern/GHOST_WindowWin32.cc b/intern/ghost/intern/GHOST_WindowWin32.cc index d1af0ae01af..d6c5e184705 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cc +++ b/intern/ghost/intern/GHOST_WindowWin32.cc @@ -541,7 +541,8 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state) case GHOST_kWindowStateNormal: default: if (curstate == GHOST_kWindowStateFullScreen && - m_normal_state == GHOST_kWindowStateMaximized) { + m_normal_state == GHOST_kWindowStateMaximized) + { wp.showCmd = SW_SHOWMAXIMIZED; m_normal_state = GHOST_kWindowStateNormal; } diff --git a/intern/ghost/intern/GHOST_WindowX11.cc b/intern/ghost/intern/GHOST_WindowX11.cc index 0c643ca4e3d..76968e7daa6 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cc +++ b/intern/ghost/intern/GHOST_WindowX11.cc @@ -638,7 +638,7 @@ int GHOST_WindowX11::icccmGetState() const struct { CARD32 state; XID icon; - } * prop_ret; + } *prop_ret; ulong bytes_after, num_ret; Atom type_ret; int ret, format_ret; diff --git a/intern/ghost/intern/GHOST_XrContext.cc b/intern/ghost/intern/GHOST_XrContext.cc index aa527dcc563..68610239592 100644 --- a/intern/ghost/intern/GHOST_XrContext.cc +++ b/intern/ghost/intern/GHOST_XrContext.cc @@ -554,7 +554,8 @@ void GHOST_XrContext::drawSessionViews(void *draw_customdata) void GHOST_XrContext::handleSessionStateChange(const XrEventDataSessionStateChanged &lifecycle) { if (m_session && - m_session->handleStateChangeEvent(lifecycle) == GHOST_XrSession::SESSION_DESTROY) { + m_session->handleStateChangeEvent(lifecycle) == GHOST_XrSession::SESSION_DESTROY) + { m_session = nullptr; } } diff --git a/intern/guardedalloc/intern/mallocn_guarded_impl.c b/intern/guardedalloc/intern/mallocn_guarded_impl.c index 8d2fc904b73..acd47ed5ad2 100644 --- a/intern/guardedalloc/intern/mallocn_guarded_impl.c +++ b/intern/guardedalloc/intern/mallocn_guarded_impl.c @@ -37,13 +37,13 @@ * but this introduces some overhead to memory header and makes * things slower a bit, so better to keep disabled by default */ -//#define DEBUG_MEMDUPLINAME +// #define DEBUG_MEMDUPLINAME /* Only for debugging: * lets you count the allocations so as to find the allocator of unfreed memory * in situations where the leak is predictable */ -//#define DEBUG_MEMCOUNTER +// #define DEBUG_MEMCOUNTER /* Only for debugging: * Defining DEBUG_BACKTRACE will display a back-trace from where memory block was allocated and diff --git a/intern/iksolver/intern/IK_QJacobianSolver.cpp b/intern/iksolver/intern/IK_QJacobianSolver.cpp index 4978e2f83e0..35b2f49003b 100644 --- a/intern/iksolver/intern/IK_QJacobianSolver.cpp +++ b/intern/iksolver/intern/IK_QJacobianSolver.cpp @@ -10,7 +10,7 @@ #include "IK_QJacobianSolver.h" -//#include "analyze.h" +// #include "analyze.h" IK_QJacobianSolver::IK_QJacobianSolver() { m_poleconstraint = false; diff --git a/intern/libmv/intern/stub.cc b/intern/libmv/intern/stub.cc index 30d25fc3512..456ab74234d 100644 --- a/intern/libmv/intern/stub.cc +++ b/intern/libmv/intern/stub.cc @@ -303,8 +303,8 @@ void libmv_cameraIntrinsicsInvert( *y1 = 0.0; } -void libmv_homography2DFromCorrespondencesEuc(/* const */ double (*/*x1*/)[2], - /* const */ double (*/*x2*/)[2], +void libmv_homography2DFromCorrespondencesEuc(/* const */ double (* /*x1*/)[2], + /* const */ double (* /*x2*/)[2], int /*num_points*/, double H[3][3]) { memset(H, 0, sizeof(double[3][3])); diff --git a/intern/libmv/libmv/simple_pipeline/detect.cc b/intern/libmv/libmv/simple_pipeline/detect.cc index a67d139a957..e22c0785166 100644 --- a/intern/libmv/libmv/simple_pipeline/detect.cc +++ b/intern/libmv/libmv/simple_pipeline/detect.cc @@ -257,7 +257,7 @@ void DetectMORAVEC(const FloatImage& grayscale_image, histogram[s]--; } c[0] = score, histogram[score]++; - nonmax : {} // Do nothing. + nonmax: {} // Do nothing. } } int min = 255, total = 0; diff --git a/intern/opensubdiv/internal/evaluator/shaders/glsl_compute_kernel.glsl b/intern/opensubdiv/internal/evaluator/shaders/glsl_compute_kernel.glsl index 2f60aee0999..952c65bc919 100644 --- a/intern/opensubdiv/internal/evaluator/shaders/glsl_compute_kernel.glsl +++ b/intern/opensubdiv/internal/evaluator/shaders/glsl_compute_kernel.glsl @@ -40,7 +40,7 @@ layout(binding = 1) buffer dst_buffer float dstVertexBuffer[]; }; - // derivative buffers (if needed) +// derivative buffers (if needed) #if defined(OPENSUBDIV_GLSL_COMPUTE_USE_1ST_DERIVATIVES) uniform ivec3 duDesc; @@ -73,7 +73,7 @@ layout(binding = 12) buffer dvv_buffer }; #endif - // stencil buffers +// stencil buffers #if defined(OPENSUBDIV_GLSL_COMPUTE_KERNEL_EVAL_STENCILS) diff --git a/intern/opensubdiv/internal/topology/mesh_topology_compare.cc b/intern/opensubdiv/internal/topology/mesh_topology_compare.cc index 8ec27261202..3098ffd6517 100644 --- a/intern/opensubdiv/internal/topology/mesh_topology_compare.cc +++ b/intern/opensubdiv/internal/topology/mesh_topology_compare.cc @@ -178,7 +178,8 @@ bool isEqualEdgeTags(const MeshTopology &mesh_topology, const OpenSubdiv_Convert int requested_edge_vertices[2]; converter->getEdgeVertices(converter, edge_index, requested_edge_vertices); if (!mesh_topology.isEdgeEqual( - edge_index, requested_edge_vertices[0], requested_edge_vertices[1])) { + edge_index, requested_edge_vertices[0], requested_edge_vertices[1])) + { return false; } } diff --git a/intern/opensubdiv/internal/topology/topology_refiner_impl.h b/intern/opensubdiv/internal/topology/topology_refiner_impl.h index 87700a30bd2..8b4d01456c6 100644 --- a/intern/opensubdiv/internal/topology/topology_refiner_impl.h +++ b/intern/opensubdiv/internal/topology/topology_refiner_impl.h @@ -64,7 +64,6 @@ class TopologyRefinerImpl { } // namespace opensubdiv } // namespace blender -struct OpenSubdiv_TopologyRefinerImpl : public blender::opensubdiv::TopologyRefinerImpl { -}; +struct OpenSubdiv_TopologyRefinerImpl : public blender::opensubdiv::TopologyRefinerImpl {}; #endif // OPENSUBDIV_TOPOLOGY_REFINER_IMPL_H_ diff --git a/intern/rigidbody/RBI_hull_api.h b/intern/rigidbody/RBI_hull_api.h index 89118e8a9da..7f7eb676536 100644 --- a/intern/rigidbody/RBI_hull_api.h +++ b/intern/rigidbody/RBI_hull_api.h @@ -15,7 +15,7 @@ extern "C" { typedef struct plConvexHull__ { int unused; -} * plConvexHull; +} *plConvexHull; plConvexHull plConvexHullCompute(float (*coords)[3], int count); void plConvexHullDelete(plConvexHull hull); diff --git a/source/blender/asset_system/AS_asset_catalog.hh b/source/blender/asset_system/AS_asset_catalog.hh index 12cdc832758..2c8ccf82a21 100644 --- a/source/blender/asset_system/AS_asset_catalog.hh +++ b/source/blender/asset_system/AS_asset_catalog.hh @@ -52,8 +52,7 @@ class AssetCatalogService { public: static const CatalogFilePath DEFAULT_CATALOG_FILENAME; - struct read_only_tag { - }; + struct read_only_tag {}; public: AssetCatalogService(); diff --git a/source/blender/asset_system/intern/asset_catalog.cc b/source/blender/asset_system/intern/asset_catalog.cc index e779f7086b9..1ea12295414 100644 --- a/source/blender/asset_system/intern/asset_catalog.cc +++ b/source/blender/asset_system/intern/asset_catalog.cc @@ -501,7 +501,8 @@ bool AssetCatalogService::write_to_disk_ex(const CatalogFilePath &blend_file_pat } if (catalog_collection_->catalogs_.is_empty() && - catalog_collection_->deleted_catalogs_.is_empty()) { + catalog_collection_->deleted_catalogs_.is_empty()) + { /* Avoid saving anything, when there is nothing to save. */ return true; /* Writing nothing when there is nothing to write is still a success. */ } diff --git a/source/blender/asset_system/intern/asset_library_service.cc b/source/blender/asset_system/intern/asset_library_service.cc index 161cd59c01a..cdf17a843da 100644 --- a/source/blender/asset_system/intern/asset_library_service.cc +++ b/source/blender/asset_system/intern/asset_library_service.cc @@ -32,7 +32,7 @@ * Should be addressed with a proper ownership model for the asset system: * https://wiki.blender.org/wiki/Source/Architecture/Asset_System/Back_End#Ownership_Model */ -//#define WITH_DESTROY_VIA_LOAD_HANDLER +// #define WITH_DESTROY_VIA_LOAD_HANDLER static CLG_LogRef LOG = {"asset_system.asset_library_service"}; @@ -309,7 +309,8 @@ int64_t AssetLibraryService::rfind_blendfile_extension(StringRef path) } if ((blendfile_extension_pos == StringRef::not_found) || - (blendfile_extension_pos < iter_ext_pos)) { + (blendfile_extension_pos < iter_ext_pos)) + { blendfile_extension_pos = iter_ext_pos; } } diff --git a/source/blender/asset_system/tests/asset_catalog_tree_test.cc b/source/blender/asset_system/tests/asset_catalog_tree_test.cc index dda2bae4d7c..0e799024390 100644 --- a/source/blender/asset_system/tests/asset_catalog_tree_test.cc +++ b/source/blender/asset_system/tests/asset_catalog_tree_test.cc @@ -70,8 +70,7 @@ void AssetCatalogTreeTestFunctions::expect_tree_item_child_items( }); } -class AssetCatalogTreeTest : public AssetLibraryTestBase, public AssetCatalogTreeTestFunctions { -}; +class AssetCatalogTreeTest : public AssetLibraryTestBase, public AssetCatalogTreeTestFunctions {}; TEST_F(AssetCatalogTreeTest, insert_item_into_tree) { diff --git a/source/blender/blenfont/intern/blf_glyph.cc b/source/blender/blenfont/intern/blf_glyph.cc index 0f4e4a63c8e..1f5e4368d8d 100644 --- a/source/blender/blenfont/intern/blf_glyph.cc +++ b/source/blender/blenfont/intern/blf_glyph.cc @@ -296,7 +296,8 @@ static GlyphBLF *blf_glyph_cache_add_glyph(FontBLF *font, if (ELEM(glyph->bitmap.pixel_mode, FT_PIXEL_MODE_GRAY, FT_PIXEL_MODE_GRAY2, - FT_PIXEL_MODE_GRAY4)) { + FT_PIXEL_MODE_GRAY4)) + { /* Scale 1, 2, 4-bit gray to 8-bit. */ const char scale = char(255 / (glyph->bitmap.num_grays - 1)); for (int i = 0; i < buffer_size; i++) { @@ -1662,7 +1663,8 @@ static void blf_glyph_to_curves(FT_Outline ftoutline, ListBase *nurbsbase, const { const int l_next = (k < n - 1) ? (l + 1) : l_first; if (ftoutline.tags[l] == FT_Curve_Tag_Conic && - ftoutline.tags[l_next] == FT_Curve_Tag_Conic) { + ftoutline.tags[l_next] == FT_Curve_Tag_Conic) + { onpoints[j]++; } } @@ -1697,7 +1699,8 @@ static void blf_glyph_to_curves(FT_Outline ftoutline, ListBase *nurbsbase, const { const int l_next = (k < n - 1) ? (l + 1) : l_first; if (ftoutline.tags[l] == FT_Curve_Tag_Conic && - ftoutline.tags[l_next] == FT_Curve_Tag_Conic) { + ftoutline.tags[l_next] == FT_Curve_Tag_Conic) + { dx = float(ftoutline.points[l].x + ftoutline.points[l_next].x) * scale / 2.0f; dy = float(ftoutline.points[l].y + ftoutline.points[l_next].y) * scale / 2.0f; diff --git a/source/blender/blenkernel/BKE_cloth.hh b/source/blender/blenkernel/BKE_cloth.hh index c17ce880194..424226a8f41 100644 --- a/source/blender/blenkernel/BKE_cloth.hh +++ b/source/blender/blenkernel/BKE_cloth.hh @@ -140,42 +140,42 @@ struct ClothSpring { /* Some macro enhancements for vector treatment. */ #define VECSUBADDSS(v1, v2, aS, v3, bS) \ { \ - *(v1) -= *(v2)*aS + *(v3)*bS; \ + *(v1) -= *(v2) * aS + *(v3) * bS; \ *(v1 + 1) -= *(v2 + 1) * aS + *(v3 + 1) * bS; \ *(v1 + 2) -= *(v2 + 2) * aS + *(v3 + 2) * bS; \ } \ ((void)0) #define VECADDSS(v1, v2, aS, v3, bS) \ { \ - *(v1) = *(v2)*aS + *(v3)*bS; \ + *(v1) = *(v2) * aS + *(v3) * bS; \ *(v1 + 1) = *(v2 + 1) * aS + *(v3 + 1) * bS; \ *(v1 + 2) = *(v2 + 2) * aS + *(v3 + 2) * bS; \ } \ ((void)0) #define VECADDS(v1, v2, v3, bS) \ { \ - *(v1) = *(v2) + *(v3)*bS; \ + *(v1) = *(v2) + *(v3) * bS; \ *(v1 + 1) = *(v2 + 1) + *(v3 + 1) * bS; \ *(v1 + 2) = *(v2 + 2) + *(v3 + 2) * bS; \ } \ ((void)0) #define VECSUBMUL(v1, v2, aS) \ { \ - *(v1) -= *(v2)*aS; \ + *(v1) -= *(v2) * aS; \ *(v1 + 1) -= *(v2 + 1) * aS; \ *(v1 + 2) -= *(v2 + 2) * aS; \ } \ ((void)0) #define VECSUBS(v1, v2, v3, bS) \ { \ - *(v1) = *(v2) - *(v3)*bS; \ + *(v1) = *(v2) - *(v3) * bS; \ *(v1 + 1) = *(v2 + 1) - *(v3 + 1) * bS; \ *(v1 + 2) = *(v2 + 2) - *(v3 + 2) * bS; \ } \ ((void)0) #define VECADDMUL(v1, v2, aS) \ { \ - *(v1) += *(v2)*aS; \ + *(v1) += *(v2) * aS; \ *(v1 + 1) += *(v2 + 1) * aS; \ *(v1 + 2) += *(v2 + 2) * aS; \ } \ diff --git a/source/blender/blenkernel/BKE_context.hh b/source/blender/blenkernel/BKE_context.hh index 939b5d3cd82..5f32fdeff5a 100644 --- a/source/blender/blenkernel/BKE_context.hh +++ b/source/blender/blenkernel/BKE_context.hh @@ -320,7 +320,8 @@ bool CTX_data_dir(const char *member); CollectionPointerLink *ctx_link; \ CTX_data_##member(C, &ctx_data_list); \ for (ctx_link = (CollectionPointerLink *)ctx_data_list.first; ctx_link; \ - ctx_link = ctx_link->next) { \ + ctx_link = ctx_link->next) \ + { \ Type instance = (Type)ctx_link->ptr.data; #define CTX_DATA_END \ diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h index f86d82b082c..59b15f6830a 100644 --- a/source/blender/blenkernel/BKE_idprop.h +++ b/source/blender/blenkernel/BKE_idprop.h @@ -265,15 +265,25 @@ void IDP_Reset(struct IDProperty *prop, const struct IDProperty *reference); /* C11 const correctness for casts */ #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) # define IDP_Float(prop) \ - _Generic((prop), struct IDProperty * : (*(float *)&(prop)->data.val), const struct IDProperty * : (*(const float *)&(prop)->data.val)) + _Generic((prop), \ + struct IDProperty *: (*(float *)&(prop)->data.val), \ + const struct IDProperty *: (*(const float *)&(prop)->data.val)) # define IDP_Double(prop) \ - _Generic((prop), struct IDProperty * : (*(double *)&(prop)->data.val), const struct IDProperty * : (*(const double *)&(prop)->data.val)) + _Generic((prop), \ + struct IDProperty *: (*(double *)&(prop)->data.val), \ + const struct IDProperty *: (*(const double *)&(prop)->data.val)) # define IDP_String(prop) \ - _Generic((prop), struct IDProperty * : ((char *)(prop)->data.pointer), const struct IDProperty * : ((const char *)(prop)->data.pointer)) + _Generic((prop), \ + struct IDProperty *: ((char *)(prop)->data.pointer), \ + const struct IDProperty *: ((const char *)(prop)->data.pointer)) # define IDP_IDPArray(prop) \ - _Generic((prop), struct IDProperty * : ((struct IDProperty *)(prop)->data.pointer), const struct IDProperty * : ((const struct IDProperty *)(prop)->data.pointer)) + _Generic((prop), \ + struct IDProperty *: ((struct IDProperty *)(prop)->data.pointer), \ + const struct IDProperty *: ((const struct IDProperty *)(prop)->data.pointer)) # define IDP_Id(prop) \ - _Generic((prop), struct IDProperty * : ((ID *)(prop)->data.pointer), const struct IDProperty * : ((const ID *)(prop)->data.pointer)) + _Generic((prop), \ + struct IDProperty *: ((ID *)(prop)->data.pointer), \ + const struct IDProperty *: ((const ID *)(prop)->data.pointer)) #else # define IDP_Float(prop) (*(float *)&(prop)->data.val) # define IDP_Double(prop) (*(double *)&(prop)->data.val) diff --git a/source/blender/blenkernel/BKE_main.hh b/source/blender/blenkernel/BKE_main.hh index 38cdcb2dbe4..714990133dd 100644 --- a/source/blender/blenkernel/BKE_main.hh +++ b/source/blender/blenkernel/BKE_main.hh @@ -472,7 +472,7 @@ const char *BKE_main_blendfile_path_from_global(void); */ ListBase *which_libbase(Main *bmain, short type); -//#define INDEX_ID_MAX 41 +// #define INDEX_ID_MAX 41 /** * Put the pointers to all the #ListBase structs in given `bmain` into the `*lb[INDEX_ID_MAX]` * array, and return the number of those for convenience. diff --git a/source/blender/blenkernel/BKE_mesh_types.hh b/source/blender/blenkernel/BKE_mesh_types.hh index cf659cc6cdd..4cf9c4dae71 100644 --- a/source/blender/blenkernel/BKE_mesh_types.hh +++ b/source/blender/blenkernel/BKE_mesh_types.hh @@ -84,13 +84,11 @@ struct LooseGeomCache { /** * Cache of a mesh's loose edges, accessed with #Mesh::loose_edges(). * */ -struct LooseEdgeCache : public LooseGeomCache { -}; +struct LooseEdgeCache : public LooseGeomCache {}; /** * Cache of a mesh's loose vertices or vertices not used by faces. */ -struct LooseVertCache : public LooseGeomCache { -}; +struct LooseVertCache : public LooseGeomCache {}; struct MeshRuntime { /* Evaluated mesh for objects which do not have effective modifiers. diff --git a/source/blender/blenkernel/BKE_subsurf.hh b/source/blender/blenkernel/BKE_subsurf.hh index 20420afd741..474a7846869 100644 --- a/source/blender/blenkernel/BKE_subsurf.hh +++ b/source/blender/blenkernel/BKE_subsurf.hh @@ -81,18 +81,18 @@ struct CCGDerivedMesh { struct { int startVert; CCGVert *vert; - } * vertMap; + } *vertMap; struct { int startVert; int startEdge; CCGEdge *edge; - } * edgeMap; + } *edgeMap; struct { int startVert; int startEdge; int startFace; CCGFace *face; - } * faceMap; + } *faceMap; int *reverseFaceMap; diff --git a/source/blender/blenkernel/BKE_volume_grid.hh b/source/blender/blenkernel/BKE_volume_grid.hh index dffd0a79564..e608e3f6295 100644 --- a/source/blender/blenkernel/BKE_volume_grid.hh +++ b/source/blender/blenkernel/BKE_volume_grid.hh @@ -57,8 +57,7 @@ class VolumeGridData : public ImplicitSharingMixin { /** * Empty struct that exists so that it can be used as token in #VolumeTreeAccessToken. */ - struct AccessToken { - }; + struct AccessToken {}; /** * A mutex that needs to be locked whenever working with the data members below. diff --git a/source/blender/blenkernel/intern/DerivedMesh.cc b/source/blender/blenkernel/intern/DerivedMesh.cc index f4a0d527e89..e4c58203654 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.cc +++ b/source/blender/blenkernel/intern/DerivedMesh.cc @@ -79,7 +79,7 @@ using blender::bke::GeometrySet; using blender::bke::MeshComponent; /* very slow! enable for testing only! */ -//#define USE_MODIFIER_VALIDATE +// #define USE_MODIFIER_VALIDATE #ifdef USE_MODIFIER_VALIDATE # define ASSERT_IS_VALID_MESH(mesh) \ @@ -674,7 +674,8 @@ static void mesh_calc_modifiers(Depsgraph *depsgraph, } if ((mti->flags & eModifierTypeFlag_RequiresOriginalData) && - have_non_onlydeform_modifiers_applied) { + have_non_onlydeform_modifiers_applied) + { BKE_modifier_set_error(ob, md, "Modifier requires original data, bad stack position"); continue; } @@ -761,7 +762,8 @@ static void mesh_calc_modifiers(Depsgraph *depsgraph, * These are created when either requested by evaluation, or if * following modifiers requested them. */ if (need_mapping || - ((nextmask.vmask | nextmask.emask | nextmask.pmask) & CD_MASK_ORIGINDEX)) { + ((nextmask.vmask | nextmask.emask | nextmask.pmask) & CD_MASK_ORIGINDEX)) + { /* calc */ CustomData_add_layer( &mesh_final->vert_data, CD_ORIGINDEX, CD_CONSTRUCT, mesh_final->verts_num); diff --git a/source/blender/blenkernel/intern/action.cc b/source/blender/blenkernel/intern/action.cc index ef3923fa65f..c60593faae4 100644 --- a/source/blender/blenkernel/intern/action.cc +++ b/source/blender/blenkernel/intern/action.cc @@ -1206,7 +1206,8 @@ void BKE_pose_update_constraint_flags(bPose *pose) { bPoseChannel *chain_bone = chain_tip; for (short index = 0; chain_bone && (data->rootbone == 0 || index < data->rootbone); - index++) { + index++) + { chain_bone->constflag |= PCHAN_INFLUENCED_BY_IK; chain_bone = chain_bone->parent; } diff --git a/source/blender/blenkernel/intern/anim_sys.cc b/source/blender/blenkernel/intern/anim_sys.cc index 5b3434d9a80..aaeca0d81e4 100644 --- a/source/blender/blenkernel/intern/anim_sys.cc +++ b/source/blender/blenkernel/intern/anim_sys.cc @@ -604,7 +604,8 @@ static int animsys_quaternion_evaluate_fcurves(PathResolvedRNA quat_rna, int fcurve_offset = 0; for (; fcurve_offset < 4 && quat_curve_fcu; - ++fcurve_offset, quat_curve_fcu = quat_curve_fcu->next) { + ++fcurve_offset, quat_curve_fcu = quat_curve_fcu->next) + { if (!STREQ(quat_curve_fcu->rna_path, first_fcurve->rna_path)) { /* This should never happen when the quaternion is fully keyed. Some * people do use half-keyed quaternions, though, so better to check. */ diff --git a/source/blender/blenkernel/intern/appdir.cc b/source/blender/blenkernel/intern/appdir.cc index e82e17b2a41..c605a60d693 100644 --- a/source/blender/blenkernel/intern/appdir.cc +++ b/source/blender/blenkernel/intern/appdir.cc @@ -703,28 +703,32 @@ const char *BKE_appdir_folder_id_user_notest(const int folder_id, const char *su switch (folder_id) { case BLENDER_USER_DATAFILES: if (get_path_environment_ex( - path, sizeof(path), subfolder, "BLENDER_USER_DATAFILES", check_is_dir)) { + path, sizeof(path), subfolder, "BLENDER_USER_DATAFILES", check_is_dir)) + { break; } get_path_user_ex(path, sizeof(path), "datafiles", subfolder, version, check_is_dir); break; case BLENDER_USER_CONFIG: if (get_path_environment_ex( - path, sizeof(path), subfolder, "BLENDER_USER_CONFIG", check_is_dir)) { + path, sizeof(path), subfolder, "BLENDER_USER_CONFIG", check_is_dir)) + { break; } get_path_user_ex(path, sizeof(path), "config", subfolder, version, check_is_dir); break; case BLENDER_USER_AUTOSAVE: if (get_path_environment_ex( - path, sizeof(path), subfolder, "BLENDER_USER_AUTOSAVE", check_is_dir)) { + path, sizeof(path), subfolder, "BLENDER_USER_AUTOSAVE", check_is_dir)) + { break; } get_path_user_ex(path, sizeof(path), "autosave", subfolder, version, check_is_dir); break; case BLENDER_USER_SCRIPTS: if (get_path_environment_ex( - path, sizeof(path), subfolder, "BLENDER_USER_SCRIPTS", check_is_dir)) { + path, sizeof(path), subfolder, "BLENDER_USER_SCRIPTS", check_is_dir)) + { break; } get_path_user_ex(path, sizeof(path), "scripts", subfolder, version, check_is_dir); @@ -1053,7 +1057,8 @@ bool BKE_appdir_app_template_has_userpref(const char *app_template) char app_template_path[FILE_MAX]; if (!BKE_appdir_app_template_id_search( - app_template, app_template_path, sizeof(app_template_path))) { + app_template, app_template_path, sizeof(app_template_path))) + { return false; } diff --git a/source/blender/blenkernel/intern/armature_update.cc b/source/blender/blenkernel/intern/armature_update.cc index ee019ecfbf0..6e88fdd01e0 100644 --- a/source/blender/blenkernel/intern/armature_update.cc +++ b/source/blender/blenkernel/intern/armature_update.cc @@ -93,7 +93,8 @@ static void splineik_init_tree_from_pchan(Scene * /*scene*/, /* Find the root bone and the chain of bones from the root to the tip. * NOTE: this assumes that the bones are connected, but that may not be true... */ for (pchan = pchan_tip; pchan && (segcount < ik_data->chainlen); - pchan = pchan->parent, segcount++) { + pchan = pchan->parent, segcount++) + { /* Store this segment in the chain. */ pchan_chain[segcount] = pchan; diff --git a/source/blender/blenkernel/intern/attribute.cc b/source/blender/blenkernel/intern/attribute.cc index 92e5996668c..ddcb7bfe056 100644 --- a/source/blender/blenkernel/intern/attribute.cc +++ b/source/blender/blenkernel/intern/attribute.cc @@ -819,7 +819,8 @@ int BKE_id_attribute_to_index(const ID *id, for (int i = 0; i < customdata->totlayer; i++) { const CustomDataLayer *layer_iter = customdata->layers + i; if (!(layer_mask & CD_TYPE_AS_MASK(layer_iter->type)) || - (layer_iter->flag & CD_FLAG_TEMPORARY)) { + (layer_iter->flag & CD_FLAG_TEMPORARY)) + { continue; } diff --git a/source/blender/blenkernel/intern/bake_items_serialize.cc b/source/blender/blenkernel/intern/bake_items_serialize.cc index 9f0fd27f1bc..fe492147228 100644 --- a/source/blender/blenkernel/intern/bake_items_serialize.cc +++ b/source/blender/blenkernel/intern/bake_items_serialize.cc @@ -1032,7 +1032,8 @@ static std::unique_ptr deserialize_bake_item(const DictionaryValue &io return std::make_unique(io_string.value()); } else if (const io::serialize::DictionaryValue *io_string = - io_data->get()->as_dictionary_value()) { + io_data->get()->as_dictionary_value()) + { const std::optional size = io_string->lookup_int("size"); if (!size) { return {}; diff --git a/source/blender/blenkernel/intern/bake_items_socket.cc b/source/blender/blenkernel/intern/bake_items_socket.cc index ddd30a5da7d..945a4beea1f 100644 --- a/source/blender/blenkernel/intern/bake_items_socket.cc +++ b/source/blender/blenkernel/intern/bake_items_socket.cc @@ -193,7 +193,8 @@ static void rename_attributes(const Span geometries, GeometryComponent &component = geometry->get_component_for_write(type); MutableAttributeAccessor attributes = *component.attributes_for_write(); for (const MapItem &attribute_item : - attribute_map.items()) { + attribute_map.items()) + { attributes.rename(attribute_item.key, *attribute_item.value); } } diff --git a/source/blender/blenkernel/intern/blender_user_menu.cc b/source/blender/blenkernel/intern/blender_user_menu.cc index 3b51f2038b5..4f740bbd6b1 100644 --- a/source/blender/blenkernel/intern/blender_user_menu.cc +++ b/source/blender/blenkernel/intern/blender_user_menu.cc @@ -93,7 +93,8 @@ void BKE_blender_user_menu_item_free(bUserMenuItem *umi) void BKE_blender_user_menu_item_free_list(ListBase *lb) { for (bUserMenuItem *umi = static_cast(lb->first), *umi_next; umi; - umi = umi_next) { + umi = umi_next) + { umi_next = umi->next; BKE_blender_user_menu_item_free(umi); } diff --git a/source/blender/blenkernel/intern/blendfile_link_append.cc b/source/blender/blenkernel/intern/blendfile_link_append.cc index c8cde149366..13d584b33f2 100644 --- a/source/blender/blenkernel/intern/blendfile_link_append.cc +++ b/source/blender/blenkernel/intern/blendfile_link_append.cc @@ -224,7 +224,8 @@ void BKE_blendfile_link_append_context_free(BlendfileLinkAppendContext *lapp_con } for (LinkNode *liblink = lapp_context->libraries.list; liblink != nullptr; - liblink = liblink->next) { + liblink = liblink->next) + { BlendfileLinkAppendContextLibrary *lib_context = static_cast(liblink->link); link_append_context_library_blohandle_release(lapp_context, lib_context); @@ -465,7 +466,8 @@ static bool object_in_any_collection(Main *bmain, Object *ob) LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { if (scene->master_collection != nullptr && - BKE_collection_has_object(scene->master_collection, ob)) { + BKE_collection_has_object(scene->master_collection, ob)) + { return true; } } @@ -1900,7 +1902,8 @@ void BKE_blendfile_library_relocate(BlendfileLinkAppendContext *lapp_context, ID *id; FOREACH_MAIN_ID_BEGIN (bmain, id) { if (ID_IS_LINKED(id) || !ID_IS_OVERRIDE_LIBRARY_REAL(id) || - (id->tag & LIB_TAG_PRE_EXISTING) == 0) { + (id->tag & LIB_TAG_PRE_EXISTING) == 0) + { continue; } if ((id->override_library->reference->tag & LIB_TAG_MISSING) == 0) { diff --git a/source/blender/blenkernel/intern/bpath.cc b/source/blender/blenkernel/intern/bpath.cc index c5e1c69e00d..863544f004f 100644 --- a/source/blender/blenkernel/intern/bpath.cc +++ b/source/blender/blenkernel/intern/bpath.cc @@ -96,7 +96,8 @@ void BKE_bpath_foreach_path_id(BPathForeachPathData *bpath_data, ID *id) } if (id->library_weak_reference != nullptr && - (flag & BKE_BPATH_TRAVERSE_SKIP_WEAK_REFERENCES) == 0) { + (flag & BKE_BPATH_TRAVERSE_SKIP_WEAK_REFERENCES) == 0) + { BKE_bpath_foreach_path_fixed_process(bpath_data, id->library_weak_reference->library_filepath, sizeof(id->library_weak_reference->library_filepath)); @@ -182,7 +183,8 @@ bool BKE_bpath_foreach_path_dirfile_fixed_process(BPathForeachPathData *bpath_da } if (bpath_data->callback_function( - bpath_data, path_dst, sizeof(path_dst), (const char *)path_src)) { + bpath_data, path_dst, sizeof(path_dst), (const char *)path_src)) + { BLI_path_split_dir_file(path_dst, path_dir, path_dir_maxncpy, path_file, path_file_maxncpy); bpath_data->is_path_modified = true; return true; diff --git a/source/blender/blenkernel/intern/collection.cc b/source/blender/blenkernel/intern/collection.cc index baba0e1af2f..e2e3e4ccff8 100644 --- a/source/blender/blenkernel/intern/collection.cc +++ b/source/blender/blenkernel/intern/collection.cc @@ -1655,7 +1655,8 @@ static bool collection_instance_fix_recursive(Collection *parent_collection, LISTBASE_FOREACH (CollectionObject *, collection_object, &parent_collection->gobject) { if (collection_object->ob != nullptr && - collection_object->ob->instance_collection == collection) { + collection_object->ob->instance_collection == collection) + { id_us_min(&collection->id); collection_object->ob->instance_collection = nullptr; cycles_found = true; diff --git a/source/blender/blenkernel/intern/constraint.cc b/source/blender/blenkernel/intern/constraint.cc index 07261330ad3..494708a3018 100644 --- a/source/blender/blenkernel/intern/constraint.cc +++ b/source/blender/blenkernel/intern/constraint.cc @@ -288,7 +288,8 @@ void BKE_constraint_mat_convertspace(Object *ob, if (ELEM(to, CONSTRAINT_SPACE_LOCAL, CONSTRAINT_SPACE_PARLOCAL, - CONSTRAINT_SPACE_OWNLOCAL)) { + CONSTRAINT_SPACE_OWNLOCAL)) + { /* Call self with slightly different values. */ BKE_constraint_mat_convertspace( ob, pchan, cob, mat, CONSTRAINT_SPACE_POSE, to, keep_scale); diff --git a/source/blender/blenkernel/intern/curve.cc b/source/blender/blenkernel/intern/curve.cc index 27227b15d7e..434b95d7a48 100644 --- a/source/blender/blenkernel/intern/curve.cc +++ b/source/blender/blenkernel/intern/curve.cc @@ -4256,7 +4256,8 @@ void BKE_nurbList_handles_set(ListBase *editnurb, while (a--) { const short flag = BKE_nurb_bezt_handle_test_calc_flag(bezt, SELECT, handle_mode); if (((flag & (1 << 0)) && bezt->h1 != HD_FREE) || - ((flag & (1 << 2)) && bezt->h2 != HD_FREE)) { + ((flag & (1 << 2)) && bezt->h2 != HD_FREE)) + { h_new = HD_AUTO; break; } @@ -4879,7 +4880,8 @@ bool BKE_nurb_type_convert(Nurb *nu, bp = nu->bp; while (a--) { if ((type == CU_POLY && bezt->h1 == HD_VECT && bezt->h2 == HD_VECT) || - (use_handles == false)) { + (use_handles == false)) + { /* vector handle becomes one poly vertex */ copy_v3_v3(bp->vec, bezt->vec[1]); bp->vec[3] = 1.0; diff --git a/source/blender/blenkernel/intern/curves_geometry.cc b/source/blender/blenkernel/intern/curves_geometry.cc index 3951b91a101..f054f83514b 100644 --- a/source/blender/blenkernel/intern/curves_geometry.cc +++ b/source/blender/blenkernel/intern/curves_geometry.cc @@ -773,7 +773,8 @@ Span CurvesGeometry::evaluated_tangents() const positions[points.first()]); } if (!math::almost_equal_relative( - handles_left[points.last()], positions[points.last()], epsilon)) { + handles_left[points.last()], positions[points.last()], epsilon)) + { tangents[evaluated_points.last()] = math::normalize(positions[points.last()] - handles_left[points.last()]); } diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index 44e04fdf6f1..beefade6624 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -367,7 +367,8 @@ static void layerCopyValue_normal(const void *source, if (ELEM(mixmode, CDT_MIX_NOMIX, CDT_MIX_REPLACE_ABOVE_THRESHOLD, - CDT_MIX_REPLACE_BELOW_THRESHOLD)) { + CDT_MIX_REPLACE_BELOW_THRESHOLD)) + { /* Above/below threshold modes are not supported here, fallback to nomix (just in case). */ copy_v3_v3(no_dst, no_src); } @@ -813,7 +814,8 @@ static void layerCopyValue_mloopcol(const void *source, if (ELEM(mixmode, CDT_MIX_NOMIX, CDT_MIX_REPLACE_ABOVE_THRESHOLD, - CDT_MIX_REPLACE_BELOW_THRESHOLD)) { + CDT_MIX_REPLACE_BELOW_THRESHOLD)) + { /* Modes that do a full copy or nothing. */ if (ELEM(mixmode, CDT_MIX_REPLACE_ABOVE_THRESHOLD, CDT_MIX_REPLACE_BELOW_THRESHOLD)) { /* TODO: Check for a real valid way to get 'factor' value of our dest color? */ @@ -1244,7 +1246,8 @@ static void layerCopyValue_propcol(const void *source, if (ELEM(mixmode, CDT_MIX_NOMIX, CDT_MIX_REPLACE_ABOVE_THRESHOLD, - CDT_MIX_REPLACE_BELOW_THRESHOLD)) { + CDT_MIX_REPLACE_BELOW_THRESHOLD)) + { /* Modes that do a full copy or nothing. */ if (ELEM(mixmode, CDT_MIX_REPLACE_ABOVE_THRESHOLD, CDT_MIX_REPLACE_BELOW_THRESHOLD)) { /* TODO: Check for a real valid way to get 'factor' value of our dest color? */ diff --git a/source/blender/blenkernel/intern/dynamicpaint.cc b/source/blender/blenkernel/intern/dynamicpaint.cc index 66a802a2668..a9e7b8ad7a1 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.cc +++ b/source/blender/blenkernel/intern/dynamicpaint.cc @@ -79,7 +79,7 @@ using blender::int3; /* could enable at some point but for now there are far too many conversions */ #ifdef __GNUC__ -//# pragma GCC diagnostic ignored "-Wdouble-promotion" +// # pragma GCC diagnostic ignored "-Wdouble-promotion" #endif static CLG_LogRef LOG = {"bke.dynamicpaint"}; @@ -2121,7 +2121,8 @@ static void dynamicPaint_frameUpdate( /* image sequences are handled by bake operator */ if ((surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ) || - !(surface->flags & MOD_DPAINT_ACTIVE)) { + !(surface->flags & MOD_DPAINT_ACTIVE)) + { continue; } @@ -3024,7 +3025,8 @@ int dynamicPaint_createUVSurface(Scene *scene, if (n_target >= 0 && n_target != index) { if (!dynamicPaint_pointHasNeighbor( - ed, final_index[index], final_index[n_target])) { + ed, final_index[index], final_index[n_target])) + { ed->n_target[n_pos] = final_index[n_target]; ed->n_num[final_index[index]]++; n_pos++; @@ -4770,7 +4772,8 @@ static void dynamic_paint_paint_single_point_cb_ex(void *__restrict userdata, if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) { if (brush->proximity_falloff == MOD_DPAINT_PRFALL_RAMP && - !(brush->flags & MOD_DPAINT_RAMP_ALPHA)) { + !(brush->flags & MOD_DPAINT_RAMP_ALPHA)) + { paintColor[0] = colorband[0]; paintColor[1] = colorband[1]; paintColor[2] = colorband[2]; diff --git a/source/blender/blenkernel/intern/effect.cc b/source/blender/blenkernel/intern/effect.cc index be8f9dc549f..3e349614911 100644 --- a/source/blender/blenkernel/intern/effect.cc +++ b/source/blender/blenkernel/intern/effect.cc @@ -695,7 +695,8 @@ bool get_effector_data(EffectorCache *eff, /* In case surface object is in Edit mode when loading the .blend, * surface modifier is never executed and bvhtree never built, see #48415. */ if (eff->pd && eff->pd->shape == PFIELD_SHAPE_SURFACE && eff->surmd && - eff->surmd->runtime.bvhtree) { + eff->surmd->runtime.bvhtree) + { /* closest point in the object surface is an effector */ float vec[3]; @@ -848,7 +849,8 @@ static void get_effector_tot( efd->charge = eff->pd->f_strength; } else if (eff->pd->forcefield == PFIELD_HARMONIC && - (eff->pd->flag & PFIELD_MULTIPLE_SPRINGS) == 0) { + (eff->pd->flag & PFIELD_MULTIPLE_SPRINGS) == 0) + { /* every particle is mapped to only one harmonic effector particle */ *p = point->index % eff->psys->totpart; *tot = *p + 1; diff --git a/source/blender/blenkernel/intern/fluid.cc b/source/blender/blenkernel/intern/fluid.cc index 25f0081a2e2..0811de98e5d 100644 --- a/source/blender/blenkernel/intern/fluid.cc +++ b/source/blender/blenkernel/intern/fluid.cc @@ -1239,7 +1239,8 @@ static void compute_obstaclesemission(Scene *scene, /* Set scene time */ /* Handle emission subframe */ if ((subframe < subframes || time_per_frame + dt + FLT_EPSILON < frame_length) && - !is_first_frame) { + !is_first_frame) + { scene->r.subframe = (time_per_frame + (subframe + 1.0f) * subframe_dt) / frame_length; scene->r.cfra = frame - 1; } @@ -1422,7 +1423,8 @@ static void update_obstacles(Depsgraph *depsgraph, d_index = manta_get_index(dx, fds->res[0], dy, fds->res[1], dz); /* Make sure emission cell is inside the new domain boundary. */ if (dx < 0 || dy < 0 || dz < 0 || dx >= fds->res[0] || dy >= fds->res[1] || - dz >= fds->res[2]) { + dz >= fds->res[2]) + { continue; } @@ -2257,7 +2259,8 @@ static void adaptive_domain_adjust( /* skip if cell already belongs to new area */ if (xn >= min[0] && xn <= max[0] && yn >= min[1] && yn <= max[1] && zn >= min[2] && - zn <= max[2]) { + zn <= max[2]) + { continue; } @@ -2753,7 +2756,8 @@ static void compute_flowsemission(Scene *scene, /* Set scene time */ if ((subframe < subframes || time_per_frame + dt + FLT_EPSILON < frame_length) && - !is_first_frame) { + !is_first_frame) + { scene->r.subframe = (time_per_frame + (subframe + 1.0f) * subframe_dt) / frame_length; scene->r.cfra = frame - 1; } @@ -2998,7 +3002,8 @@ static void update_flowsfluids(Depsgraph *depsgraph, d_index = manta_get_index(dx, fds->res[0], dy, fds->res[1], dz); /* Make sure emission cell is inside the new domain boundary. */ if (dx < 0 || dy < 0 || dz < 0 || dx >= fds->res[0] || dy >= fds->res[1] || - dz >= fds->res[2]) { + dz >= fds->res[2]) + { continue; } @@ -4111,7 +4116,8 @@ Mesh *BKE_fluid_modifier_do( /* Always update viewport in cache replay mode. */ if (fds->cache_type == FLUID_DOMAIN_CACHE_REPLAY || - fds->flags & FLUID_DOMAIN_USE_ADAPTIVE_DOMAIN) { + fds->flags & FLUID_DOMAIN_USE_ADAPTIVE_DOMAIN) + { needs_viewport_update = true; } /* In other cache modes, only update the viewport when no bake is going on. */ diff --git a/source/blender/blenkernel/intern/fmodifier.cc b/source/blender/blenkernel/intern/fmodifier.cc index af53dadd214..da3f3ae90a2 100644 --- a/source/blender/blenkernel/intern/fmodifier.cc +++ b/source/blender/blenkernel/intern/fmodifier.cc @@ -1363,14 +1363,16 @@ static float eval_fmodifier_influence(FModifier *fcm, float evaltime) return 0.0f; } if ((fcm->blendin != 0.0f) && (evaltime >= fcm->sfra) && - (evaltime <= fcm->sfra + fcm->blendin)) { + (evaltime <= fcm->sfra + fcm->blendin)) + { /* blend in range */ float a = fcm->sfra; float b = fcm->sfra + fcm->blendin; return influence * (evaltime - a) / (b - a); } if ((fcm->blendout != 0.0f) && (evaltime <= fcm->efra) && - (evaltime >= fcm->efra - fcm->blendout)) { + (evaltime >= fcm->efra - fcm->blendout)) + { /* blend out range */ float a = fcm->efra; float b = fcm->efra - fcm->blendout; @@ -1409,7 +1411,8 @@ float evaluate_time_fmodifiers(FModifiersStackStorage *storage, */ uint fcm_index = storage->modifier_count - 1; for (FModifier *fcm = static_cast(modifiers->last); fcm; - fcm = fcm->prev, fcm_index--) { + fcm = fcm->prev, fcm_index--) + { const FModifierTypeInfo *fmi = fmodifier_get_typeinfo(fcm); if (fmi == nullptr) { diff --git a/source/blender/blenkernel/intern/geometry_component_curves.cc b/source/blender/blenkernel/intern/geometry_component_curves.cc index 7a574339105..47b8b63055b 100644 --- a/source/blender/blenkernel/intern/geometry_component_curves.cc +++ b/source/blender/blenkernel/intern/geometry_component_curves.cc @@ -402,7 +402,8 @@ class CurvesVertexGroupsAttributeProvider final : public DynamicAttributesProvid int index; bDeformGroup *group; if (!BKE_defgroup_listbase_name_find( - &curves->vertex_group_names, name.c_str(), &index, &group)) { + &curves->vertex_group_names, name.c_str(), &index, &group)) + { return false; } BLI_remlink(&curves->vertex_group_names, group); diff --git a/source/blender/blenkernel/intern/geometry_fields.cc b/source/blender/blenkernel/intern/geometry_fields.cc index 03aba37df67..132968dda81 100644 --- a/source/blender/blenkernel/intern/geometry_fields.cc +++ b/source/blender/blenkernel/intern/geometry_fields.cc @@ -319,7 +319,8 @@ GVArray CurvesFieldInput::get_varray_for_context(const fn::FieldContext &context } } if (const CurvesFieldContext *curves_context = dynamic_cast( - &context)) { + &context)) + { return this->get_varray_for_context(curves_context->curves(), curves_context->domain(), mask); } return {}; @@ -838,7 +839,8 @@ std::optional try_detect_field_domain(const GeometryComponent &compo } for (const fn::FieldInput &field_input : field_inputs->deduplicated_nodes) { if (const auto *geometry_field_input = dynamic_cast( - &field_input)) { + &field_input)) + { if (!handle_domain(geometry_field_input->preferred_domain(component))) { return std::nullopt; } @@ -861,13 +863,15 @@ std::optional try_detect_field_domain(const GeometryComponent &compo } for (const fn::FieldInput &field_input : field_inputs->deduplicated_nodes) { if (const auto *geometry_field_input = dynamic_cast( - &field_input)) { + &field_input)) + { if (!handle_domain(geometry_field_input->preferred_domain(component))) { return std::nullopt; } } else if (const auto *curves_field_input = dynamic_cast( - &field_input)) { + &field_input)) + { if (!handle_domain(curves_field_input->preferred_domain(curves->geometry.wrap()))) { return std::nullopt; } diff --git a/source/blender/blenkernel/intern/gpencil_curve_legacy.cc b/source/blender/blenkernel/intern/gpencil_curve_legacy.cc index d216ea718af..36f549b1936 100644 --- a/source/blender/blenkernel/intern/gpencil_curve_legacy.cc +++ b/source/blender/blenkernel/intern/gpencil_curve_legacy.cc @@ -479,7 +479,8 @@ void BKE_gpencil_convert_curve(Main *bmain, const float sample) { if (ELEM(nullptr, ob_gp, ob_cu) || (ob_gp->type != OB_GPENCIL_LEGACY) || - (ob_gp->data == nullptr)) { + (ob_gp->data == nullptr)) + { return; } diff --git a/source/blender/blenkernel/intern/gpencil_legacy.cc b/source/blender/blenkernel/intern/gpencil_legacy.cc index 50a940612f8..47336aad35e 100644 --- a/source/blender/blenkernel/intern/gpencil_legacy.cc +++ b/source/blender/blenkernel/intern/gpencil_legacy.cc @@ -2017,7 +2017,8 @@ bool BKE_gpencil_merge_materials_table_get(Object *ob, /* Read secondary material to compare with primary material. */ ma_secondary = BKE_gpencil_material(ob, idx_secondary + 1); if ((ma_secondary == nullptr) || - BLI_ghash_haskey(r_mat_table, POINTER_FROM_INT(idx_secondary))) { + BLI_ghash_haskey(r_mat_table, POINTER_FROM_INT(idx_secondary))) + { continue; } gp_style_primary = ma_primary->gp_style; @@ -2142,7 +2143,8 @@ bool BKE_gpencil_merge_materials(Object *ob, continue; } if (((gpl->flag & GP_LAYER_UNLOCK_COLOR) == 0) && - (gp_style->flag & GP_MATERIAL_LOCKED)) { + (gp_style->flag & GP_MATERIAL_LOCKED)) + { continue; } } @@ -2495,7 +2497,8 @@ void BKE_gpencil_visible_stroke_advanced_iter(ViewLayer *view_layer, /* Special cases when cframe is before first frame. */ bGPDframe *gpf_first = static_cast(gpl->frames.first); if ((gpf_first != nullptr) && (act_gpf != nullptr) && - (gpf_first->framenum > act_gpf->framenum)) { + (gpf_first->framenum > act_gpf->framenum)) + { is_before_first = true; } if ((gpf_first != nullptr) && (act_gpf == nullptr)) { @@ -2596,7 +2599,8 @@ void BKE_gpencil_visible_stroke_advanced_iter(ViewLayer *view_layer, /* If layer solo mode and Paint mode, only keyframes with data are displayed. */ if (GPENCIL_PAINT_MODE(gpd) && (gpl->flag & GP_LAYER_SOLO_MODE) && - (act_gpf->framenum != cfra)) { + (act_gpf->framenum != cfra)) + { gpl->opacity = prev_opacity; continue; } diff --git a/source/blender/blenkernel/intern/gpencil_modifier_legacy.cc b/source/blender/blenkernel/intern/gpencil_modifier_legacy.cc index 4133763a570..fd2c7eb9800 100644 --- a/source/blender/blenkernel/intern/gpencil_modifier_legacy.cc +++ b/source/blender/blenkernel/intern/gpencil_modifier_legacy.cc @@ -104,7 +104,8 @@ void BKE_gpencil_cache_data_init(Depsgraph *depsgraph, Object *ob) mmd->cache_data = static_cast( MEM_callocN(sizeof(ShrinkwrapTreeData), __func__)); if (BKE_shrinkwrap_init_tree( - mmd->cache_data, target, mmd->shrink_type, mmd->shrink_mode, false)) { + mmd->cache_data, target, mmd->shrink_type, mmd->shrink_mode, false)) + { } else { MEM_SAFE_FREE(mmd->cache_data); diff --git a/source/blender/blenkernel/intern/image.cc b/source/blender/blenkernel/intern/image.cc index 6bfc51895e0..f932ece9ab2 100644 --- a/source/blender/blenkernel/intern/image.cc +++ b/source/blender/blenkernel/intern/image.cc @@ -1573,7 +1573,8 @@ void BKE_image_free_all_textures(Main *bmain) } for (tex = static_cast(bmain->textures.first); tex; - tex = static_cast(tex->id.next)) { + tex = static_cast(tex->id.next)) + { if (tex->ima) { tex->ima->id.tag |= LIB_TAG_DOIT; } @@ -3711,7 +3712,8 @@ void BKE_image_multiview_index(const Image *ima, ImageUser *iuser) } else { if ((iuser->view < 0) || - (iuser->view >= BLI_listbase_count_at_most(&ima->views, iuser->view + 1))) { + (iuser->view >= BLI_listbase_count_at_most(&ima->views, iuser->view + 1))) + { iuser->multi_index = iuser->view = 0; } else { diff --git a/source/blender/blenkernel/intern/image_gen.cc b/source/blender/blenkernel/intern/image_gen.cc index fab4de47b13..f576625f367 100644 --- a/source/blender/blenkernel/intern/image_gen.cc +++ b/source/blender/blenkernel/intern/image_gen.cc @@ -268,7 +268,8 @@ static void checker_board_color_tint( for (y = offset; y < height + offset; y++) { for (x = 0; x < width; x++) { if (((y / size) % 2 == 1 && (x / size) % 2 == 1) || - ((y / size) % 2 == 0 && (x / size) % 2 == 0)) { + ((y / size) % 2 == 0 && (x / size) % 2 == 0)) + { if (rect) { rect[0] = char(BLEND_CHAR(rect[0], blend)); rect[1] = char(BLEND_CHAR(rect[1], blend)); diff --git a/source/blender/blenkernel/intern/image_save.cc b/source/blender/blenkernel/intern/image_save.cc index 9605b8803b2..fa07199c356 100644 --- a/source/blender/blenkernel/intern/image_save.cc +++ b/source/blender/blenkernel/intern/image_save.cc @@ -123,7 +123,8 @@ bool BKE_image_save_options_init(ImageSaveOptions *opts, else { BKE_image_format_from_imbuf(&opts->im_format, ibuf); if (ima->source == IMA_SRC_GENERATED && - !IMB_colormanagement_space_name_is_data(ima_colorspace)) { + !IMB_colormanagement_space_name_is_data(ima_colorspace)) + { ima_colorspace = IMB_colormanagement_role_colorspace_name_get(COLOR_ROLE_DEFAULT_BYTE); } diff --git a/source/blender/blenkernel/intern/ipo.cc b/source/blender/blenkernel/intern/ipo.cc index b9819da6bc4..644ce717879 100644 --- a/source/blender/blenkernel/intern/ipo.cc +++ b/source/blender/blenkernel/intern/ipo.cc @@ -769,15 +769,15 @@ static const char *camera_adrcodes_to_paths(int adrcode, int *r_array_index) /* result depends on adrcode */ switch (adrcode) { case CAM_LENS: -#if 0 /* XXX this cannot be resolved easily... \ - * perhaps we assume camera is perspective (works for most cases... */ +#if 0 /* XXX this cannot be resolved easily... \ + * perhaps we assume camera is perspective (works for most cases... */ if (ca->type == CAM_ORTHO) { return "ortho_scale"; } else { return "lens"; } -#else /* XXX lazy hack for now... */ +#else /* XXX lazy hack for now... */ return "lens"; #endif /* XXX this cannot be resolved easily */ diff --git a/source/blender/blenkernel/intern/lattice.cc b/source/blender/blenkernel/intern/lattice.cc index 18d6407b58c..fa3920c642b 100644 --- a/source/blender/blenkernel/intern/lattice.cc +++ b/source/blender/blenkernel/intern/lattice.cc @@ -417,7 +417,8 @@ void outside_lattice(Lattice *lt) for (u = 0; u < lt->pntsu; u++, bp++) { if (u == 0 || v == 0 || w == 0 || u == lt->pntsu - 1 || v == lt->pntsv - 1 || - w == lt->pntsw - 1) { + w == lt->pntsw - 1) + { /* pass */ } else { diff --git a/source/blender/blenkernel/intern/layer.cc b/source/blender/blenkernel/intern/layer.cc index 9c09cb0838c..57a6e7c1fd0 100644 --- a/source/blender/blenkernel/intern/layer.cc +++ b/source/blender/blenkernel/intern/layer.cc @@ -2677,7 +2677,8 @@ void BKE_view_layer_rename_lightgroup(Scene *scene, /* Update the scene's world to refer to the new name instead. */ if (scene->world != nullptr && !ID_IS_LINKED(scene->world) && - scene->world->lightgroup != nullptr) { + scene->world->lightgroup != nullptr) + { LightgroupMembership *lgm = scene->world->lightgroup; if (STREQ(lgm->name, old_name)) { STRNCPY_UTF8(lgm->name, lightgroup->name); diff --git a/source/blender/blenkernel/intern/lib_id.cc b/source/blender/blenkernel/intern/lib_id.cc index 2b7e57e0cb1..684a320b6b3 100644 --- a/source/blender/blenkernel/intern/lib_id.cc +++ b/source/blender/blenkernel/intern/lib_id.cc @@ -71,7 +71,7 @@ #include "lib_intern.hh" -//#define DEBUG_TIME +// #define DEBUG_TIME #ifdef DEBUG_TIME # include "PIL_time_utildefines.h" @@ -1166,7 +1166,8 @@ void BKE_main_lib_objects_recalc_all(Main *bmain) /* flag for full recalc */ for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { if (ID_IS_LINKED(ob)) { DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); } diff --git a/source/blender/blenkernel/intern/lib_id_delete.cc b/source/blender/blenkernel/intern/lib_id_delete.cc index be65bcb9e07..fcb3cdcf2f9 100644 --- a/source/blender/blenkernel/intern/lib_id_delete.cc +++ b/source/blender/blenkernel/intern/lib_id_delete.cc @@ -305,7 +305,8 @@ static size_t id_delete(Main *bmain, /* Since we removed IDs from Main, their own other IDs usages need to be removed 'manually'. */ blender::Vector cleanup_ids; for (ID *id = static_cast(tagged_deleted_ids.first); id; - id = static_cast(id->next)) { + id = static_cast(id->next)) + { cleanup_ids.append(id); } BKE_libblock_relink_multiple(bmain, @@ -325,7 +326,8 @@ static size_t id_delete(Main *bmain, * deleted IDs may not be properly decreased by the remappings (since `NO_MAIN` ID user-counts * is never affected). */ for (ID *id = static_cast(tagged_deleted_ids.first); id; - id = static_cast(id->next)) { + id = static_cast(id->next)) + { id->tag |= LIB_TAG_NO_MAIN; /* User-count needs to be reset artificially, since some usages may not be cleared in batch * deletion (typically, if one deleted ID uses another deleted ID, this may not be cleared by diff --git a/source/blender/blenkernel/intern/lib_override.cc b/source/blender/blenkernel/intern/lib_override.cc index 8beb889758e..ea7742e0758 100644 --- a/source/blender/blenkernel/intern/lib_override.cc +++ b/source/blender/blenkernel/intern/lib_override.cc @@ -474,7 +474,8 @@ static void lib_override_prefill_newid_from_existing_overrides(Main *bmain, ID * BLI_assert(id != nullptr); } if (ID_IS_OVERRIDE_LIBRARY_REAL(id) && - id->override_library->hierarchy_root == id_hierarchy_root) { + id->override_library->hierarchy_root == id_hierarchy_root) + { id->override_library->reference->newid = id; if (GS(id_iter->name) == ID_KE) { Key *reference_key = BKE_key_from_id(id->override_library->reference); @@ -953,7 +954,8 @@ static bool lib_override_hierarchy_dependencies_recursive_tag(LibOverrideGroupTa /* We only consider IDs from the same library. */ ID *to_id = *to_id_entry->id_pointer.to; if (to_id == nullptr || to_id->lib != id->lib || - (is_override && !ID_IS_OVERRIDE_LIBRARY(to_id))) { + (is_override && !ID_IS_OVERRIDE_LIBRARY(to_id))) + { /* IDs from different libraries, or non-override IDs in case we are processing overrides, are * both barriers of dependency. */ continue; @@ -1233,7 +1235,8 @@ static void lib_override_linked_group_tag(LibOverrideGroupTagData *data) } if (instantiating_collection == nullptr && - instantiating_collection_override_candidate != nullptr) { + instantiating_collection_override_candidate != nullptr) + { data->id_tag_set( &instantiating_collection_override_candidate->id, bool(instantiating_collection_override_candidate->id.tag & LIB_TAG_MISSING)); @@ -2283,7 +2286,8 @@ static bool lib_override_library_resync(Main *bmain, FOREACH_MAIN_LISTBASE_BEGIN (bmain, lb) { FOREACH_MAIN_LISTBASE_ID_BEGIN (lb, id) { if ((id->tag & LIB_TAG_DOIT) == 0 || id->newid == nullptr || - id->lib != id_root_reference->lib) { + id->lib != id_root_reference->lib) + { continue; } ID *id_override_new = id->newid; @@ -2340,7 +2344,8 @@ static bool lib_override_library_resync(Main *bmain, * generated by resync of linked overrides. So nothing is expected to be overridden here. */ if (ID_IS_OVERRIDE_LIBRARY_REAL(id_override_new) && - (id_override_old->tag & LIB_TAG_MISSING) == 0) { + (id_override_old->tag & LIB_TAG_MISSING) == 0) + { BLI_assert(ID_IS_OVERRIDE_LIBRARY_REAL(id_override_old)); id_override_new->override_library->flag = id_override_old->override_library->flag; @@ -3136,7 +3141,8 @@ static void lib_override_resync_tagging_finalize(Main *bmain, LinkNodePair **id_resync_roots_p; if (!BLI_ghash_ensure_p( - id_roots, hierarchy_root, reinterpret_cast(&id_resync_roots_p))) { + id_roots, hierarchy_root, reinterpret_cast(&id_resync_roots_p))) + { *id_resync_roots_p = MEM_cnew(__func__); } BLI_linklist_append(*id_resync_roots_p, id_iter); @@ -3563,7 +3569,8 @@ void BKE_lib_override_library_main_resync(Main *bmain, Collection *override_resync_residual_storage = static_cast(BLI_findstring( &bmain->collections, OVERRIDE_RESYNC_RESIDUAL_STORAGE_NAME, offsetof(ID, name) + 2)); if (override_resync_residual_storage != nullptr && - ID_IS_LINKED(override_resync_residual_storage)) { + ID_IS_LINKED(override_resync_residual_storage)) + { override_resync_residual_storage = nullptr; } if (override_resync_residual_storage == nullptr) { @@ -4592,7 +4599,8 @@ static bool lib_override_library_id_reset_do(Main *bmain, } LISTBASE_FOREACH_MUTABLE ( - IDOverrideLibraryProperty *, op, &id_root->override_library->properties) { + IDOverrideLibraryProperty *, op, &id_root->override_library->properties) + { bool do_op_delete = true; const bool is_collection = op->rna_prop_type == PROP_COLLECTION; if (is_collection || op->rna_prop_type == PROP_POINTER) { @@ -4743,7 +4751,8 @@ void BKE_lib_override_library_operations_tag(IDOverrideLibraryProperty *liboverr } LISTBASE_FOREACH ( - IDOverrideLibraryPropertyOperation *, opop, &liboverride_property->operations) { + IDOverrideLibraryPropertyOperation *, opop, &liboverride_property->operations) + { if (do_set) { opop->tag |= tag; } @@ -4781,7 +4790,8 @@ void BKE_lib_override_library_id_unused_cleanup(ID *local) { if (ID_IS_OVERRIDE_LIBRARY_REAL(local)) { LISTBASE_FOREACH_MUTABLE ( - IDOverrideLibraryProperty *, op, &local->override_library->properties) { + IDOverrideLibraryProperty *, op, &local->override_library->properties) + { if (op->tag & LIBOVERRIDE_PROP_OP_TAG_UNUSED) { BKE_lib_override_library_property_delete(local->override_library, op); } diff --git a/source/blender/blenkernel/intern/lib_query.cc b/source/blender/blenkernel/intern/lib_query.cc index e6285a8c871..e0d2560cb46 100644 --- a/source/blender/blenkernel/intern/lib_query.cc +++ b/source/blender/blenkernel/intern/lib_query.cc @@ -851,7 +851,8 @@ void BKE_lib_query_unused_ids_tag(Main *bmain, BKE_main_relations_create(bmain, 0); FOREACH_MAIN_ID_BEGIN (bmain, id) { if (lib_query_unused_ids_tag_recurse( - bmain, tag, do_local_ids, do_linked_ids, id, r_num_tagged)) { + bmain, tag, do_local_ids, do_linked_ids, id, r_num_tagged)) + { /* This root processed ID is part of one or more dependency loops. * * If it was not tagged, and its matching relations entry is not marked as processed, it diff --git a/source/blender/blenkernel/intern/main.cc b/source/blender/blenkernel/intern/main.cc index 10550ab24e0..9c6863b9e3b 100644 --- a/source/blender/blenkernel/intern/main.cc +++ b/source/blender/blenkernel/intern/main.cc @@ -467,7 +467,8 @@ static int main_relations_create_idlink_cb(LibraryIDLinkCallbackData *cb_data) /* Add `id_pointer` as child of `self_id`. */ { if (!BLI_ghash_ensure_p( - bmain_relations->relations_from_pointers, self_id, (void ***)&entry_p)) { + bmain_relations->relations_from_pointers, self_id, (void ***)&entry_p)) + { *entry_p = static_cast(MEM_callocN(sizeof(**entry_p), __func__)); (*entry_p)->session_uuid = self_id->session_uuid; } @@ -487,7 +488,8 @@ static int main_relations_create_idlink_cb(LibraryIDLinkCallbackData *cb_data) /* Add `self_id` as parent of `id_pointer`. */ if (*id_pointer != nullptr) { if (!BLI_ghash_ensure_p( - bmain_relations->relations_from_pointers, *id_pointer, (void ***)&entry_p)) { + bmain_relations->relations_from_pointers, *id_pointer, (void ***)&entry_p)) + { *entry_p = static_cast(MEM_callocN(sizeof(**entry_p), __func__)); (*entry_p)->session_uuid = (*id_pointer)->session_uuid; } diff --git a/source/blender/blenkernel/intern/main_namemap.cc b/source/blender/blenkernel/intern/main_namemap.cc index 9479ef408ca..5d423c5fec1 100644 --- a/source/blender/blenkernel/intern/main_namemap.cc +++ b/source/blender/blenkernel/intern/main_namemap.cc @@ -30,7 +30,7 @@ static CLG_LogRef LOG = {"bke.main_namemap"}; -//#define DEBUG_PRINT_MEMORY_USAGE +// #define DEBUG_PRINT_MEMORY_USAGE using namespace blender; diff --git a/source/blender/blenkernel/intern/mask_rasterize.cc b/source/blender/blenkernel/intern/mask_rasterize.cc index 438ccdb23b9..703076344ad 100644 --- a/source/blender/blenkernel/intern/mask_rasterize.cc +++ b/source/blender/blenkernel/intern/mask_rasterize.cc @@ -292,7 +292,8 @@ static void maskrasterize_spline_differentiate_point_outset(float (*diff_feather normalize_v2(d_next); if ((do_test == false) || - (len_squared_v2v2(diff_feather_points[k], diff_points[k]) < ofs_squared)) { + (len_squared_v2v2(diff_feather_points[k], diff_points[k]) < ofs_squared)) + { add_v2_v2v2(d, d_prev, d_next); @@ -539,7 +540,8 @@ static void layer_bucket_init(MaskRasterLayer *layer, const float pixel_size) buckets_face[bucket_index] = bucket; for (bucket_node = bucketstore[bucket_index]; bucket_node; - bucket_node = bucket_node->next) { + bucket_node = bucket_node->next) + { *bucket = POINTER_AS_UINT(bucket_node->link); bucket++; } diff --git a/source/blender/blenkernel/intern/material.cc b/source/blender/blenkernel/intern/material.cc index b0ec1d10919..9051f075b53 100644 --- a/source/blender/blenkernel/intern/material.cc +++ b/source/blender/blenkernel/intern/material.cc @@ -927,7 +927,8 @@ void BKE_objects_materials_test_all(Main *bmain, ID *id) BKE_main_lock(bmain); int processed_objects = 0; for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { if (ob->data == id) { BKE_object_material_resize(bmain, ob, *totcol, false); processed_objects++; diff --git a/source/blender/blenkernel/intern/mball_tessellate.cc b/source/blender/blenkernel/intern/mball_tessellate.cc index e69463c90da..d0175554b9d 100644 --- a/source/blender/blenkernel/intern/mball_tessellate.cc +++ b/source/blender/blenkernel/intern/mball_tessellate.cc @@ -293,7 +293,7 @@ static void build_bvh_spatial( /** Hash table size (32768). */ #define HASHSIZE size_t(1 << (3 * HASHBIT)) -#define HASH(i, j, k) ((((((i)&31) << 5) | ((j)&31)) << 5) | ((k)&31)) +#define HASH(i, j, k) ((((((i) & 31) << 5) | ((j) & 31)) << 5) | ((k) & 31)) #define MB_BIT(i, bit) (((i) >> (bit)) & 1) // #define FLIP(i, bit) ((i) ^ 1 << (bit)) /* flip the given bit of i */ diff --git a/source/blender/blenkernel/intern/mesh_compare.cc b/source/blender/blenkernel/intern/mesh_compare.cc index ec1efb9cde4..14ccbaf4c33 100644 --- a/source/blender/blenkernel/intern/mesh_compare.cc +++ b/source/blender/blenkernel/intern/mesh_compare.cc @@ -629,7 +629,8 @@ static void make_set_sizes_one(IndexMapping &indices) } int match = sorted_i; for (const int other_index : - IndexRange(indices.set_ids[sorted_i], indices.set_sizes[sorted_i])) { + IndexRange(indices.set_ids[sorted_i], indices.set_sizes[sorted_i])) + { if (indices.from_sorted1[sorted_i] == indices.from_sorted2[other_index]) { match = other_index; break; @@ -637,7 +638,8 @@ static void make_set_sizes_one(IndexMapping &indices) } std::swap(indices.from_sorted2[sorted_i], indices.from_sorted2[match]); for (const int other_set_i : - IndexRange(indices.set_ids[sorted_i], indices.set_sizes[sorted_i])) { + IndexRange(indices.set_ids[sorted_i], indices.set_sizes[sorted_i])) + { /* New first element, since this one is now in a new set. */ indices.set_ids[other_set_i] = sorted_i + 1; indices.set_sizes[other_set_i] -= 1; diff --git a/source/blender/blenkernel/intern/mesh_mapping.cc b/source/blender/blenkernel/intern/mesh_mapping.cc index 81e0493265f..2d8770895bb 100644 --- a/source/blender/blenkernel/intern/mesh_mapping.cc +++ b/source/blender/blenkernel/intern/mesh_mapping.cc @@ -585,7 +585,8 @@ static void face_edge_loop_islands_calc(const int totedge, for (; i--; p++) { int bit = face_groups[*p]; if (!ELEM(bit, 0, face_group_id, face_group_id_overflowed) && - !(bit_face_group_mask & bit)) { + !(bit_face_group_mask & bit)) + { bit_face_group_mask |= bit; } } @@ -953,7 +954,8 @@ static bool mesh_calc_islands_loop_face_uv(const int totedge, const int edge_i = corner_edges[corner]; loop_indices[num_lidx++] = int(corner); if (num_edge_borders && BLI_BITMAP_TEST(edge_borders, edge_i) && - (edge_border_count[edge_i] < 2)) { + (edge_border_count[edge_i] < 2)) + { edge_border_count[edge_i]++; if (edge_border_count[edge_i] == 2) { edge_innercut_indices[num_einnercuts++] = edge_i; diff --git a/source/blender/blenkernel/intern/mesh_mirror.cc b/source/blender/blenkernel/intern/mesh_mirror.cc index 716b59b890e..7c80697f640 100644 --- a/source/blender/blenkernel/intern/mesh_mirror.cc +++ b/source/blender/blenkernel/intern/mesh_mirror.cc @@ -244,7 +244,8 @@ Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(MirrorModifierData *mmd, */ if (use_correct_order_on_merge) { if (UNLIKELY(len_squared_v3v3(positions[vert_index_prev], positions[vert_index]) < - tolerance_sq)) { + tolerance_sq)) + { *vtmap_b = i; (*r_vert_merge_map_len)++; @@ -261,7 +262,8 @@ Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(MirrorModifierData *mmd, } else { if (UNLIKELY(len_squared_v3v3(positions[vert_index_prev], positions[vert_index]) < - tolerance_sq)) { + tolerance_sq)) + { *vtmap_a = src_verts_num + i; (*r_vert_merge_map_len)++; @@ -454,7 +456,8 @@ Mesh *BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(MirrorModifierData *mmd, for (int i = 0; i < src_verts_num; dvert++, i++) { /* merged vertices get both groups, others get flipped */ if (use_correct_order_on_merge && do_vtargetmap && - ((*r_vert_merge_map)[i + src_verts_num] != -1)) { + ((*r_vert_merge_map)[i + src_verts_num] != -1)) + { BKE_defvert_flip_merged(dvert - src_verts_num, flip_map, flip_map_len); } else if (!use_correct_order_on_merge && do_vtargetmap && ((*r_vert_merge_map)[i] != -1)) diff --git a/source/blender/blenkernel/intern/mesh_normals.cc b/source/blender/blenkernel/intern/mesh_normals.cc index 17b0b128136..b02e1c36025 100644 --- a/source/blender/blenkernel/intern/mesh_normals.cc +++ b/source/blender/blenkernel/intern/mesh_normals.cc @@ -227,7 +227,8 @@ blender::bke::MeshNormalDomain Mesh::normals_domain() const } if (edge_mix == array_utils::BooleanMix::AllFalse && - face_mix == array_utils::BooleanMix::AllFalse) { + face_mix == array_utils::BooleanMix::AllFalse) + { return MeshNormalDomain::Point; } diff --git a/source/blender/blenkernel/intern/mesh_remap.cc b/source/blender/blenkernel/intern/mesh_remap.cc index c004263b5e9..8b5911338e7 100644 --- a/source/blender/blenkernel/intern/mesh_remap.cc +++ b/source/blender/blenkernel/intern/mesh_remap.cc @@ -614,7 +614,8 @@ void BKE_mesh_remap_calc_verts_from_mesh(const int mode, } if (mesh_remap_bvhtree_query_nearest( - &treedata, &nearest, tmp_co, max_dist_sq, &hit_dist)) { + &treedata, &nearest, tmp_co, max_dist_sq, &hit_dist)) + { const int face_index = tri_faces[nearest.index]; if (mode == MREMAP_MODE_VERT_FACE_NEAREST) { @@ -746,7 +747,8 @@ void BKE_mesh_remap_calc_edges_from_mesh(const int mode, } if (mesh_remap_bvhtree_query_nearest( - &treedata, &nearest, tmp_co, max_dist_sq, &hit_dist)) { + &treedata, &nearest, tmp_co, max_dist_sq, &hit_dist)) + { v_dst_to_src_map[vidx_dst].hit_dist = hit_dist; v_dst_to_src_map[vidx_dst].index = nearest.index; } @@ -1660,7 +1662,8 @@ void BKE_mesh_remap_calc_loops_from_mesh(const int mode, islands_res[tindex][plidx_dst].factor = 0.0f; if (mesh_remap_bvhtree_query_nearest( - tdata, &nearest, tmp_co, max_dist_sq, &hit_dist)) { + tdata, &nearest, tmp_co, max_dist_sq, &hit_dist)) + { islands_res[tindex][plidx_dst].hit_dist = hit_dist; islands_res[tindex][plidx_dst].index_src = tri_faces[nearest.index]; copy_v3_v3(islands_res[tindex][plidx_dst].hit_point, nearest.co); diff --git a/source/blender/blenkernel/intern/modifier.cc b/source/blender/blenkernel/intern/modifier.cc index 93dac9c69f4..a76839cd5cf 100644 --- a/source/blender/blenkernel/intern/modifier.cc +++ b/source/blender/blenkernel/intern/modifier.cc @@ -544,7 +544,8 @@ bool BKE_modifier_is_enabled(const Scene *scene, ModifierData *md, int required_ return false; } if ((required_mode & eModifierMode_Editmode) && - !(mti->flags & eModifierTypeFlag_SupportsEditmode)) { + !(mti->flags & eModifierTypeFlag_SupportsEditmode)) + { return false; } diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index d75fdc2a334..cbc6d62bc22 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -226,7 +226,8 @@ static void ntree_copy_data(Main * /*bmain*/, ID *id_dst, const ID *id_src, cons std::make_unique( *ntree_src->runtime->anonymous_attribute_inferencing); for (FieldSource &field_source : - dst_runtime.anonymous_attribute_inferencing->all_field_sources) { + dst_runtime.anonymous_attribute_inferencing->all_field_sources) + { if (auto *socket_field_source = std::get_if(&field_source.data)) { socket_field_source->socket = socket_map.lookup(socket_field_source->socket); } @@ -2723,7 +2724,8 @@ bNodeLink *nodeAddLink( bNodeLink *link = nullptr; if (eNodeSocketInOut(fromsock->in_out) == SOCK_OUT && - eNodeSocketInOut(tosock->in_out) == SOCK_IN) { + eNodeSocketInOut(tosock->in_out) == SOCK_IN) + { link = MEM_cnew("link"); if (ntree) { BLI_addtail(&ntree->links, link); @@ -2857,7 +2859,8 @@ void nodeInternalRelink(bNodeTree *ntree, bNode *node) /* remove the link that would be the same as the relinked one */ LISTBASE_FOREACH_MUTABLE (bNodeLink *, link_to_compare, &ntree->links) { if (link_to_compare->fromsock == fromlink->fromsock && - link_to_compare->tosock == link->tosock) { + link_to_compare->tosock == link->tosock) + { blender::bke::adjust_multi_input_indices_after_removed_link( ntree, link_to_compare->tosock, link_to_compare->multi_input_socket_index); duplicate_links_to_remove.append_non_duplicates(link_to_compare); diff --git a/source/blender/blenkernel/intern/node_tree_anonymous_attributes.cc b/source/blender/blenkernel/intern/node_tree_anonymous_attributes.cc index 29f7306eb7c..a61985633a3 100644 --- a/source/blender/blenkernel/intern/node_tree_anonymous_attributes.cc +++ b/source/blender/blenkernel/intern/node_tree_anonymous_attributes.cc @@ -483,12 +483,14 @@ static AnonymousAttributeInferencingResult analyze_anonymous_attribute_usages( geometry_source.data); for (const int field_source_index : geometry_source.field_sources) { for (const bNodeSocket *other_socket : - group_output_node->input_sockets().drop_back(1)) { + group_output_node->input_sockets().drop_back(1)) + { if (!nodes::socket_type_supports_fields(eNodeSocketDatatype(other_socket->type))) { continue; } if (propagated_fields_by_socket[other_socket->index_in_tree()][field_source_index] - .test()) { + .test()) + { tree_relations.available_relations.append( aal::AvailableRelation{other_socket->index(), socket->index()}); required_fields_by_geometry_socket[socket->index_in_tree()][field_source_index] diff --git a/source/blender/blenkernel/intern/node_tree_field_inferencing.cc b/source/blender/blenkernel/intern/node_tree_field_inferencing.cc index d584e42d749..9ccafa40e31 100644 --- a/source/blender/blenkernel/intern/node_tree_field_inferencing.cc +++ b/source/blender/blenkernel/intern/node_tree_field_inferencing.cc @@ -448,7 +448,8 @@ static void propagate_data_requirements_from_right_to_left( continue; } if (inferencing_interface.inputs[input_socket->index()] == - InputSocketFieldType::Implicit) { + InputSocketFieldType::Implicit) + { if (!input_socket->is_logically_linked()) { any_input_is_field_implicitly = true; break; @@ -579,7 +580,8 @@ static void propagate_field_status_from_left_to_right( state.is_single = true; if (!input_socket->is_directly_linked()) { if (inferencing_interface.inputs[input_socket->index()] == - InputSocketFieldType::Implicit) { + InputSocketFieldType::Implicit) + { state.is_single = false; } } @@ -612,7 +614,8 @@ static void propagate_field_status_from_left_to_right( case OutputSocketFieldType::PartiallyDependent: case OutputSocketFieldType::DependentField: { for (const bNodeSocket *input_socket : - gather_input_socket_dependencies(field_dependency, *node)) { + gather_input_socket_dependencies(field_dependency, *node)) + { if (!input_socket->is_available()) { continue; } diff --git a/source/blender/blenkernel/intern/node_tree_zones.cc b/source/blender/blenkernel/intern/node_tree_zones.cc index 156b11502d9..3697dd1b717 100644 --- a/source/blender/blenkernel/intern/node_tree_zones.cc +++ b/source/blender/blenkernel/intern/node_tree_zones.cc @@ -154,7 +154,8 @@ static bool update_zone_per_node(const Span all_nodes, return; } for (bNodeTreeZone *iter_zone = zone->parent_zone; iter_zone; - iter_zone = iter_zone->parent_zone) { + iter_zone = iter_zone->parent_zone) + { if (iter_zone == parent_zone) { /* This zone is nested in the parent zone, so it becomes the new parent of the node. */ parent_zone = zone; diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index e9184e42c45..2787e15701f 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -527,7 +527,8 @@ static void object_foreach_path_pointcache(ListBase *ptcache_list, BPathForeachPathData *bpath_data) { for (PointCache *cache = (PointCache *)ptcache_list->first; cache != nullptr; - cache = cache->next) { + cache = cache->next) + { if (cache->flag & PTCACHE_DISK_CACHE) { BKE_bpath_foreach_path_fixed_process(bpath_data, cache->path, sizeof(cache->path)); } @@ -3107,7 +3108,8 @@ static void give_parvert(Object *par, int nr, float vec[3]) } if (nr < numVerts) { if (me_eval && me_eval->runtime->edit_data && - !me_eval->runtime->edit_data->vertexCos.is_empty()) { + !me_eval->runtime->edit_data->vertexCos.is_empty()) + { add_v3_v3(vec, me_eval->runtime->edit_data->vertexCos[nr]); } else { @@ -4626,7 +4628,8 @@ int BKE_object_is_modified(Scene *scene, Object *ob) md = md->next) { if ((flag & eModifierMode_Render) == 0 && - BKE_modifier_is_enabled(scene, md, eModifierMode_Render)) { + BKE_modifier_is_enabled(scene, md, eModifierMode_Render)) + { flag |= eModifierMode_Render; } @@ -4772,12 +4775,14 @@ int BKE_object_is_deform_modified(Scene *scene, Object *ob) if (can_deform) { if (!(flag & eModifierMode_Render) && - BKE_modifier_is_enabled(scene, md, eModifierMode_Render)) { + BKE_modifier_is_enabled(scene, md, eModifierMode_Render)) + { flag |= eModifierMode_Render; } if (!(flag & eModifierMode_Realtime) && - BKE_modifier_is_enabled(scene, md, eModifierMode_Realtime)) { + BKE_modifier_is_enabled(scene, md, eModifierMode_Realtime)) + { flag |= eModifierMode_Realtime; } } @@ -5035,7 +5040,8 @@ KDTree_3d *BKE_object_as_kdtree(Object *ob, int *r_tot) const int *index; if (me_eval && - (index = (const int *)CustomData_get_layer(&me_eval->vert_data, CD_ORIGINDEX))) { + (index = (const int *)CustomData_get_layer(&me_eval->vert_data, CD_ORIGINDEX))) + { const Span positions = mesh->vert_positions(); /* Tree over-allocates in case where some verts have #ORIGINDEX_NONE. */ diff --git a/source/blender/blenkernel/intern/object_dupli.cc b/source/blender/blenkernel/intern/object_dupli.cc index 541dae8f1cd..c781d216021 100644 --- a/source/blender/blenkernel/intern/object_dupli.cc +++ b/source/blender/blenkernel/intern/object_dupli.cc @@ -1464,7 +1464,8 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem psys_find_group_weights(part); LISTBASE_FOREACH (ParticleDupliWeight *, dw, &part->instance_weights) { FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN ( - part->instance_collection, object, mode) { + part->instance_collection, object, mode) + { if (dw->ob == object) { totcollection += dw->count; break; @@ -1489,7 +1490,8 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem a = 0; LISTBASE_FOREACH (ParticleDupliWeight *, dw, &part->instance_weights) { FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN ( - part->instance_collection, object, mode) { + part->instance_collection, object, mode) + { if (dw->ob == object) { for (b = 0; b < dw->count; b++, a++) { oblist[a] = dw->ob; diff --git a/source/blender/blenkernel/intern/packedFile.cc b/source/blender/blenkernel/intern/packedFile.cc index 796e7ee24d6..201e26044ce 100644 --- a/source/blender/blenkernel/intern/packedFile.cc +++ b/source/blender/blenkernel/intern/packedFile.cc @@ -263,7 +263,8 @@ void BKE_packedfile_pack_all(Main *bmain, ReportList *reports, bool verbose) vfont = static_cast(vfont->id.next)) { if (vfont->packedfile == nullptr && !ID_IS_LINKED(vfont) && - BKE_vfont_is_builtin(vfont) == false) { + BKE_vfont_is_builtin(vfont) == false) + { vfont->packedfile = BKE_packedfile_new( reports, vfont->filepath, BKE_main_blendfile_path(bmain)); tot++; diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc index 42e940d8d7b..632f31d6b5a 100644 --- a/source/blender/blenkernel/intern/paint.cc +++ b/source/blender/blenkernel/intern/paint.cc @@ -1840,7 +1840,8 @@ static void sculpt_update_object(Depsgraph *depsgraph, if (U.experimental.use_sculpt_texture_paint && ss->pbvh) { char *paint_canvas_key = BKE_paint_canvas_key_get(&scene->toolsettings->paint_mode, ob); if (ss->last_paint_canvas_key == nullptr || - !STREQ(paint_canvas_key, ss->last_paint_canvas_key)) { + !STREQ(paint_canvas_key, ss->last_paint_canvas_key)) + { MEM_SAFE_FREE(ss->last_paint_canvas_key); ss->last_paint_canvas_key = paint_canvas_key; BKE_pbvh_mark_rebuild_pixels(ss->pbvh); @@ -2511,7 +2512,8 @@ static SculptAttribute *sculpt_get_cached_layer(SculptSession *ss, SculptAttribute *attr = ss->temp_attributes + i; if (attr->used && STREQ(attr->name, name) && attr->proptype == proptype && - attr->domain == domain) { + attr->domain == domain) + { return attr; } diff --git a/source/blender/blenkernel/intern/particle.cc b/source/blender/blenkernel/intern/particle.cc index 0b7660cd14f..a55369a0843 100644 --- a/source/blender/blenkernel/intern/particle.cc +++ b/source/blender/blenkernel/intern/particle.cc @@ -774,7 +774,8 @@ void psys_check_group_weights(ParticleSettings *part) dw = static_cast(part->instance_weights.first); while (dw) { if (dw->ob == nullptr || - !BKE_collection_has_object_recursive(part->instance_collection, dw->ob)) { + !BKE_collection_has_object_recursive(part->instance_collection, dw->ob)) + { tdw = dw->next; BLI_freelinkN(&part->instance_weights, dw); dw = tdw; @@ -1918,7 +1919,8 @@ int psys_particle_dm_face_lookup(Mesh *mesh_final, /* If current tessface from 'final' DM and orig tessface (given by index) * map to the same orig poly. */ if (BKE_mesh_origindex_mface_mpoly(index_mf_to_mpoly, index_mp_to_orig, findex_dst) == - pindex_orig) { + pindex_orig) + { faceuv = osface_final[findex_dst].uv; /* check that this intersects - Its possible this misses :/ - @@ -2382,7 +2384,8 @@ bool do_guides(Depsgraph *depsgraph, } else { if (BKE_where_on_path(eff->ob, guidetime, guidevec, guidedir, nullptr, &radius, &weight) == - 0) { + 0) + { return false; } } diff --git a/source/blender/blenkernel/intern/particle_system.cc b/source/blender/blenkernel/intern/particle_system.cc index 7db3acb254a..f536f8353b3 100644 --- a/source/blender/blenkernel/intern/particle_system.cc +++ b/source/blender/blenkernel/intern/particle_system.cc @@ -1903,7 +1903,8 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa -10.0f * spring_constant * (1.0f - rij / h) * (spring->rest_length - rij)); } else if (fluid->spring_frames == 0 || - (pa->prev_state.time - pa->time) <= fluid->spring_frames) { + (pa->prev_state.time - pa->time) <= fluid->spring_frames) + { ParticleSpring temp_spring; temp_spring.particle_index[0] = index; temp_spring.particle_index[1] = pfn->index; diff --git a/source/blender/blenkernel/intern/pbvh.cc b/source/blender/blenkernel/intern/pbvh.cc index 3272b472511..6bc2d46d731 100644 --- a/source/blender/blenkernel/intern/pbvh.cc +++ b/source/blender/blenkernel/intern/pbvh.cc @@ -57,12 +57,12 @@ using blender::bke::AttrDomain; /* Uncomment to test if triangles of the same face are * properly clustered into single nodes. */ -//#define TEST_PBVH_FACE_SPLIT +// #define TEST_PBVH_FACE_SPLIT /* Uncomment to test that faces are only assigned to one PBVHNode */ -//#define VALIDATE_UNIQUE_NODE_FACES +// #define VALIDATE_UNIQUE_NODE_FACES -//#define PERFCNTRS +// #define PERFCNTRS #define STACK_FIXED_DEPTH 100 struct PBVHStack { @@ -2068,7 +2068,8 @@ static bool pbvh_faces_node_raycast(PBVH *pbvh, * uninitialized values. This stores the closest vertex in the current intersecting * triangle. */ if (j == 0 || - len_squared_v3v3(location, co[j]) < len_squared_v3v3(location, nearest_vertex_co)) { + len_squared_v3v3(location, co[j]) < len_squared_v3v3(location, nearest_vertex_co)) + { copy_v3_v3(nearest_vertex_co, co[j]); r_active_vertex->i = corner_verts[tri[j]]; *r_active_face_index = pbvh->corner_tri_faces[tri_i]; @@ -2131,7 +2132,8 @@ static bool pbvh_grids_node_raycast(PBVH *pbvh, } if (ray_face_intersection_quad( - ray_start, isect_precalc, co[0], co[1], co[2], co[3], depth)) { + ray_start, isect_precalc, co[0], co[1], co[2], co[3], depth)) + { hit = true; if (r_face_normal) { @@ -2150,7 +2152,8 @@ static bool pbvh_grids_node_raycast(PBVH *pbvh, * uninitialized values. This stores the closest vertex in the current intersecting * quad. */ if (j == 0 || len_squared_v3v3(location, co[j]) < - len_squared_v3v3(location, nearest_vertex_co)) { + len_squared_v3v3(location, nearest_vertex_co)) + { copy_v3_v3(nearest_vertex_co, co[j]); r_active_vertex->i = gridkey->grid_area * grid_index + diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.cc b/source/blender/blenkernel/intern/pbvh_bmesh.cc index 96d212ba3d6..4b55ea9b7d8 100644 --- a/source/blender/blenkernel/intern/pbvh_bmesh.cc +++ b/source/blender/blenkernel/intern/pbvh_bmesh.cc @@ -1793,8 +1793,9 @@ bool bmesh_node_raycast(PBVHNode *node, float location[3] = {0.0f}; madd_v3_v3v3fl(location, ray_start, ray_normal, *depth); for (const int j : IndexRange(3)) { - if (j == 0 || len_squared_v3v3(location, cos[j]) < - len_squared_v3v3(location, nearest_vertex_co)) { + if (j == 0 || + len_squared_v3v3(location, cos[j]) < len_squared_v3v3(location, nearest_vertex_co)) + { copy_v3_v3(nearest_vertex_co, cos[j]); r_active_vertex->i = intptr_t(node->bm_orvert[node->bm_ortri[i][j]]); } @@ -1994,7 +1995,8 @@ static void pbvh_bmesh_node_limit_ensure_fast(PBVH *pbvh, BMFace *f_iter = nodeinfo[i_iter]; const int face_iter_i = BM_elem_index_get(f_iter); if (math::midpoint(face_bounds[face_iter_i].min[axis], - face_bounds[face_iter_i].max[axis]) <= mid) { + face_bounds[face_iter_i].max[axis]) <= mid) + { candidate = i_iter; break; } diff --git a/source/blender/blenkernel/intern/pbvh_pixels.cc b/source/blender/blenkernel/intern/pbvh_pixels.cc index 49cb7aa2f0e..b5445f40117 100644 --- a/source/blender/blenkernel/intern/pbvh_pixels.cc +++ b/source/blender/blenkernel/intern/pbvh_pixels.cc @@ -443,7 +443,8 @@ struct UVPrimitiveLookup { uint64_t uv_island_index = 0; for (uv_islands::UVIsland &uv_island : uv_islands.islands) { for (VectorList::UsedVector &uv_primitives : - uv_island.uv_primitives) { + uv_island.uv_primitives) + { for (uv_islands::UVPrimitive &uv_primitive : uv_primitives) { lookup[uv_primitive.primitive_i].append_as(Entry(&uv_primitive, uv_island_index)); } @@ -487,7 +488,8 @@ static void do_encode_pixels(EncodePixelsUserData *data, const int n) for (const int geom_prim_index : node->prim_indices) { for (const UVPrimitiveLookup::Entry &entry : - data->uv_primitive_lookup->lookup[geom_prim_index]) { + data->uv_primitive_lookup->lookup[geom_prim_index]) + { uv_islands::UVBorder uv_border = entry.uv_primitive->extract_border(); float2 uvs[3] = { entry.uv_primitive->get_uv_vertex(mesh_data, 0)->uv - tile_offset, @@ -735,7 +737,7 @@ static bool update_pixels(PBVH *pbvh, Mesh *mesh, Image *image, ImageUser *image } } -//#define DO_PRINT_STATISTICS +// #define DO_PRINT_STATISTICS #ifdef DO_PRINT_STATISTICS /* Print some statistics about compression ratio. */ { diff --git a/source/blender/blenkernel/intern/pbvh_pixels_copy.cc b/source/blender/blenkernel/intern/pbvh_pixels_copy.cc index e0bd1e4a7b2..9318fb279fa 100644 --- a/source/blender/blenkernel/intern/pbvh_pixels_copy.cc +++ b/source/blender/blenkernel/intern/pbvh_pixels_copy.cc @@ -95,8 +95,7 @@ static const Edge convert_coord_space(const Edge> { -}; +class NonManifoldTileEdges : public Vector> {}; class NonManifoldUVEdges : public Vector> { public: diff --git a/source/blender/blenkernel/intern/pbvh_uv_islands.cc b/source/blender/blenkernel/intern/pbvh_uv_islands.cc index 97ea043de2f..cc2a6f301fe 100644 --- a/source/blender/blenkernel/intern/pbvh_uv_islands.cc +++ b/source/blender/blenkernel/intern/pbvh_uv_islands.cc @@ -345,7 +345,8 @@ UVEdge *UVIsland::lookup(const UVEdge &edge) for (UVEdge *e : found_vertex->uv_edges) { UVVertex *other_vertex = e->get_other_uv_vertex(found_vertex->vertex); if (other_vertex->vertex == edge.vertices[1]->vertex && - other_vertex->uv == edge.vertices[1]->uv) { + other_vertex->uv == edge.vertices[1]->uv) + { return e; } } diff --git a/source/blender/blenkernel/intern/pointcache.cc b/source/blender/blenkernel/intern/pointcache.cc index 026c1314366..336a206c0a9 100644 --- a/source/blender/blenkernel/intern/pointcache.cc +++ b/source/blender/blenkernel/intern/pointcache.cc @@ -93,7 +93,7 @@ #define PTCACHE_DATA_TO(data, type, index, to) \ if (data[type]) { \ memcpy(to, \ - (char *)(data)[type] + ((index) ? (index)*ptcache_data_size[type] : 0), \ + (char *)(data)[type] + ((index) ? (index) * ptcache_data_size[type] : 0), \ ptcache_data_size[type]); \ } \ (void)0 @@ -1651,7 +1651,8 @@ static int ptcache_file_data_write(PTCacheFile *pf) for (i = 0; i < BPHYS_TOT_DATA; i++) { if ((pf->data_types & (1 << i)) && - !ptcache_file_write(pf, pf->cur[i], 1, ptcache_data_size[i])) { + !ptcache_file_write(pf, pf->cur[i], 1, ptcache_data_size[i])) + { return 0; } } @@ -2993,7 +2994,8 @@ int BKE_ptcache_object_reset(Scene *scene, Object *ob, int mode) FluidModifierData *fmd = (FluidModifierData *)md; FluidDomainSettings *fds = fmd->domain; if ((fmd->type & MOD_FLUID_TYPE_DOMAIN) && fds && - fds->cache_type == FLUID_DOMAIN_CACHE_REPLAY) { + fds->cache_type == FLUID_DOMAIN_CACHE_REPLAY) + { BKE_ptcache_id_from_smoke(&pid, ob, fmd); reset |= BKE_ptcache_id_reset(scene, &pid, mode); } @@ -3835,7 +3837,8 @@ static void direct_link_pointcache_cb(BlendDataReader *reader, void *data) /* the cache saves non-struct data without DNA */ if (pm->data[i] && ptcache_data_struct[i][0] == '\0' && - BLO_read_requires_endian_switch(reader)) { + BLO_read_requires_endian_switch(reader)) + { /* data_size returns bytes. */ int tot = (BKE_ptcache_data_size(i) * pm->totpoint) / sizeof(int); diff --git a/source/blender/blenkernel/intern/rigidbody.cc b/source/blender/blenkernel/intern/rigidbody.cc index 97bf9ade451..f66a0b66b4f 100644 --- a/source/blender/blenkernel/intern/rigidbody.cc +++ b/source/blender/blenkernel/intern/rigidbody.cc @@ -316,7 +316,8 @@ void BKE_rigidbody_object_copy(Main *bmain, Object *ob_dst, const Object *ob_src } if ((flag & LIB_ID_CREATE_NO_DEG_TAG) == 0 && - (need_objects_update || need_constraints_update)) { + (need_objects_update || need_constraints_update)) + { BKE_rigidbody_cache_reset(rigidbody_world); DEG_relations_tag_update(bmain); @@ -2044,7 +2045,8 @@ static void rigidbody_update_external_forces(Depsgraph *depsgraph, /* update influence of effectors - but don't do it on an effector */ /* only dynamic bodies need effector update */ if (rbo->type == RBO_TYPE_ACTIVE && - ((ob->pd == nullptr) || (ob->pd->forcefield == PFIELD_NULL))) { + ((ob->pd == nullptr) || (ob->pd->forcefield == PFIELD_NULL))) + { EffectorWeights *effector_weights = rbw->effector_weights; EffectedPoint epoint; ListBase *effectors; diff --git a/source/blender/blenkernel/intern/shrinkwrap.cc b/source/blender/blenkernel/intern/shrinkwrap.cc index a0547e9ecdb..85c04932825 100644 --- a/source/blender/blenkernel/intern/shrinkwrap.cc +++ b/source/blender/blenkernel/intern/shrinkwrap.cc @@ -550,7 +550,8 @@ static void shrinkwrap_calc_normal_projection_cb_ex(void *__restrict userdata, char options = calc->smd->shrinkOpts; if ((options & MOD_SHRINKWRAP_INVERT_CULL_TARGET) && - (options & MOD_SHRINKWRAP_CULL_TARGET_MASK)) { + (options & MOD_SHRINKWRAP_CULL_TARGET_MASK)) + { options ^= MOD_SHRINKWRAP_CULL_TARGET_MASK; } @@ -561,7 +562,8 @@ static void shrinkwrap_calc_normal_projection_cb_ex(void *__restrict userdata, } if (BKE_shrinkwrap_project_normal( - options, tmp_co, inv_no, 0.0, &calc->local2target, tree, hit)) { + options, tmp_co, inv_no, 0.0, &calc->local2target, tree, hit)) + { is_aux = false; } } @@ -704,7 +706,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc) * The actual solution vector is [ w0, w1, l ], with w2 eliminated. */ -//#define TRACE_TARGET_PROJECT +// #define TRACE_TARGET_PROJECT struct TargetProjectTriData { const float **vtri_co; diff --git a/source/blender/blenkernel/intern/subdiv_foreach.cc b/source/blender/blenkernel/intern/subdiv_foreach.cc index b61ca665241..5f699c1dc36 100644 --- a/source/blender/blenkernel/intern/subdiv_foreach.cc +++ b/source/blender/blenkernel/intern/subdiv_foreach.cc @@ -421,7 +421,8 @@ static void subdiv_foreach_edge_vertices_regular_do(SubdivForeachTaskContext *ct const int coarse_vert = ctx->coarse_corner_verts[coarse_face[corner]]; const int coarse_edge_index = ctx->coarse_corner_edges[coarse_face[corner]]; if (check_usage && - BLI_BITMAP_TEST_AND_SET_ATOMIC(ctx->coarse_edges_used_map, coarse_edge_index)) { + BLI_BITMAP_TEST_AND_SET_ATOMIC(ctx->coarse_edges_used_map, coarse_edge_index)) + { continue; } const int2 &coarse_edge = ctx->coarse_edges[coarse_edge_index]; @@ -485,7 +486,8 @@ static void subdiv_foreach_edge_vertices_special_do(SubdivForeachTaskContext *ct const int coarse_vert = ctx->coarse_corner_verts[coarse_face[corner]]; const int coarse_edge_index = ctx->coarse_corner_edges[coarse_face[corner]]; if (check_usage && - BLI_BITMAP_TEST_AND_SET_ATOMIC(ctx->coarse_edges_used_map, coarse_edge_index)) { + BLI_BITMAP_TEST_AND_SET_ATOMIC(ctx->coarse_edges_used_map, coarse_edge_index)) + { continue; } const int2 &coarse_edge = ctx->coarse_edges[coarse_edge_index]; diff --git a/source/blender/blenkernel/intern/subdiv_mesh.cc b/source/blender/blenkernel/intern/subdiv_mesh.cc index a003de5aa7b..4323bec6a36 100644 --- a/source/blender/blenkernel/intern/subdiv_mesh.cc +++ b/source/blender/blenkernel/intern/subdiv_mesh.cc @@ -892,7 +892,8 @@ static void subdiv_mesh_ensure_loop_interpolation(SubdivMeshContext *ctx, } /* Update it for a new corner if needed. */ if (!tls->loop_interpolation_initialized || - tls->loop_interpolation_coarse_corner != coarse_corner) { + tls->loop_interpolation_coarse_corner != coarse_corner) + { loop_interpolation_from_corner(ctx, &tls->loop_interpolation, coarse_face, coarse_corner); } /* Store settings used for the current state of interpolator. */ diff --git a/source/blender/blenkernel/intern/tracking.cc b/source/blender/blenkernel/intern/tracking.cc index 8c80cf49427..287f2592556 100644 --- a/source/blender/blenkernel/intern/tracking.cc +++ b/source/blender/blenkernel/intern/tracking.cc @@ -2527,7 +2527,7 @@ void BKE_tracking_max_distortion_delta_across_bound(MovieTracking *tracking, { float pos[2], warped_pos[2]; const int coord_delta = 5; - void (*apply_distortion)(MovieTracking * tracking, + void (*apply_distortion)(MovieTracking *tracking, int image_width, int image_height, const float pos[2], diff --git a/source/blender/blenkernel/intern/vfont.cc b/source/blender/blenkernel/intern/vfont.cc index 0afdd5fc5fc..6f67150acba 100644 --- a/source/blender/blenkernel/intern/vfont.cc +++ b/source/blender/blenkernel/intern/vfont.cc @@ -117,7 +117,8 @@ static void vfont_foreach_path(ID *id, BPathForeachPathData *bpath_data) VFont *vfont = (VFont *)id; if ((vfont->packedfile != nullptr) && - (bpath_data->flag & BKE_BPATH_FOREACH_PATH_SKIP_PACKED) != 0) { + (bpath_data->flag & BKE_BPATH_FOREACH_PATH_SKIP_PACKED) != 0) + { return; } @@ -1249,7 +1250,8 @@ static bool vfont_to_curve(Object *ob, } for (i = 0; i <= slen; i++) { for (j = i; !ELEM(mem[j], '\0', '\n') && (chartransdata[j].dobreak == 0) && (j < slen); - j++) { + j++) + { /* do nothing */ } @@ -1263,7 +1265,8 @@ static bool vfont_to_curve(Object *ob, float curofs = 0.0f; for (i = 0; i <= slen; i++) { for (j = i; (mem[j]) && (mem[j] != '\n') && (chartransdata[j].dobreak == 0) && (j < slen); - j++) { + j++) + { /* pass */ } diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc index e0ddffc684b..85d2dce0d84 100644 --- a/source/blender/blenkernel/intern/volume.cc +++ b/source/blender/blenkernel/intern/volume.cc @@ -205,7 +205,8 @@ static void volume_foreach_path(ID *id, BPathForeachPathData *bpath_data) Volume *volume = reinterpret_cast(id); if (volume->packedfile != nullptr && - (bpath_data->flag & BKE_BPATH_FOREACH_PATH_SKIP_PACKED) != 0) { + (bpath_data->flag & BKE_BPATH_FOREACH_PATH_SKIP_PACKED) != 0) + { return; } diff --git a/source/blender/blenkernel/intern/writeffmpeg.cc b/source/blender/blenkernel/intern/writeffmpeg.cc index bf530be42ea..1e66a19e6db 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.cc +++ b/source/blender/blenkernel/intern/writeffmpeg.cc @@ -783,7 +783,8 @@ static AVStream *alloc_video_stream(FFMpegContext *context, if (c->time_base.num != 1) { AVRational new_time_base; if (av_reduce( - &new_time_base.num, &new_time_base.den, c->time_base.num, c->time_base.den, INT_MAX)) { + &new_time_base.num, &new_time_base.den, c->time_base.num, c->time_base.den, INT_MAX)) + { /* Exact reduction was possible. Use the new value. */ c->time_base = new_time_base; } diff --git a/source/blender/blenlib/BLI_assert.h b/source/blender/blenlib/BLI_assert.h index 2019aaa3af6..a26594fdf0c 100644 --- a/source/blender/blenlib/BLI_assert.h +++ b/source/blender/blenlib/BLI_assert.h @@ -32,11 +32,11 @@ void _BLI_assert_unreachable_print(const char *file, int line, const char *funct #ifndef NDEBUG /* _BLI_ASSERT_PRINT_POS */ # if defined(__GNUC__) -# define _BLI_ASSERT_PRINT_POS(a) _BLI_assert_print_pos(__FILE__, __LINE__, __func__, # a) +# define _BLI_ASSERT_PRINT_POS(a) _BLI_assert_print_pos(__FILE__, __LINE__, __func__, #a) # elif defined(_MSC_VER) -# define _BLI_ASSERT_PRINT_POS(a) _BLI_assert_print_pos(__FILE__, __LINE__, __func__, # a) +# define _BLI_ASSERT_PRINT_POS(a) _BLI_assert_print_pos(__FILE__, __LINE__, __func__, #a) # else -# define _BLI_ASSERT_PRINT_POS(a) _BLI_assert_print_pos(__FILE__, __LINE__, "", # a) +# define _BLI_ASSERT_PRINT_POS(a) _BLI_assert_print_pos(__FILE__, __LINE__, "", #a) # endif /* _BLI_ASSERT_ABORT */ # ifdef WITH_ASSERT_ABORT diff --git a/source/blender/blenlib/BLI_bitmap.h b/source/blender/blenlib/BLI_bitmap.h index a04d1170993..8439cfa0dae 100644 --- a/source/blender/blenlib/BLI_bitmap.h +++ b/source/blender/blenlib/BLI_bitmap.h @@ -64,13 +64,13 @@ typedef unsigned int BLI_bitmap; */ #define BLI_BITMAP_TEST(_bitmap, _index) \ (CHECK_TYPE_ANY(_bitmap, BLI_bitmap *, const BLI_bitmap *), \ - ((_bitmap)[(_index) >> _BITMAP_POWER] & (1u << ((_index)&_BITMAP_MASK)))) + ((_bitmap)[(_index) >> _BITMAP_POWER] & (1u << ((_index) & _BITMAP_MASK)))) #define BLI_BITMAP_TEST_AND_SET_ATOMIC(_bitmap, _index) \ (CHECK_TYPE_ANY(_bitmap, BLI_bitmap *, const BLI_bitmap *), \ (atomic_fetch_and_or_uint32((uint32_t *)&(_bitmap)[(_index) >> _BITMAP_POWER], \ - (1u << ((_index)&_BITMAP_MASK))) & \ - (1u << ((_index)&_BITMAP_MASK)))) + (1u << ((_index) & _BITMAP_MASK))) & \ + (1u << ((_index) & _BITMAP_MASK)))) #define BLI_BITMAP_TEST_BOOL(_bitmap, _index) \ (CHECK_TYPE_ANY(_bitmap, BLI_bitmap *, const BLI_bitmap *), \ @@ -81,21 +81,21 @@ typedef unsigned int BLI_bitmap; */ #define BLI_BITMAP_ENABLE(_bitmap, _index) \ (CHECK_TYPE_ANY(_bitmap, BLI_bitmap *, const BLI_bitmap *), \ - ((_bitmap)[(_index) >> _BITMAP_POWER] |= (1u << ((_index)&_BITMAP_MASK)))) + ((_bitmap)[(_index) >> _BITMAP_POWER] |= (1u << ((_index) & _BITMAP_MASK)))) /** * Clear the value of a single bit at '_index'. */ #define BLI_BITMAP_DISABLE(_bitmap, _index) \ (CHECK_TYPE_ANY(_bitmap, BLI_bitmap *, const BLI_bitmap *), \ - ((_bitmap)[(_index) >> _BITMAP_POWER] &= ~(1u << ((_index)&_BITMAP_MASK)))) + ((_bitmap)[(_index) >> _BITMAP_POWER] &= ~(1u << ((_index) & _BITMAP_MASK)))) /** * Flip the value of a single bit at '_index'. */ #define BLI_BITMAP_FLIP(_bitmap, _index) \ (CHECK_TYPE_ANY(_bitmap, BLI_bitmap *, const BLI_bitmap *), \ - ((_bitmap)[(_index) >> _BITMAP_POWER] ^= (1u << ((_index)&_BITMAP_MASK)))) + ((_bitmap)[(_index) >> _BITMAP_POWER] ^= (1u << ((_index) & _BITMAP_MASK)))) /** * Set or clear the value of a single bit at '_index'. diff --git a/source/blender/blenlib/BLI_compiler_typecheck.h b/source/blender/blenlib/BLI_compiler_typecheck.h index 5a793f9c9fb..58f6957a753 100644 --- a/source/blender/blenlib/BLI_compiler_typecheck.h +++ b/source/blender/blenlib/BLI_compiler_typecheck.h @@ -57,10 +57,10 @@ /* can be used in simple macros */ #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) # define CHECK_TYPE_INLINE(val, type) \ - (void)((void)(((type)0) != (0 ? (val) : ((type)0))), _Generic((val), type : 0, const type : 0)) + (void)((void)(((type)0) != (0 ? (val) : ((type)0))), _Generic((val), type: 0, const type: 0)) /* NOTE: The NONCONST version is needed for scalar types on CLANG, to avoid warnings. */ # define CHECK_TYPE_INLINE_NONCONST(val, type) \ - (void)((void)(((type)0) != (0 ? (val) : ((type)0))), _Generic((val), type : 0)) + (void)((void)(((type)0) != (0 ? (val) : ((type)0))), _Generic((val), type: 0)) #else # define CHECK_TYPE_INLINE_NONCONST(val, type) ((void)(((type)0) != (0 ? (val) : ((type)0)))) # define CHECK_TYPE_INLINE(val, type) ((void)(((type)0) != (0 ? (val) : ((type)0)))) diff --git a/source/blender/blenlib/BLI_dot_export.hh b/source/blender/blenlib/BLI_dot_export.hh index 8d3d547b0bf..e8b82049e76 100644 --- a/source/blender/blenlib/BLI_dot_export.hh +++ b/source/blender/blenlib/BLI_dot_export.hh @@ -248,10 +248,8 @@ struct NodeWithSockets { std::string name; std::optional fontcolor; }; - struct Input : public Socket { - }; - struct Output : public Socket { - }; + struct Input : public Socket {}; + struct Output : public Socket {}; std::string node_name; Vector inputs; diff --git a/source/blender/blenlib/BLI_generic_virtual_array.hh b/source/blender/blenlib/BLI_generic_virtual_array.hh index 2893f975fe7..e9cf2092d1c 100644 --- a/source/blender/blenlib/BLI_generic_virtual_array.hh +++ b/source/blender/blenlib/BLI_generic_virtual_array.hh @@ -229,7 +229,7 @@ class GVMutableArray : public GVArrayCommon { static GVMutableArray ForSpan(GMutableSpan span); operator GVArray() const &; - operator GVArray() &&noexcept; + operator GVArray() && noexcept; GVMutableArray &operator=(const GVMutableArray &other); GVMutableArray &operator=(GVMutableArray &&other) noexcept; diff --git a/source/blender/blenlib/BLI_hash.hh b/source/blender/blenlib/BLI_hash.hh index f5ba7128ff2..af88d5c5061 100644 --- a/source/blender/blenlib/BLI_hash.hh +++ b/source/blender/blenlib/BLI_hash.hh @@ -255,10 +255,8 @@ template struct PointerHashes { } }; -template struct DefaultHash> : public PointerHashes { -}; -template struct DefaultHash> : public PointerHashes { -}; +template struct DefaultHash> : public PointerHashes {}; +template struct DefaultHash> : public PointerHashes {}; template struct DefaultHash> { uint64_t operator()(const std::reference_wrapper &value) const diff --git a/source/blender/blenlib/BLI_hash_tables.hh b/source/blender/blenlib/BLI_hash_tables.hh index f7b6386e331..978358670d0 100644 --- a/source/blender/blenlib/BLI_hash_tables.hh +++ b/source/blender/blenlib/BLI_hash_tables.hh @@ -327,10 +327,8 @@ struct PointerComparison { } }; -template struct DefaultEquality> : public PointerComparison { -}; -template struct DefaultEquality> : public PointerComparison { -}; +template struct DefaultEquality> : public PointerComparison {}; +template struct DefaultEquality> : public PointerComparison {}; struct SequenceComparison { template bool operator()(const T1 &a, const T2 &b) const @@ -347,7 +345,6 @@ struct SequenceComparison { }; template -struct DefaultEquality> : public SequenceComparison { -}; +struct DefaultEquality> : public SequenceComparison {}; } // namespace blender diff --git a/source/blender/blenlib/BLI_map_slots.hh b/source/blender/blenlib/BLI_map_slots.hh index 58ff68b87b1..816ab95f552 100644 --- a/source/blender/blenlib/BLI_map_slots.hh +++ b/source/blender/blenlib/BLI_map_slots.hh @@ -96,8 +96,8 @@ template class SimpleMapSlot { * from the other have to moved as well. The other slot stays in the state it was in before. Its * optionally stored key and value remain in a moved-from state. */ - SimpleMapSlot(SimpleMapSlot &&other) noexcept( - std::is_nothrow_move_constructible_v &&std::is_nothrow_move_constructible_v) + SimpleMapSlot(SimpleMapSlot &&other) noexcept(std::is_nothrow_move_constructible_v && + std::is_nothrow_move_constructible_v) { state_ = other.state_; if (other.state_ == Occupied) { diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h index 420fbb9a11d..d841a9d1ae3 100644 --- a/source/blender/blenlib/BLI_math_color.h +++ b/source/blender/blenlib/BLI_math_color.h @@ -177,7 +177,7 @@ MINLINE void float_to_byte_dither_v3( unsigned char b[3], const float f[3], float dither, float s, float t); #define rgba_char_args_set_fl(col, r, g, b, a) \ - rgba_char_args_set(col, (r)*255, (g)*255, (b)*255, (a)*255) + rgba_char_args_set(col, (r) * 255, (g) * 255, (b) * 255, (a) * 255) #define rgba_float_args_set_ch(col, r, g, b, a) \ rgba_float_args_set(col, (r) / 255.0f, (g) / 255.0f, (b) / 255.0f, (a) / 255.0f) diff --git a/source/blender/blenlib/BLI_memory_utils.hh b/source/blender/blenlib/BLI_memory_utils.hh index bec02817f25..0f3768ebf4e 100644 --- a/source/blender/blenlib/BLI_memory_utils.hh +++ b/source/blender/blenlib/BLI_memory_utils.hh @@ -117,8 +117,7 @@ template using destruct_ptr = std::unique_ptr class AlignedBuffer { - struct Empty { - }; + struct Empty {}; struct alignas(Alignment) Sized { /* Don't create an empty array. This causes problems with some compilers. */ std::byte buffer_[Size > 0 ? Size : 1]; @@ -270,8 +269,7 @@ class alignas(ReservedAlignment) DynamicStackBuffer { * This can be used by container constructors. A parameter of this type should be used to indicate * that the constructor does not construct the elements. */ -class NoInitialization { -}; +class NoInitialization {}; /** * This can be used to mark a constructor of an object that does not throw exceptions. Other @@ -279,8 +277,7 @@ class NoInitialization { * With this, the destructor of the object will be called, even when the remaining constructor * throws. */ -class NoExceptConstructor { -}; +class NoExceptConstructor {}; /** * Helper variable that checks if a pointer type can be converted into another pointer type without @@ -288,8 +285,8 @@ class NoExceptConstructor { * Adding const or casting to a parent class is fine. */ template -inline constexpr bool is_convertible_pointer_v = - std::is_convertible_v &&std::is_pointer_v &&std::is_pointer_v; +inline constexpr bool is_convertible_pointer_v = std::is_convertible_v && + std::is_pointer_v && std::is_pointer_v; /** * Helper variable that checks if a Span can be converted to Span safely, whereby From @@ -300,7 +297,7 @@ inline constexpr bool is_convertible_pointer_v = template inline constexpr bool is_span_convertible_pointer_v = /* Make sure we are working with pointers. */ - std::is_pointer_v &&std::is_pointer_v && + std::is_pointer_v && std::is_pointer_v && (/* No casting is necessary when both types are the same. */ std::is_same_v || /* Allow adding const to the underlying type. */ diff --git a/source/blender/blenlib/BLI_parameter_pack_utils.hh b/source/blender/blenlib/BLI_parameter_pack_utils.hh index 056f526d23d..6602fb76c04 100644 --- a/source/blender/blenlib/BLI_parameter_pack_utils.hh +++ b/source/blender/blenlib/BLI_parameter_pack_utils.hh @@ -96,8 +96,8 @@ template inline ValueSequence::template contains() ? Value1 : Value2)...> - make_two_value_sequence_impl(ValueSequence /*value1_indices*/, - std::index_sequence /*indices*/) +make_two_value_sequence_impl(ValueSequence /*value1_indices*/, + std::index_sequence /*indices*/) { return {}; }; diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 509ac860475..5e0ef9a67f6 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -878,10 +878,8 @@ extern bool BLI_memory_is_zero(const void *arr, size_t arr_size); namespace blender::blenlib_internal { /* A replacement for std::is_bounded_array_v until we go C++20. */ -template struct IsBoundedArray : std::false_type { -}; -template struct IsBoundedArray : std::true_type { -}; +template struct IsBoundedArray : std::false_type {}; +template struct IsBoundedArray : std::true_type {}; } // namespace blender::blenlib_internal diff --git a/source/blender/blenlib/BLI_utildefines_iter.h b/source/blender/blenlib/BLI_utildefines_iter.h index 0b993487c61..cae8a3010f3 100644 --- a/source/blender/blenlib/BLI_utildefines_iter.h +++ b/source/blender/blenlib/BLI_utildefines_iter.h @@ -26,6 +26,11 @@ * \note this is mainly useful for numbers that might not divide evenly into each other. */ #define BLI_FOREACH_SPARSE_RANGE(src, dst, i) \ - for (int _src = (src), _src2 = _src * 2, _dst2 = (dst)*2, _error = _dst2 - _src, i = 0, _delta; \ + for (int _src = (src), \ + _src2 = _src * 2, \ + _dst2 = (dst) * 2, \ + _error = _dst2 - _src, \ + i = 0, \ + _delta; \ ((void)(_delta = divide_floor_i(_error, _dst2)), (void)(i -= _delta), (i < _src)); \ _error -= (_delta * _dst2) + _src2) diff --git a/source/blender/blenlib/BLI_virtual_array.hh b/source/blender/blenlib/BLI_virtual_array.hh index 0042ddb46f7..a74d5aa21c0 100644 --- a/source/blender/blenlib/BLI_virtual_array.hh +++ b/source/blender/blenlib/BLI_virtual_array.hh @@ -786,12 +786,9 @@ template class VMutableArray; * construct the virtual array first and then move it into the vector. */ namespace varray_tag { -struct span { -}; -struct single_ref { -}; -struct single { -}; +struct span {}; +struct single_ref {}; +struct single {}; } // namespace varray_tag /** @@ -948,7 +945,7 @@ template class VMutableArray : public VArrayCommon { } /** Convert to a #VArray by moving. */ - operator VArray() &&noexcept + operator VArray() && noexcept { VArray varray; varray.move_from(std::move(*this)); diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h index 4fe5d06c5e0..c71964ded14 100644 --- a/source/blender/blenlib/BLI_winstuff.h +++ b/source/blender/blenlib/BLI_winstuff.h @@ -47,17 +47,17 @@ extern "C" { #endif #ifndef S_ISREG -# define S_ISREG(x) (((x)&_S_IFREG) == _S_IFREG) +# define S_ISREG(x) (((x) & _S_IFREG) == _S_IFREG) #endif #ifndef S_ISDIR -# define S_ISDIR(x) (((x)&_S_IFDIR) == _S_IFDIR) +# define S_ISDIR(x) (((x) & _S_IFDIR) == _S_IFDIR) #endif #if defined(_MSC_VER) # define R_OK 4 # define W_OK 2 /* Not accepted by `access()` on windows. */ -//# define X_OK 1 +// # define X_OK 1 # define F_OK 0 #endif diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c index 177275f7627..cda177beb35 100644 --- a/source/blender/blenlib/intern/BLI_ghash.c +++ b/source/blender/blenlib/intern/BLI_ghash.c @@ -58,8 +58,8 @@ BLI_STATIC_ASSERT(ARRAY_SIZE(hashsizes) == GHASH_MAX_SIZE, "Invalid 'hashsizes' * about 25% - 30% quicker 'dynamic-topology' stroke drawing e.g.). * Min load #GHASH_LIMIT_SHRINK is a quarter of max load, to avoid resizing to quickly. */ -#define GHASH_LIMIT_GROW(_nbkt) (((_nbkt)*3) / 4) -#define GHASH_LIMIT_SHRINK(_nbkt) (((_nbkt)*3) / 16) +#define GHASH_LIMIT_GROW(_nbkt) (((_nbkt) * 3) / 4) +#define GHASH_LIMIT_SHRINK(_nbkt) (((_nbkt) * 3) / 16) /* WARNING! Keep in sync with ugly _gh_Entry in header!!! */ typedef struct Entry { diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index edd6139f1ee..b748ea3bfe7 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -1578,7 +1578,8 @@ static void dfs_find_nearest_dfs(BVHNearestData *data, BVHNode *node) for (i = 0; i != node->node_num; i++) { if (calc_nearest_point_squared(data->proj, node->children[i], nearest) >= - data->nearest.dist_sq) { + data->nearest.dist_sq) + { continue; } dfs_find_nearest_dfs(data, node->children[i]); @@ -1587,7 +1588,8 @@ static void dfs_find_nearest_dfs(BVHNearestData *data, BVHNode *node) else { for (i = node->node_num - 1; i >= 0; i--) { if (calc_nearest_point_squared(data->proj, node->children[i], nearest) >= - data->nearest.dist_sq) { + data->nearest.dist_sq) + { continue; } dfs_find_nearest_dfs(data, node->children[i]); @@ -1642,7 +1644,8 @@ static void heap_find_nearest_begin(BVHNearestData *data, BVHNode *root) heap_find_nearest_inner(data, heap, root); while (!BLI_heapsimple_is_empty(heap) && - BLI_heapsimple_top_value(heap) < data->nearest.dist_sq) { + BLI_heapsimple_top_value(heap) < data->nearest.dist_sq) + { BVHNode *node = BLI_heapsimple_pop_min(heap); heap_find_nearest_inner(data, heap, node); } diff --git a/source/blender/blenlib/intern/array_store.c b/source/blender/blenlib/intern/array_store.c index 51c4aa8b387..fe574541e8b 100644 --- a/source/blender/blenlib/intern/array_store.c +++ b/source/blender/blenlib/intern/array_store.c @@ -1223,7 +1223,8 @@ static BChunkList *bchunk_list_from_data_merge(const BArrayInfo *info, BLI_assert(i != i_prev); if ((cref != chunk_list_reference_last) && - bchunk_data_compare(cref->link, data, data_len, i_prev)) { + bchunk_data_compare(cref->link, data, data_len, i_prev)) + { bchunk_list_append(info, bs_mem, chunk_list, cref->link); ASSERT_CHUNKLIST_SIZE(chunk_list, i); ASSERT_CHUNKLIST_DATA(chunk_list, data); diff --git a/source/blender/blenlib/intern/array_utils.c b/source/blender/blenlib/intern/array_utils.c index 20abcfe3b80..9b7544ab94e 100644 --- a/source/blender/blenlib/intern/array_utils.c +++ b/source/blender/blenlib/intern/array_utils.c @@ -241,7 +241,8 @@ bool _bli_array_iter_span(const void *arr, else { uint i_step = i_curr + 1; while ((i_step != arr_len) && - test_fn(POINTER_OFFSET(arr, i_step * arr_stride_uint), user_data)) { + test_fn(POINTER_OFFSET(arr, i_step * arr_stride_uint), user_data)) + { i_step_prev = i_step; i_step++; } diff --git a/source/blender/blenlib/intern/expr_pylike_eval.c b/source/blender/blenlib/intern/expr_pylike_eval.c index a3c3ac976ab..2938f499768 100644 --- a/source/blender/blenlib/intern/expr_pylike_eval.c +++ b/source/blender/blenlib/intern/expr_pylike_eval.c @@ -581,7 +581,8 @@ static bool parse_add_func(ExprParseState *state, eOpCode code, int args, void * CHECK_ERROR(args == 2); if (jmp_gap >= 2 && prev_ops[-2].opcode == OPCODE_CONST && - prev_ops[-1].opcode == OPCODE_CONST) { + prev_ops[-1].opcode == OPCODE_CONST) + { BinaryOpFunc func = funcptr; /* volatile because some compilers overly aggressive optimize this call out. @@ -818,7 +819,8 @@ static bool parse_unary(ExprParseState *state) if (args != opcode_arg_count(builtin_ops[i].op)) { for (int j = i + 1; builtin_ops[j].name; j++) { if (opcode_arg_count(builtin_ops[j].op) == args && - STREQ(builtin_ops[j].name, builtin_ops[i].name)) { + STREQ(builtin_ops[j].name, builtin_ops[i].name)) + { i = j; break; } diff --git a/source/blender/blenlib/intern/fileops_c.cc b/source/blender/blenlib/intern/fileops_c.cc index 3aae8892caf..77da8a12724 100644 --- a/source/blender/blenlib/intern/fileops_c.cc +++ b/source/blender/blenlib/intern/fileops_c.cc @@ -1068,8 +1068,8 @@ static int delete_soft(const char *file, const char **error_message) Class NSStringClass = objc_getClass("NSString"); SEL stringWithUTF8StringSel = sel_registerName("stringWithUTF8String:"); - id pathString = (( - id(*)(Class, SEL, const char *))objc_msgSend)(NSStringClass, stringWithUTF8StringSel, file); + id pathString = ((id(*)(Class, SEL, const char *))objc_msgSend)( + NSStringClass, stringWithUTF8StringSel, file); Class NSFileManagerClass = objc_getClass("NSFileManager"); SEL defaultManagerSel = sel_registerName("defaultManager"); @@ -1080,8 +1080,8 @@ static int delete_soft(const char *file, const char **error_message) id nsurl = ((id(*)(Class, SEL, id))objc_msgSend)(NSURLClass, fileURLWithPathSel, pathString); SEL trashItemAtURLSel = sel_registerName("trashItemAtURL:resultingItemURL:error:"); - BOOL deleteSuccessful = (( - BOOL(*)(id, SEL, id, id, id))objc_msgSend)(fileManager, trashItemAtURLSel, nsurl, nil, nil); + BOOL deleteSuccessful = ((BOOL(*)(id, SEL, id, id, id))objc_msgSend)( + fileManager, trashItemAtURLSel, nsurl, nil, nil); if (deleteSuccessful) { ret = 0; diff --git a/source/blender/blenlib/intern/generic_virtual_array.cc b/source/blender/blenlib/intern/generic_virtual_array.cc index 6027273ecee..e0812456da0 100644 --- a/source/blender/blenlib/intern/generic_virtual_array.cc +++ b/source/blender/blenlib/intern/generic_virtual_array.cc @@ -758,7 +758,7 @@ GVMutableArray::operator GVArray() const & return varray; } -GVMutableArray::operator GVArray() &&noexcept +GVMutableArray::operator GVArray() && noexcept { GVArray varray; varray.move_from(std::move(*this)); diff --git a/source/blender/blenlib/intern/hash_md5.c b/source/blender/blenlib/intern/hash_md5.c index 821a11abd78..cb745eeb41b 100644 --- a/source/blender/blenlib/intern/hash_md5.c +++ b/source/blender/blenlib/intern/hash_md5.c @@ -71,7 +71,7 @@ struct md5_ctx { }; #ifdef __BIG_ENDIAN__ -# define SWAP(n) (((n) << 24) | (((n)&0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) +# define SWAP(n) (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) #else # define SWAP(n) (n) #endif diff --git a/source/blender/blenlib/intern/hash_mm2a.c b/source/blender/blenlib/intern/hash_mm2a.c index 634660c66ef..eeeccba43cc 100644 --- a/source/blender/blenlib/intern/hash_mm2a.c +++ b/source/blender/blenlib/intern/hash_mm2a.c @@ -30,7 +30,7 @@ (k) *= MM2A_M; \ (k) ^= (k) >> 24; \ (k) *= MM2A_M; \ - (h) = ((h)*MM2A_M) ^ (k); \ + (h) = ((h) * MM2A_M) ^ (k); \ } \ (void)0 diff --git a/source/blender/blenlib/intern/index_mask.cc b/source/blender/blenlib/intern/index_mask.cc index f5786d0e584..a21d3028382 100644 --- a/source/blender/blenlib/intern/index_mask.cc +++ b/source/blender/blenlib/intern/index_mask.cc @@ -508,7 +508,8 @@ IndexMask IndexMask::from_indices(const Span indices, IndexMaskMemory &memory return {}; } if (const std::optional range = unique_sorted_indices::non_empty_as_range_try( - indices)) { + indices)) + { /* Fast case when the indices encode a single range. */ return *range; } diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index d05988e1280..92e756f604d 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -232,10 +232,7 @@ MINLINE signed char round_db_to_char(double a){_round_db_impl(a, signed char)} M short round_db_to_short(double a){_round_db_impl(a, short)} MINLINE unsigned short round_db_to_ushort(double a){_round_db_impl(a, unsigned short)} MINLINE int round_db_to_int(double a){_round_db_impl(a, int)} MINLINE - unsigned int round_db_to_uint(double a) -{ - _round_db_impl(a, unsigned int) -} + unsigned int round_db_to_uint(double a){_round_db_impl(a, unsigned int)} #undef _round_fl_impl #undef _round_db_impl @@ -261,10 +258,8 @@ MINLINE signed char round_db_to_char_clamp(double a){ unsigned short round_db_to_ushort_clamp(double a){ _round_clamp_db_impl(a, unsigned short, 0, USHRT_MAX)} MINLINE int round_db_to_int_clamp(double a){_round_clamp_db_impl(a, int, INT_MIN, INT_MAX)} MINLINE - unsigned int round_db_to_uint_clamp(double a) -{ - _round_clamp_db_impl(a, unsigned int, 0, UINT_MAX) -} + unsigned int round_db_to_uint_clamp(double a){ + _round_clamp_db_impl(a, unsigned int, 0, UINT_MAX)} #undef _round_clamp_fl_impl #undef _round_clamp_db_impl diff --git a/source/blender/blenlib/intern/mesh_boolean.cc b/source/blender/blenlib/intern/mesh_boolean.cc index 1b99e7c396b..a3a95674328 100644 --- a/source/blender/blenlib/intern/mesh_boolean.cc +++ b/source/blender/blenlib/intern/mesh_boolean.cc @@ -2459,7 +2459,8 @@ static IMesh extract_from_in_output_volume_diffs(const IMesh &tm_subdivided, bool adjacent_zero_volume_cell = cell_above.zero_volume() || cell_below.zero_volume(); any_zero_volume_cell |= adjacent_zero_volume_cell; if (cell_above.in_output_volume() ^ cell_below.in_output_volume() && - !adjacent_zero_volume_cell) { + !adjacent_zero_volume_cell) + { bool flip = cell_above.in_output_volume(); if (dbg_level > 0) { std::cout << "need tri " << t << " flip=" << flip << "\n"; diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index 37da5110a22..f771940f206 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -26,7 +26,7 @@ static float noise3_perlin(const float vec[3]); * \{ */ /* needed for voronoi */ -#define HASHPNT(x, y, z) hashpntf + 3 * hash[(hash[(hash[(z)&255] + (y)) & 255] + (x)) & 255] +#define HASHPNT(x, y, z) hashpntf + 3 * hash[(hash[(hash[(z) & 255] + (y)) & 255] + (x)) & 255] static const float hashpntf[768] = { 0.536902, 0.020915, 0.501445, 0.216316, 0.517036, 0.822466, 0.965315, 0.377313, 0.678764, 0.744545, 0.097731, 0.396357, 0.247202, 0.520897, 0.613396, 0.542124, 0.146813, 0.255489, @@ -779,7 +779,7 @@ static float noise3_perlin(const float vec[3]) b01 = p[i + by1]; b11 = p[j + by1]; -#define VALUE_AT(rx, ry, rz) ((rx)*q[0] + (ry)*q[1] + (rz)*q[2]) +#define VALUE_AT(rx, ry, rz) ((rx) * q[0] + (ry) * q[1] + (rz) * q[2]) #define SURVE(t) ((t) * (t) * (3.0f - 2.0f * (t))) /* lerp moved to improved perlin above */ diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index ec739dd3b09..af93fb82205 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -545,14 +545,16 @@ static uint scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int flag) if (eed->v1->f == SF_VERT_ZERO_LEN) { v1 = eed->v1; while ((eed->v1->f == SF_VERT_ZERO_LEN) && (eed->v1->tmp.v != v1) && - (eed->v1 != eed->v1->tmp.v)) { + (eed->v1 != eed->v1->tmp.v)) + { eed->v1 = eed->v1->tmp.v; } } if (eed->v2->f == SF_VERT_ZERO_LEN) { v2 = eed->v2; while ((eed->v2->f == SF_VERT_ZERO_LEN) && (eed->v2->tmp.v != v2) && - (eed->v2 != eed->v2->tmp.v)) { + (eed->v2 != eed->v2->tmp.v)) + { eed->v2 = eed->v2->tmp.v; } } diff --git a/source/blender/blenlib/intern/string_cursor_utf8.c b/source/blender/blenlib/intern/string_cursor_utf8.c index f049894ed4f..d8c2f40f633 100644 --- a/source/blender/blenlib/intern/string_cursor_utf8.c +++ b/source/blender/blenlib/intern/string_cursor_utf8.c @@ -208,7 +208,8 @@ void BLI_str_cursor_step_utf8(const char *str, break; } if ((jump != STRCUR_JUMP_ALL) && - (delim_type != cursor_delim_type_utf8(str, str_maxlen, *pos))) { + (delim_type != cursor_delim_type_utf8(str, str_maxlen, *pos))) + { break; } } @@ -237,7 +238,8 @@ void BLI_str_cursor_step_utf8(const char *str, const int pos_prev = *pos; if (BLI_str_cursor_step_prev_utf8(str, str_maxlen, pos)) { if ((jump != STRCUR_JUMP_ALL) && - (delim_type != cursor_delim_type_utf8(str, str_maxlen, *pos))) { + (delim_type != cursor_delim_type_utf8(str, str_maxlen, *pos))) + { /* left only: compensate for index/change in direction */ if ((pos_orig - *pos) >= 1) { *pos = pos_prev; @@ -317,7 +319,8 @@ void BLI_str_cursor_step_utf32(const char32_t *str, while (*pos < str_maxlen) { if (BLI_str_cursor_step_next_utf32(str, str_maxlen, pos)) { if ((jump != STRCUR_JUMP_ALL) && - (delim_type != cursor_delim_type_unicode((uint)str[*pos]))) { + (delim_type != cursor_delim_type_unicode((uint)str[*pos]))) + { break; } } @@ -346,7 +349,8 @@ void BLI_str_cursor_step_utf32(const char32_t *str, const int pos_prev = *pos; if (BLI_str_cursor_step_prev_utf32(str, str_maxlen, pos)) { if ((jump != STRCUR_JUMP_ALL) && - (delim_type != cursor_delim_type_unicode((uint)str[*pos]))) { + (delim_type != cursor_delim_type_unicode((uint)str[*pos]))) + { /* left only: compensate for index/change in direction */ if ((pos_orig - *pos) >= 1) { *pos = pos_prev; diff --git a/source/blender/blenlib/intern/string_search.cc b/source/blender/blenlib/intern/string_search.cc index 33ffec78f11..5b489f16a3a 100644 --- a/source/blender/blenlib/intern/string_search.cc +++ b/source/blender/blenlib/intern/string_search.cc @@ -362,7 +362,8 @@ static std::optional score_query_against_words(Span query_word { /* Try to match against word initials. */ if (std::optional match = match_word_initials( - query_word, item, word_match_map)) { + query_word, item, word_match_map)) + { /* If the all matched words are in the main group, give the match a higher priority. */ bool all_main_group_matches = match->count_main_group_matches(item) == match->matched_word_indices.size(); diff --git a/source/blender/blenlib/tests/BLI_array_store_test.cc b/source/blender/blenlib/tests/BLI_array_store_test.cc index 6fafb5e53dc..29f07a421cb 100644 --- a/source/blender/blenlib/tests/BLI_array_store_test.cc +++ b/source/blender/blenlib/tests/BLI_array_store_test.cc @@ -236,7 +236,8 @@ static void testbuffer_list_data_randomize(ListBase *lb, uint random_seed) static void testbuffer_list_store_populate(BArrayStore *bs, ListBase *lb) { for (TestBuffer *tb = (TestBuffer *)lb->first, *tb_prev = nullptr; tb; - tb_prev = tb, tb = tb->next) { + tb_prev = tb, tb = tb->next) + { tb->state = BLI_array_store_state_add( bs, tb->data, tb->data_len, (tb_prev ? tb_prev->state : nullptr)); } diff --git a/source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc b/source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc index 888c2965628..5cd1f058428 100644 --- a/source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc +++ b/source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc @@ -24,10 +24,10 @@ #endif /* Resizing the hash has a huge cost over global filling operation! */ -//#define GHASH_RESERVE +// #define GHASH_RESERVE /* Run the longest tests! */ -//#define GHASH_RUN_BIG +// #define GHASH_RUN_BIG /* Size of 'small case' ghash (number of entries). */ #define TESTCASE_SIZE_SMALL 17 diff --git a/source/blender/blenloader/intern/readfile.cc b/source/blender/blenloader/intern/readfile.cc index 003312bebaf..263ba4592f3 100644 --- a/source/blender/blenloader/intern/readfile.cc +++ b/source/blender/blenloader/intern/readfile.cc @@ -3319,7 +3319,8 @@ static void lib_link_all(FileData *fd, Main *bmain) const IDTypeInfo *id_type = BKE_idtype_get_info_from_id(id); if ((id->tag & (LIB_TAG_UNDO_OLD_ID_REUSED_UNCHANGED | LIB_TAG_UNDO_OLD_ID_REUSED_NOUNDO)) != - 0) { + 0) + { BLI_assert(fd->flags & FD_FLAGS_IS_MEMFILE); /* This ID has been re-used from 'old' bmain. Since it was therefore unchanged across * current undo step, and old IDs re-use their old memory address, we do not need to liblink diff --git a/source/blender/blenloader/intern/versioning_250.cc b/source/blender/blenloader/intern/versioning_250.cc index 0776839fc58..7bc3c3af71e 100644 --- a/source/blender/blenloader/intern/versioning_250.cc +++ b/source/blender/blenloader/intern/versioning_250.cc @@ -1883,7 +1883,8 @@ void blo_do_versions_250(FileData *fd, Library * /*lib*/, Main *bmain) } LISTBASE_FOREACH (bNodeSocket *, sock, &node->outputs) { if (nodeCountSocketLinks(ntree, sock) == 0 && - !((sock->flag & (SOCK_HIDDEN | SOCK_UNAVAIL)) != 0)) { + !((sock->flag & (SOCK_HIDDEN | SOCK_UNAVAIL)) != 0)) + { bNodeSocket *gsock = do_versions_node_group_add_socket_2_56_2( ntree, sock->name, sock->type, SOCK_OUT); diff --git a/source/blender/blenloader/intern/versioning_260.cc b/source/blender/blenloader/intern/versioning_260.cc index 6b972535177..354b65732af 100644 --- a/source/blender/blenloader/intern/versioning_260.cc +++ b/source/blender/blenloader/intern/versioning_260.cc @@ -2824,10 +2824,12 @@ void blo_do_versions_260(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "MovieTrackingPlaneTrack", "float", "image_opacity")) { + fd->filesdna, "MovieTrackingPlaneTrack", "float", "image_opacity")) + { LISTBASE_FOREACH (MovieClip *, clip, &bmain->movieclips) { LISTBASE_FOREACH ( - MovieTrackingPlaneTrack *, plane_track, &clip->tracking.plane_tracks_legacy) { + MovieTrackingPlaneTrack *, plane_track, &clip->tracking.plane_tracks_legacy) + { plane_track->image_opacity = 1.0f; } } diff --git a/source/blender/blenloader/intern/versioning_270.cc b/source/blender/blenloader/intern/versioning_270.cc index 829c5528097..fbc877f3b25 100644 --- a/source/blender/blenloader/intern/versioning_270.cc +++ b/source/blender/blenloader/intern/versioning_270.cc @@ -508,7 +508,8 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "MovieTrackingSettings", "float", "default_weight")) { + fd->filesdna, "MovieTrackingSettings", "float", "default_weight")) + { LISTBASE_FOREACH (MovieClip *, clip, &bmain->movieclips) { clip->tracking.settings.default_weight = 1.0f; } @@ -1010,7 +1011,8 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) if (!MAIN_VERSION_FILE_ATLEAST(bmain, 276, 3)) { if (!DNA_struct_member_exists( - fd->filesdna, "RenderData", "CurveMapping", "mblur_shutter_curve")) { + fd->filesdna, "RenderData", "CurveMapping", "mblur_shutter_curve")) + { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { CurveMapping *curve_mapping = &scene->r.mblur_shutter_curve; BKE_curvemapping_set_defaults(curve_mapping, 1, 0.0f, 0.0f, 1.0f, 1.0f, HD_AUTO); @@ -1179,7 +1181,8 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) LISTBASE_FOREACH (Camera *, camera, &bmain->cameras) { if (camera->stereo.pole_merge_angle_from == 0.0f && - camera->stereo.pole_merge_angle_to == 0.0f) { + camera->stereo.pole_merge_angle_to == 0.0f) + { camera->stereo.pole_merge_angle_from = DEG2RADF(60.0f); camera->stereo.pole_merge_angle_to = DEG2RADF(75.0f); } @@ -1197,7 +1200,8 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "BooleanModifierData", "float", "double_threshold")) { + fd->filesdna, "BooleanModifierData", "float", "double_threshold")) + { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Boolean) { @@ -1306,7 +1310,8 @@ void blo_do_versions_270(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "MovieTrackingStabilization", "int", "tot_rot_track")) { + fd->filesdna, "MovieTrackingStabilization", "int", "tot_rot_track")) + { LISTBASE_FOREACH (MovieClip *, clip, &bmain->movieclips) { if (clip->tracking.stabilization.rot_track_legacy) { migrate_single_rot_stabilization_track_settings(&clip->tracking.stabilization); diff --git a/source/blender/blenloader/intern/versioning_280.cc b/source/blender/blenloader/intern/versioning_280.cc index ef7fb3747e4..3235d7db485 100644 --- a/source/blender/blenloader/intern/versioning_280.cc +++ b/source/blender/blenloader/intern/versioning_280.cc @@ -1404,7 +1404,8 @@ static void update_vector_math_node_dot_product_operator(bNodeTree *ntree) if (node->type == SH_NODE_VECTOR_MATH) { bNodeSocket *sockOutVector = nodeFindSocket(node, SOCK_OUT, "Vector"); if (version_node_socket_is_used(sockOutVector) && - node->custom1 == NODE_VECTOR_MATH_DOT_PRODUCT) { + node->custom1 == NODE_VECTOR_MATH_DOT_PRODUCT) + { LISTBASE_FOREACH_MUTABLE (bNodeLink *, link, &ntree->links) { if (link->fromsock == sockOutVector) { switch (link->tosock->type) { @@ -3096,7 +3097,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } else if (node->type == SH_NODE_EEVEE_SPECULAR && - STREQ(node->idname, "ShaderNodeOutputSpecular")) { + STREQ(node->idname, "ShaderNodeOutputSpecular")) + { STRNCPY(node->idname, "ShaderNodeEeveeSpecular"); error |= eNTreeDoVersionErrors::NTREE_DOVERSION_NEED_OUTPUT; } @@ -3161,7 +3163,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) /* Grease pencil multi-frame falloff curve. */ if (!DNA_struct_member_exists( - fd->filesdna, "GP_Sculpt_Settings", "CurveMapping", "cur_falloff")) { + fd->filesdna, "GP_Sculpt_Settings", "CurveMapping", "cur_falloff")) + { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { /* sculpt brushes */ GP_Sculpt_Settings *gset = &scene->toolsettings->gp_sculpt; @@ -3201,7 +3204,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 3)) { /* init grease pencil grids and paper */ if (!DNA_struct_member_exists( - fd->filesdna, "View3DOverlay", "float", "gpencil_paper_color[3]")) { + fd->filesdna, "View3DOverlay", "float", "gpencil_paper_color[3]")) + { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -3325,7 +3329,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) if (area->spacetype == SPACE_INFO) { if ((area->v2->vec.y == win_height) && (area->v1->vec.x == 0) && - (area->v4->vec.x == win_width)) { + (area->v4->vec.x == win_width)) + { BKE_screen_area_free(area); BLI_remlink(&screen->areabase, area); @@ -3886,7 +3891,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "RigidBodyWorld", "RigidBodyWorld_Shared", "*shared")) { + fd->filesdna, "RigidBodyWorld", "RigidBodyWorld_Shared", "*shared")) + { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { RigidBodyWorld *rbw = scene->rigidbody_world; @@ -4531,7 +4537,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 36)) { if (!DNA_struct_member_exists( - fd->filesdna, "View3DShading", "float", "curvature_ridge_factor")) { + fd->filesdna, "View3DShading", "float", "curvature_ridge_factor")) + { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -4594,7 +4601,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) /* Grease pencil primitive curve */ if (!DNA_struct_member_exists( - fd->filesdna, "GP_Sculpt_Settings", "CurveMapping", "cur_primitive")) { + fd->filesdna, "GP_Sculpt_Settings", "CurveMapping", "cur_primitive")) + { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { GP_Sculpt_Settings *gset = &scene->toolsettings->gp_sculpt; if ((gset) && (gset->cur_primitive == nullptr)) { @@ -4722,7 +4730,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) if (!MAIN_VERSION_FILE_ATLEAST(bmain, 280, 40)) { if (!DNA_struct_member_exists( - fd->filesdna, "ToolSettings", "char", "snap_transform_mode_flag")) { + fd->filesdna, "ToolSettings", "char", "snap_transform_mode_flag")) + { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { scene->toolsettings->snap_transform_mode_flag = SCE_SNAP_TRANSFORM_MODE_TRANSLATE; } @@ -5154,7 +5163,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "View3DOverlay", "float", "sculpt_mode_mask_opacity")) { + fd->filesdna, "View3DOverlay", "float", "sculpt_mode_mask_opacity")) + { LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) { LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) { LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) { @@ -5489,7 +5499,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) region_ui->flag |= RGN_FLAG_DYNAMIC_SIZE; if (region_toolprops && - (region_toolprops->alignment == (RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV))) { + (region_toolprops->alignment == (RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV))) + { SpaceType *stype = BKE_spacetype_from_id(sl->spacetype); /* Remove empty region at old location. */ @@ -5575,7 +5586,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "LayerCollection", "short", "local_collections_bits")) { + fd->filesdna, "LayerCollection", "short", "local_collections_bits")) + { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) { LISTBASE_FOREACH (LayerCollection *, layer_collection, &view_layer->layer_collections) { @@ -6082,7 +6094,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) } case eGpencilModifierType_Thick: { if (!DNA_struct_member_exists( - fd->filesdna, "ThickGpencilModifierData", "float", "thickness_fac")) { + fd->filesdna, "ThickGpencilModifierData", "float", "thickness_fac")) + { ThickGpencilModifierData *mmd = (ThickGpencilModifierData *)md; mmd->thickness_fac = mmd->thickness; } @@ -6275,7 +6288,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain) if (!MAIN_VERSION_FILE_ATLEAST(bmain, 283, 14)) { /* Solidify modifier merge tolerance. */ if (!DNA_struct_member_exists( - fd->filesdna, "SolidifyModifierData", "float", "merge_tolerance")) { + fd->filesdna, "SolidifyModifierData", "float", "merge_tolerance")) + { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Solidify) { diff --git a/source/blender/blenloader/intern/versioning_290.cc b/source/blender/blenloader/intern/versioning_290.cc index db9ff3f75bf..75bdcfd5232 100644 --- a/source/blender/blenloader/intern/versioning_290.cc +++ b/source/blender/blenloader/intern/versioning_290.cc @@ -1118,7 +1118,8 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) /* Initialize additional velocity parameter for #CacheFile's. */ if (!DNA_struct_member_exists( - fd->filesdna, "MeshSeqCacheModifierData", "float", "velocity_scale")) { + fd->filesdna, "MeshSeqCacheModifierData", "float", "velocity_scale")) + { LISTBASE_FOREACH (Object *, object, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &object->modifiers) { if (md->type == eModifierType_MeshSequenceCache) { @@ -1331,7 +1332,8 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) if (!DNA_struct_member_exists(fd->filesdna, "WorkSpaceDataRelation", "int", "parentid")) { LISTBASE_FOREACH (WorkSpace *, workspace, &bmain->workspaces) { LISTBASE_FOREACH_MUTABLE ( - WorkSpaceDataRelation *, relation, &workspace->hook_layout_relations) { + WorkSpaceDataRelation *, relation, &workspace->hook_layout_relations) + { relation->parent = blo_read_get_new_globaldata_address(fd, relation->parent); BLI_assert(relation->parentid == 0); if (relation->parent != nullptr) { @@ -1395,7 +1397,8 @@ void blo_do_versions_290(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "FluidModifierData", "float", "fractions_distance")) { + fd->filesdna, "FluidModifierData", "float", "fractions_distance")) + { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Fluid) { diff --git a/source/blender/blenloader/intern/versioning_300.cc b/source/blender/blenloader/intern/versioning_300.cc index de27a5292d8..11a22d0a4ac 100644 --- a/source/blender/blenloader/intern/versioning_300.cc +++ b/source/blender/blenloader/intern/versioning_300.cc @@ -1181,7 +1181,8 @@ void do_versions_after_linking_300(FileData * /*fd*/, Main *bmain) SOCK_OBJECT, SOCK_COLLECTION, SOCK_TEXTURE, - SOCK_MATERIAL)) { + SOCK_MATERIAL)) + { link->tosock = link->tosock->next; } } @@ -2644,7 +2645,8 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) if (!MAIN_VERSION_FILE_ATLEAST(bmain, 300, 13)) { /* Convert Surface Deform to sparse-capable bind structure. */ if (!DNA_struct_member_exists( - fd->filesdna, "SurfaceDeformModifierData", "int", "mesh_verts_num")) { + fd->filesdna, "SurfaceDeformModifierData", "int", "mesh_verts_num")) + { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_SurfaceDeform) { @@ -2671,7 +2673,8 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain) } if (!DNA_struct_member_exists( - fd->filesdna, "WorkSpace", "AssetLibraryReference", "asset_library")) { + fd->filesdna, "WorkSpace", "AssetLibraryReference", "asset_library")) + { LISTBASE_FOREACH (WorkSpace *, workspace, &bmain->workspaces) { BKE_asset_library_reference_init_default(&workspace->asset_library_ref); } diff --git a/source/blender/blenloader/intern/versioning_400.cc b/source/blender/blenloader/intern/versioning_400.cc index 142e341a07b..454b583a99e 100644 --- a/source/blender/blenloader/intern/versioning_400.cc +++ b/source/blender/blenloader/intern/versioning_400.cc @@ -550,7 +550,8 @@ static void version_mesh_crease_generic(Main &bmain) LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { if (STR_ELEM(node->idname, "GeometryNodeStoreNamedAttribute", - "GeometryNodeInputNamedAttribute")) { + "GeometryNodeInputNamedAttribute")) + { bNodeSocket *socket = nodeFindSocket(node, SOCK_IN, "Name"); if (STREQ(socket->default_value_typed()->value, "crease")) { STRNCPY(socket->default_value_typed()->value, "crease_edge"); @@ -982,7 +983,8 @@ static void versioning_replace_musgrave_texture_node(bNodeTree *ntree) else { if (*detail < 1.0f) { if ((noise_type != SHD_NOISE_RIDGED_MULTIFRACTAL) && - (noise_type != SHD_NOISE_HETERO_TERRAIN)) { + (noise_type != SHD_NOISE_HETERO_TERRAIN)) + { /* Add Multiply Math node behind Fac output. */ bNode *mul_node = nodeAddStaticNode(nullptr, ntree, SH_NODE_MATH); @@ -2192,7 +2194,8 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain) RegionAssetShelf *shelf_data = static_cast(region->regiondata); if (shelf_data && shelf_data->active_shelf && - (shelf_data->active_shelf->preferred_row_count == 0)) { + (shelf_data->active_shelf->preferred_row_count == 0)) + { shelf_data->active_shelf->preferred_row_count = 1; } } @@ -2208,7 +2211,8 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain) if (item.item_type == NODE_INTERFACE_SOCKET) { bNodeTreeInterfaceSocket &socket = reinterpret_cast(item); if ((socket.flag & NODE_INTERFACE_SOCKET_INPUT) && - (socket.flag & NODE_INTERFACE_SOCKET_OUTPUT)) { + (socket.flag & NODE_INTERFACE_SOCKET_OUTPUT)) + { sockets_to_split.append(&socket); } } @@ -2569,7 +2573,8 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain) /* Keep this block, even when empty. */ if (!DNA_struct_member_exists( - fd->filesdna, "SceneEEVEE", "RaytraceEEVEE", "ray_tracing_options")) { + fd->filesdna, "SceneEEVEE", "RaytraceEEVEE", "ray_tracing_options")) + { LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) { scene->eevee.ray_tracing_options.flag = RAYTRACE_EEVEE_USE_DENOISE; scene->eevee.ray_tracing_options.denoise_stages = RAYTRACE_EEVEE_DENOISE_SPATIAL | diff --git a/source/blender/blenloader/intern/versioning_defaults.cc b/source/blender/blenloader/intern/versioning_defaults.cc index 6eb71dfbab0..69b06a08d01 100644 --- a/source/blender/blenloader/intern/versioning_defaults.cc +++ b/source/blender/blenloader/intern/versioning_defaults.cc @@ -223,7 +223,8 @@ static void blo_update_defaults_screen(bScreen *screen, LISTBASE_FOREACH (ARegion *, region, regionbase) { if (region->regiontype == RGN_TYPE_TOOL_HEADER) { if (((sl->spacetype == SPACE_IMAGE) && hide_image_tool_header) || - sl->spacetype == SPACE_SEQ) { + sl->spacetype == SPACE_SEQ) + { region->flag |= RGN_FLAG_HIDDEN; } else { @@ -359,7 +360,8 @@ static void blo_update_defaults_scene(Main *bmain, Scene *scene) /* Correct default startup UVs. */ Mesh *mesh = static_cast(BLI_findstring(&bmain->meshes, "Cube", offsetof(ID, name) + 2)); if (mesh && (mesh->corners_num == 24) && - CustomData_has_layer(&mesh->corner_data, CD_PROP_FLOAT2)) { + CustomData_has_layer(&mesh->corner_data, CD_PROP_FLOAT2)) + { const float uv_values[24][2] = { {0.625, 0.50}, {0.875, 0.50}, {0.875, 0.75}, {0.625, 0.75}, {0.375, 0.75}, {0.625, 0.75}, {0.625, 1.00}, {0.375, 1.00}, {0.375, 0.00}, {0.625, 0.00}, {0.625, 0.25}, {0.375, 0.25}, diff --git a/source/blender/blenloader/intern/versioning_legacy.cc b/source/blender/blenloader/intern/versioning_legacy.cc index 5a874ee9025..f605df85a24 100644 --- a/source/blender/blenloader/intern/versioning_legacy.cc +++ b/source/blender/blenloader/intern/versioning_legacy.cc @@ -237,7 +237,8 @@ static void idproperties_fix_groups_lengths_recurse(IDProperty *prop) int i; for (loop = static_cast(prop->data.group.first), i = 0; loop; - loop = loop->next, i++) { + loop = loop->next, i++) + { if (loop->type == IDP_GROUP) { idproperties_fix_groups_lengths_recurse(loop); } @@ -1248,7 +1249,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* softbody init new vars */ for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { if (ob->soft) { if (ob->soft->defgoal == 0.0f) { ob->soft->defgoal = 0.7f; @@ -1282,7 +1284,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { if (ob->parent) { Object *parent = static_cast( blo_do_versions_newlibadr(fd, &ob->id, ID_IS_LINKED(ob), ob->parent)); @@ -1390,7 +1393,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { PartEff *paf; LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { @@ -1407,7 +1411,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) ModifierData *md = static_cast(ob->modifiers.first); while (md && BKE_modifier_get_info(ModifierType(md->type))->type == - ModifierTypeType::OnlyDeform) { + ModifierTypeType::OnlyDeform) + { md = md->next; } @@ -1478,7 +1483,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } for (key = static_cast(bmain->shapekeys.first); key; - key = static_cast(key->id.next)) { + key = static_cast(key->id.next)) + { int index = 1; LISTBASE_FOREACH (KeyBlock *, kb, &key->block) { @@ -1506,7 +1512,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* deformflag is local in modifier now */ for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Armature) { ArmatureModifierData *amd = (ArmatureModifierData *)md; @@ -1608,7 +1615,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* for empty drawsize and drawtype */ for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { if (ob->empty_drawsize == 0.0f) { ob->empty_drawtype = OB_ARROWS; ob->empty_drawsize = 1.0; @@ -1690,7 +1698,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* add default radius values to old curve points */ for (cu = static_cast(bmain->curves.first); cu; - cu = static_cast(cu->id.next)) { + cu = static_cast(cu->id.next)) + { LISTBASE_FOREACH (Nurb *, nu, &cu->nurb) { if (nu->bezt) { for (bezt = nu->bezt, a = 0; a < nu->pntsu; a++, bezt++) { @@ -1710,7 +1719,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { ListBase *list; list = &ob->constraints; @@ -1822,7 +1832,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } } for (tex = static_cast(bmain->textures.first); tex; - tex = static_cast(tex->id.next)) { + tex = static_cast(tex->id.next)) + { enum { TEX_ANIMCYCLIC = (1 << 6), TEX_ANIM5 = (1 << 7), @@ -1961,7 +1972,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) ((bmain->versionfile < 245) || (bmain->versionfile == 245 && bmain->subversionfile == 0))) { for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { ListBase *list; list = &ob->constraints; @@ -2036,7 +2048,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* add point caches */ for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { if (ob->soft && !ob->soft->pointcache) { ob->soft->pointcache = BKE_ptcache_add(&ob->soft->ptcaches); } @@ -2044,7 +2057,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) LISTBASE_FOREACH (ParticleSystem *, psys, &ob->particlesystem) { if (psys->pointcache) { if (psys->pointcache->flag & PTCACHE_BAKED && - (psys->pointcache->flag & PTCACHE_DISK_CACHE) == 0) { + (psys->pointcache->flag & PTCACHE_DISK_CACHE) == 0) + { printf("Old memory cache isn't supported for particles, so re-bake the simulation!\n"); psys->pointcache->flag &= ~PTCACHE_BAKED; } @@ -2111,7 +2125,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } for (tex = static_cast(bmain->textures.first); tex; - tex = static_cast(tex->id.next)) { + tex = static_cast(tex->id.next)) + { if (tex->iuser.flag & IMA_OLD_PREMUL) { tex->iuser.flag &= ~IMA_OLD_PREMUL; } @@ -2147,7 +2162,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { if (md->type == eModifierType_Armature) { ((ArmatureModifierData *)md)->deformflag |= ARM_DEF_B_BONE_REST; @@ -2184,7 +2200,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) Object *ob; for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { if (ob->pose) { LISTBASE_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) { do_version_constraints_245(&pchan->constraints); @@ -2216,7 +2233,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) PartEff *paf = nullptr; for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { if (ob->soft && ob->soft->keys) { SoftBody *sb = ob->soft; int k; @@ -2383,7 +2401,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* dupliface scale */ for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { ob->instance_faces_scale = 1.0f; } } @@ -2393,7 +2412,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* NLA-strips - scale. */ for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { LISTBASE_FOREACH (bActionStrip *, strip, &ob->nlastrips) { float length, actlength, repeat; @@ -2468,7 +2488,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) Object *ob; for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { if (ob->fluidsimSettings) { FluidsimModifierData *fluidmd = (FluidsimModifierData *)BKE_modifier_new( eModifierType_Fluidsim); @@ -2490,7 +2511,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) if (!MAIN_VERSION_FILE_ATLEAST(bmain, 246, 1)) { Object *ob; for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { if (ob->pd && (ob->pd->forcefield == PFIELD_WIND)) { ob->pd->f_noise = 0.0f; } @@ -2502,7 +2524,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) Curve *cu; for (cu = static_cast(bmain->curves.first); cu; - cu = static_cast(cu->id.next)) { + cu = static_cast(cu->id.next)) + { LISTBASE_FOREACH (Nurb *, nu, &cu->nurb) { nu->radius_interp = 3; @@ -2567,7 +2590,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) if (bmain->versionfile < 249 && bmain->subversionfile < 1) { Object *ob; for (ob = static_cast(bmain->objects.first); ob; - ob = static_cast(ob->id.next)) { + ob = static_cast(ob->id.next)) + { if (ob->pd) { ob->pd->seed = (uint(ceil(PIL_check_seconds_timer())) + 1) % 128; } diff --git a/source/blender/blenloader/tests/blendfile_load_test.cc b/source/blender/blenloader/tests/blendfile_load_test.cc index 8ae9934bc25..0c7042afeb6 100644 --- a/source/blender/blenloader/tests/blendfile_load_test.cc +++ b/source/blender/blenloader/tests/blendfile_load_test.cc @@ -5,8 +5,7 @@ #include "BLI_path_util.h" -class BlendfileLoadingTest : public BlendfileLoadingBaseTest { -}; +class BlendfileLoadingTest : public BlendfileLoadingBaseTest {}; TEST_F(BlendfileLoadingTest, CanaryTest) { diff --git a/source/blender/blentranslation/BLT_translation.h b/source/blender/blentranslation/BLT_translation.h index 8d122cf46e6..6104d0abde9 100644 --- a/source/blender/blentranslation/BLT_translation.h +++ b/source/blender/blentranslation/BLT_translation.h @@ -144,7 +144,7 @@ typedef struct { #define BLT_I18NCONTEXTS_ITEM(ctxt_id, py_id) \ { \ -# ctxt_id, py_id, ctxt_id \ + #ctxt_id, py_id, ctxt_id \ } #define BLT_I18NCONTEXTS_DESC \ diff --git a/source/blender/bmesh/bmesh_class.hh b/source/blender/bmesh/bmesh_class.hh index fc752e80c1c..d4a7a822d6b 100644 --- a/source/blender/bmesh/bmesh_class.hh +++ b/source/blender/bmesh/bmesh_class.hh @@ -534,10 +534,10 @@ typedef bool (*BMLoopPairFilterFunc)(const BMLoop *, const BMLoop *, void *user_ # define BM_ELEM_CD_GET_BOOL_P(ele, offset) \ (BLI_assert(offset != -1), \ _Generic(ele, \ - GENERIC_TYPE_ANY((bool *)POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_NONCONST), \ - GENERIC_TYPE_ANY((const bool *)POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_CONST))) + GENERIC_TYPE_ANY((bool *)POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_NONCONST), \ + GENERIC_TYPE_ANY((const bool *)POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_CONST))) #else # define BM_ELEM_CD_GET_BOOL_P(ele, offset) \ (BLI_assert(offset != -1), (bool *)((char *)(ele)->head.data + (offset))) @@ -547,10 +547,9 @@ typedef bool (*BMLoopPairFilterFunc)(const BMLoop *, const BMLoop *, void *user_ # define BM_ELEM_CD_GET_VOID_P(ele, offset) \ (BLI_assert(offset != -1), \ _Generic(ele, \ - GENERIC_TYPE_ANY(POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_NONCONST), \ - GENERIC_TYPE_ANY((const void *)POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_CONST))) + GENERIC_TYPE_ANY(POINTER_OFFSET((ele)->head.data, offset), _BM_GENERIC_TYPE_ELEM_NONCONST), \ + GENERIC_TYPE_ANY((const void *)POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_CONST))) #else # define BM_ELEM_CD_GET_VOID_P(ele, offset) \ (BLI_assert(offset != -1), (void *)((char *)(ele)->head.data + (offset))) @@ -572,26 +571,26 @@ typedef bool (*BMLoopPairFilterFunc)(const BMLoop *, const BMLoop *, void *user_ # define BM_ELEM_CD_GET_FLOAT_P(ele, offset) \ (BLI_assert(offset != -1), \ _Generic(ele, \ - GENERIC_TYPE_ANY((float *)POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_NONCONST), \ - GENERIC_TYPE_ANY((const float *)POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_CONST))) + GENERIC_TYPE_ANY((float *)POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_NONCONST), \ + GENERIC_TYPE_ANY((const float *)POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_CONST))) # define BM_ELEM_CD_GET_FLOAT2_P(ele, offset) \ (BLI_assert(offset != -1), \ _Generic(ele, \ - GENERIC_TYPE_ANY((float(*)[2])POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_NONCONST), \ - GENERIC_TYPE_ANY((const float(*)[2])POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_CONST))) + GENERIC_TYPE_ANY((float(*)[2])POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_NONCONST), \ + GENERIC_TYPE_ANY((const float(*)[2])POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_CONST))) # define BM_ELEM_CD_GET_FLOAT3_P(ele, offset) \ (BLI_assert(offset != -1), \ _Generic(ele, \ - GENERIC_TYPE_ANY((float(*)[3])POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_NONCONST), \ - GENERIC_TYPE_ANY((const float(*)[3])POINTER_OFFSET((ele)->head.data, offset), \ - _BM_GENERIC_TYPE_ELEM_CONST))) + GENERIC_TYPE_ANY((float(*)[3])POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_NONCONST), \ + GENERIC_TYPE_ANY((const float(*)[3])POINTER_OFFSET((ele)->head.data, offset), \ + _BM_GENERIC_TYPE_ELEM_CONST))) #else diff --git a/source/blender/bmesh/intern/bmesh_core.cc b/source/blender/bmesh/intern/bmesh_core.cc index 9f5715dee67..641c950bcc9 100644 --- a/source/blender/bmesh/intern/bmesh_core.cc +++ b/source/blender/bmesh/intern/bmesh_core.cc @@ -675,7 +675,8 @@ int bmesh_elem_check(void *element, const char htype) } if (l_iter->e && l_iter->v) { if (!BM_vert_in_edge(l_iter->e, l_iter->v) || - !BM_vert_in_edge(l_iter->e, l_iter->next->v)) { + !BM_vert_in_edge(l_iter->e, l_iter->next->v)) + { err |= IS_FACE_LOOP_VERT_NOT_IN_EDGE; } diff --git a/source/blender/bmesh/intern/bmesh_edgeloop.cc b/source/blender/bmesh/intern/bmesh_edgeloop.cc index 781b0b72df3..4eb2bb6dc49 100644 --- a/source/blender/bmesh/intern/bmesh_edgeloop.cc +++ b/source/blender/bmesh/intern/bmesh_edgeloop.cc @@ -554,7 +554,8 @@ void BM_edgeloop_edges_get(BMEdgeLoopStore *el_store, BMEdge **e_arr) LinkData *node; int i = 0; for (node = static_cast(el_store->verts.first); node && node->next; - node = node->next) { + node = node->next) + { e_arr[i++] = BM_edge_exists(NODE_AS_V(node), NODE_AS_V(node->next)); BLI_assert(e_arr[i - 1] != nullptr); } diff --git a/source/blender/bmesh/intern/bmesh_mesh.cc b/source/blender/bmesh/intern/bmesh_mesh.cc index 16c11f24d8c..5474003ea74 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.cc +++ b/source/blender/bmesh/intern/bmesh_mesh.cc @@ -767,7 +767,8 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const static_cast(MEM_mallocN(sizeof(void *) * totvert, __func__)) : nullptr; for (i = totvert, ve = verts_copy + totvert - 1, vep = verts_pool + totvert - 1; i--; - ve--, vep--) { + ve--, vep--) + { *ve = **vep; // printf("*vep: %p, verts_pool[%d]: %p\n", *vep, i, verts_pool[i]); if (cd_vert_pyptr != -1) { @@ -823,7 +824,8 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const static_cast(MEM_mallocN(sizeof(void *) * totedge, __func__)) : nullptr; for (i = totedge, ed = edges_copy + totedge - 1, edp = edges_pool + totedge - 1; i--; - ed--, edp--) { + ed--, edp--) + { *ed = **edp; if (cd_edge_pyptr != -1) { void **pyptr = static_cast(BM_ELEM_CD_GET_VOID_P(((BMElem *)ed), cd_edge_pyptr)); @@ -878,7 +880,8 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const static_cast(MEM_mallocN(sizeof(void *) * totface, __func__)) : nullptr; for (i = totface, fa = faces_copy + totface - 1, fap = faces_pool + totface - 1; i--; - fa--, fap--) { + fa--, fap--) + { *fa = **fap; if (cd_poly_pyptr != -1) { void **pyptr = static_cast(BM_ELEM_CD_GET_VOID_P(((BMElem *)fa), cd_poly_pyptr)); diff --git a/source/blender/bmesh/intern/bmesh_mesh_convert.cc b/source/blender/bmesh/intern/bmesh_mesh_convert.cc index 8a4a16c8c0b..bc433d16a60 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_convert.cc +++ b/source/blender/bmesh/intern/bmesh_mesh_convert.cc @@ -237,7 +237,8 @@ void BM_mesh_bm_from_me(BMesh *bm, const Mesh *mesh, const BMeshFromMeshParams * blender::Vector temporary_layers_to_delete; for (const int layer_index : - IndexRange(CustomData_number_of_layers(&mesh_ldata, CD_PROP_FLOAT2))) { + IndexRange(CustomData_number_of_layers(&mesh_ldata, CD_PROP_FLOAT2))) + { char name[MAX_CUSTOMDATA_LAYER_NAME]; BKE_uv_map_vert_select_name_get( CustomData_get_layer_name(&mesh_ldata, CD_PROP_FLOAT2, layer_index), name); diff --git a/source/blender/bmesh/intern/bmesh_mesh_normals.cc b/source/blender/bmesh/intern/bmesh_mesh_normals.cc index 83aa6316a8f..bc33063bae4 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_normals.cc +++ b/source/blender/bmesh/intern/bmesh_mesh_normals.cc @@ -1849,7 +1849,8 @@ void BM_lnorspace_rebuild(BMesh *bm, bool preserve_clnor) BM_ITER_MESH (f, &fiter, bm, BM_FACES_OF_MESH) { BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) { if (BM_ELEM_API_FLAG_TEST(l, BM_LNORSPACE_UPDATE) || - bm->spacearr_dirty & BM_SPACEARR_DIRTY_ALL) { + bm->spacearr_dirty & BM_SPACEARR_DIRTY_ALL) + { short(*clnor)[2] = static_cast( BM_ELEM_CD_GET_VOID_P(l, cd_loop_clnors_offset)); int l_index = BM_elem_index_get(l); @@ -1879,7 +1880,8 @@ void BM_lnorspace_rebuild(BMesh *bm, bool preserve_clnor) BM_ITER_MESH (f, &fiter, bm, BM_FACES_OF_MESH) { BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) { if (BM_ELEM_API_FLAG_TEST(l, BM_LNORSPACE_UPDATE) || - bm->spacearr_dirty & BM_SPACEARR_DIRTY_ALL) { + bm->spacearr_dirty & BM_SPACEARR_DIRTY_ALL) + { if (preserve_clnor) { short(*clnor)[2] = static_cast( BM_ELEM_CD_GET_VOID_P(l, cd_loop_clnors_offset)); diff --git a/source/blender/bmesh/intern/bmesh_operators.cc b/source/blender/bmesh/intern/bmesh_operators.cc index 4e344e6dba8..dc4493acc70 100644 --- a/source/blender/bmesh/intern/bmesh_operators.cc +++ b/source/blender/bmesh/intern/bmesh_operators.cc @@ -101,7 +101,8 @@ static void bmo_op_slots_init(const BMOSlotType *slot_types, BMOpSlot *slot_args case BMO_OP_SLOT_INT: if (ELEM(slot->slot_subtype.intg, BMO_OP_SLOT_SUBTYPE_INT_ENUM, - BMO_OP_SLOT_SUBTYPE_INT_FLAG)) { + BMO_OP_SLOT_SUBTYPE_INT_FLAG)) + { slot->data.enum_data.flags = slot_types[i].enum_flags; /* Set the first value of the enum as the default value. */ slot->data.i = slot->data.enum_data.flags[0].value; diff --git a/source/blender/bmesh/intern/bmesh_polygon.cc b/source/blender/bmesh/intern/bmesh_polygon.cc index 4a99c1eb614..b5c6c88a48c 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.cc +++ b/source/blender/bmesh/intern/bmesh_polygon.cc @@ -1261,7 +1261,8 @@ void BM_face_splits_check_legal(BMesh *bm, BMFace *f, BMLoop *(*loops)[2], int l for (j = i + 1; j < len; j++) { if ((loops[j][0] != nullptr) && !EDGE_SHARE_VERT(edgeverts[i], edgeverts[j])) { if (isect_seg_seg_v2(UNPACK2(edgeverts[i]), UNPACK2(edgeverts[j])) == - ISECT_LINE_LINE_CROSS) { + ISECT_LINE_LINE_CROSS) + { loops[i][0] = nullptr; break; } diff --git a/source/blender/bmesh/intern/bmesh_polygon_edgenet.cc b/source/blender/bmesh/intern/bmesh_polygon_edgenet.cc index 026f6b7f28b..f881a67dfdd 100644 --- a/source/blender/bmesh/intern/bmesh_polygon_edgenet.cc +++ b/source/blender/bmesh/intern/bmesh_polygon_edgenet.cc @@ -427,7 +427,8 @@ static bool bm_face_split_edgenet_find_loop(BMVert *v_init, (bm_edge_flagged_radial_count(e_pair[1]) == 1)); if (bm_face_split_edgenet_find_loop_walk( - v_init, face_normal, edge_order, edge_order_len, e_pair)) { + v_init, face_normal, edge_order, edge_order_len, e_pair)) + { uint i = 0; r_face_verts[i++] = v_init; @@ -823,7 +824,8 @@ static void bvhtree_test_edges_isect_2d_ray_cb(void *user_data, /* direction is normalized, so this will be the distance */ float dist_new; if (isect_ray_seg_v2( - data->v_origin->co, ray->direction, e->v1->co, e->v2->co, &dist_new, nullptr)) { + data->v_origin->co, ray->direction, e->v1->co, e->v2->co, &dist_new, nullptr)) + { /* avoid float precision issues, possible this is greater, * check above zero to allow some overlap * (and needed for partial-connect which will overlap vertices) */ @@ -998,7 +1000,8 @@ static int bm_face_split_edgenet_find_connection(const EdgeGroup_FindConnection_ BMVert *v_pair[2]; /* ensure the closest vertex is popped back off the stack first */ if (len_squared_v2v2(v_origin->co, e_hit->v1->co) > - len_squared_v2v2(v_origin->co, e_hit->v2->co)) { + len_squared_v2v2(v_origin->co, e_hit->v2->co)) + { ARRAY_SET_ITEMS(v_pair, e_hit->v1, e_hit->v2); } else { diff --git a/source/blender/bmesh/intern/bmesh_query.cc b/source/blender/bmesh/intern/bmesh_query.cc index f7eb76f7bda..1d007e574ae 100644 --- a/source/blender/bmesh/intern/bmesh_query.cc +++ b/source/blender/bmesh/intern/bmesh_query.cc @@ -155,7 +155,8 @@ BMFace *BM_vert_pair_shared_face_cb(BMVert *v_a, BMFace *f = l_a->f; l_b = BM_face_vert_share_loop(f, v_b); if (l_b && (allow_adjacent || !BM_loop_is_adjacent(l_a, l_b)) && - callback(f, l_a, l_b, user_data)) { + callback(f, l_a, l_b, user_data)) + { *r_l_a = l_a; *r_l_b = l_b; @@ -2206,7 +2207,8 @@ int BM_mesh_calc_face_groups(BMesh *bm, do { BMLoop *l_radial_iter = l_iter->radial_next; if ((l_radial_iter != l_iter) && - ((filter_fn == nullptr) || filter_fn(l_iter, user_data))) { + ((filter_fn == nullptr) || filter_fn(l_iter, user_data))) + { do { if ((filter_pair_fn == nullptr) || filter_pair_fn(l_iter, l_radial_iter, user_data)) { diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.cc b/source/blender/bmesh/intern/bmesh_walkers_impl.cc index 6326bd7012d..9f5b020b986 100644 --- a/source/blender/bmesh/intern/bmesh_walkers_impl.cc +++ b/source/blender/bmesh/intern/bmesh_walkers_impl.cc @@ -1078,7 +1078,8 @@ static void *bmw_EdgeLoopWalker_step(BMWalker *walker) if (l != nullptr) { if (l != e->l && bmw_mask_check_edge(walker, l->e) && - !BLI_gset_haskey(walker->visit_set, l->e)) { + !BLI_gset_haskey(walker->visit_set, l->e)) + { lwalk = static_cast(BMW_state_add(walker)); lwalk->cur = l->e; lwalk->lastv = v; @@ -1129,7 +1130,8 @@ static void *bmw_EdgeLoopWalker_step(BMWalker *walker) if (l != nullptr) { if (l != e->l && bmw_mask_check_edge(walker, l->e) && - !BLI_gset_haskey(walker->visit_set, l->e)) { + !BLI_gset_haskey(walker->visit_set, l->e)) + { lwalk = static_cast(BMW_state_add(walker)); lwalk->cur = l->e; lwalk->lastv = v; diff --git a/source/blender/bmesh/operators/bmo_connect_pair.cc b/source/blender/bmesh/operators/bmo_connect_pair.cc index c2cf6d3acaf..9a7de247d93 100644 --- a/source/blender/bmesh/operators/bmo_connect_pair.cc +++ b/source/blender/bmesh/operators/bmo_connect_pair.cc @@ -344,7 +344,8 @@ static PathLinkState *state_step__face_edges(PathContext *pc, BMElem *ele_next_from = (BMElem *)l_iter->f; if (FACE_WALK_TEST((BMFace *)ele_next_from) && - (ELE_TOUCH_TEST_EDGE((BMEdge *)ele_next) == false)) { + (ELE_TOUCH_TEST_EDGE((BMEdge *)ele_next) == false)) + { min_dist_dir_update(mddir, dist_dir); mddir->dist_min[index] = dist_test; l_iter_best[index] = l_iter; @@ -389,7 +390,8 @@ static PathLinkState *state_step__face_verts(PathContext *pc, BMElem *ele_next_from = (BMElem *)l_iter->f; if (FACE_WALK_TEST((BMFace *)ele_next_from) && - (ELE_TOUCH_TEST_VERT((BMVert *)ele_next) == false)) { + (ELE_TOUCH_TEST_VERT((BMVert *)ele_next) == false)) + { min_dist_dir_update(mddir, dist_dir); mddir->dist_min[index] = dist_test; l_iter_best[index] = l_iter; diff --git a/source/blender/bmesh/operators/bmo_dissolve.cc b/source/blender/bmesh/operators/bmo_dissolve.cc index 4ce95b85beb..7a8b255ff63 100644 --- a/source/blender/bmesh/operators/bmo_dissolve.cc +++ b/source/blender/bmesh/operators/bmo_dissolve.cc @@ -566,7 +566,8 @@ void bmo_dissolve_degenerate_exec(BMesh *bm, BMOperator *op) /* add a joining edge and tag for removal */ BMLoop *l_split; if (BM_face_split( - bm, l_iter->f, l_iter->prev, l_iter->next, &l_split, nullptr, true)) { + bm, l_iter->f, l_iter->prev, l_iter->next, &l_split, nullptr, true)) + { BMO_edge_flag_enable(bm, l_split->e, EDGE_COLLAPSE); found = true; reset = true; @@ -582,7 +583,8 @@ void bmo_dissolve_degenerate_exec(BMesh *bm, BMOperator *op) BLI_assert(v_new == l_iter->next->v); (void)v_new; if (BM_face_split( - bm, l_iter->f, l_iter->prev, l_iter->next, &l_split, nullptr, true)) { + bm, l_iter->f, l_iter->prev, l_iter->next, &l_split, nullptr, true)) + { BMO_edge_flag_enable(bm, l_split->e, EDGE_COLLAPSE); found = true; } @@ -597,7 +599,8 @@ void bmo_dissolve_degenerate_exec(BMesh *bm, BMOperator *op) BLI_assert(v_new == l_iter->prev->v); (void)v_new; if (BM_face_split( - bm, l_iter->f, l_iter->prev, l_iter->next, &l_split, nullptr, true)) { + bm, l_iter->f, l_iter->prev, l_iter->next, &l_split, nullptr, true)) + { BMO_edge_flag_enable(bm, l_split->e, EDGE_COLLAPSE); found = true; } diff --git a/source/blender/bmesh/operators/bmo_dupe.cc b/source/blender/bmesh/operators/bmo_dupe.cc index 87ffe841933..c7d63578b1a 100644 --- a/source/blender/bmesh/operators/bmo_dupe.cc +++ b/source/blender/bmesh/operators/bmo_dupe.cc @@ -247,7 +247,8 @@ static void bmo_mesh_copy(BMOperator *op, BMesh *bm_dst, BMesh *bm_src) /* duplicate flagged vertices */ BM_ITER_MESH (v, &viter, bm_src, BM_VERTS_OF_MESH) { if (BMO_vert_flag_test(bm_src, v, DUPE_INPUT) && - BMO_vert_flag_test(bm_src, v, DUPE_DONE) == false) { + BMO_vert_flag_test(bm_src, v, DUPE_DONE) == false) + { BMIter iter; bool isolated = true; @@ -280,7 +281,8 @@ static void bmo_mesh_copy(BMOperator *op, BMesh *bm_dst, BMesh *bm_src) /* now we dupe all the edges */ BM_ITER_MESH (e, &eiter, bm_src, BM_EDGES_OF_MESH) { if (BMO_edge_flag_test(bm_src, e, DUPE_INPUT) && - BMO_edge_flag_test(bm_src, e, DUPE_DONE) == false) { + BMO_edge_flag_test(bm_src, e, DUPE_DONE) == false) + { /* make sure that verts are copied */ if (!BMO_vert_flag_test(bm_src, e->v1, DUPE_DONE)) { bmo_vert_copy(op, slot_vert_map_out, bm_dst, cd_vert_map, e->v1, vhash); diff --git a/source/blender/bmesh/operators/bmo_fill_grid.cc b/source/blender/bmesh/operators/bmo_fill_grid.cc index 553baa47156..864df11a05a 100644 --- a/source/blender/bmesh/operators/bmo_fill_grid.cc +++ b/source/blender/bmesh/operators/bmo_fill_grid.cc @@ -540,7 +540,8 @@ static void bm_grid_fill(BMesh *bm, for (i = 0; i < 4; i++) { LinkData *el_next; for (el = static_cast(lb_iter[i]->first); el && (el_next = el->next); - el = el->next) { + el = el->next) + { BMEdge *e = BM_edge_exists(static_cast(el->data), static_cast(el_next->data)); if (BM_edge_is_boundary(e)) { diff --git a/source/blender/bmesh/operators/bmo_hull.cc b/source/blender/bmesh/operators/bmo_hull.cc index 4191d0399c6..288fe37bbfd 100644 --- a/source/blender/bmesh/operators/bmo_hull.cc +++ b/source/blender/bmesh/operators/bmo_hull.cc @@ -138,7 +138,8 @@ static void hull_output_triangles(BMesh *bm, BLI_mempool *hull_triangles) const int next = (i == 2 ? 0 : i + 1); BMEdge *e = BM_edge_exists(t->v[i], t->v[next]); if (e && BMO_edge_flag_test(bm, e, HULL_FLAG_INPUT) && - !BMO_edge_flag_test(bm, e, HULL_FLAG_HOLE)) { + !BMO_edge_flag_test(bm, e, HULL_FLAG_HOLE)) + { BMO_edge_flag_enable(bm, e, HULL_FLAG_OUTPUT_GEOM); } } diff --git a/source/blender/bmesh/operators/bmo_inset.cc b/source/blender/bmesh/operators/bmo_inset.cc index f12a85a9b56..23c2fabbb76 100644 --- a/source/blender/bmesh/operators/bmo_inset.cc +++ b/source/blender/bmesh/operators/bmo_inset.cc @@ -904,7 +904,8 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op) /* find adjacent */ BM_ITER_ELEM (e, &iter, v_split, BM_EDGES_OF_VERT) { if (BM_elem_flag_test(e, BM_ELEM_TAG) && e->l && - BM_elem_flag_test(e->l->f, BM_ELEM_TAG)) { + BM_elem_flag_test(e->l->f, BM_ELEM_TAG)) + { if (vert_edge_tag_tot < 2) { vecpair[vert_edge_tag_tot] = BM_elem_index_get(e); BLI_assert(vecpair[vert_edge_tag_tot] != -1); diff --git a/source/blender/bmesh/operators/bmo_offset_edgeloops.cc b/source/blender/bmesh/operators/bmo_offset_edgeloops.cc index b94cc1a6e12..2f9a31d597f 100644 --- a/source/blender/bmesh/operators/bmo_offset_edgeloops.cc +++ b/source/blender/bmesh/operators/bmo_offset_edgeloops.cc @@ -52,7 +52,8 @@ static BMFace *bm_face_split_walk_back(BMesh *bm, BMLoop *l_src, BMLoop **r_l) cos = BLI_array_alloca(cos, num); for (l_dst = l_src->prev, i = 0; BM_elem_index_get(l_dst->prev->v) != -1; - l_dst = l_dst->prev, i++) { + l_dst = l_dst->prev, i++) + { copy_v3_v3(cos[num - (i + 1)], l_dst->v->co); } diff --git a/source/blender/bmesh/operators/bmo_removedoubles.cc b/source/blender/bmesh/operators/bmo_removedoubles.cc index c8e22cecc97..9225ffaaad9 100644 --- a/source/blender/bmesh/operators/bmo_removedoubles.cc +++ b/source/blender/bmesh/operators/bmo_removedoubles.cc @@ -140,7 +140,7 @@ static BMFace *remdoubles_createface(BMesh *bm, #undef LOOP_MAP_VERT_INIT } -finally : { +finally: { uint i; for (i = 0; i < STACK_SIZE(verts); i++) { BMO_vert_flag_disable(bm, verts[i], VERT_IN_FACE); diff --git a/source/blender/bmesh/operators/bmo_subdivide_edgering.cc b/source/blender/bmesh/operators/bmo_subdivide_edgering.cc index 07bccc1f243..f921b3a0b37 100644 --- a/source/blender/bmesh/operators/bmo_subdivide_edgering.cc +++ b/source/blender/bmesh/operators/bmo_subdivide_edgering.cc @@ -641,7 +641,8 @@ static void bm_edgering_pair_interpolate(BMesh *bm, LinkData *v_iter; for (v_iter = static_cast(lb_ring->first), i = 0; v_iter; - v_iter = v_iter->next, i++) { + v_iter = v_iter->next, i++) + { if (i > 0 && i < resolu - 1) { /* shape */ if (falloff_cache) { diff --git a/source/blender/bmesh/tools/bmesh_bevel.cc b/source/blender/bmesh/tools/bmesh_bevel.cc index 8f0f9fec4f0..cc7a9626c67 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.cc +++ b/source/blender/bmesh/tools/bmesh_bevel.cc @@ -58,7 +58,7 @@ using blender::Vector; #define BEVEL_MAX_AUTO_ADJUST_PCT 300.0f #define BEVEL_MATCH_SPEC_WEIGHT 0.2 -//#define DEBUG_CUSTOM_PROFILE_CUTOFF +// #define DEBUG_CUSTOM_PROFILE_CUTOFF /* Happens far too often, uncomment for development. */ // #define BEVEL_ASSERT_PROJECT @@ -2299,7 +2299,8 @@ static void check_edge_data_seam_sharp_edges(BevVert *bv, int flag, bool neg) /* If no such edge found, return. */ if ((!neg && !BEV_EXTEND_EDGE_DATA_CHECK(e, flag)) || - (neg && BEV_EXTEND_EDGE_DATA_CHECK(e, flag))) { + (neg && BEV_EXTEND_EDGE_DATA_CHECK(e, flag))) + { return; } @@ -6750,7 +6751,8 @@ static bool bev_rebuild_polygon(BMesh *bm, BevelParams *bp, BMFace *f) } /* Actually want "sharp" to be contiguous, so reverse the test. */ if (!BM_elem_flag_test(ee[k], BM_ELEM_SMOOTH) && - BM_elem_flag_test(bme_prev, BM_ELEM_SMOOTH)) { + BM_elem_flag_test(bme_prev, BM_ELEM_SMOOTH)) + { BM_elem_flag_enable(bme_new, BM_ELEM_SMOOTH); } } diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.cc b/source/blender/bmesh/tools/bmesh_decimate_collapse.cc index bd4310e75e4..2fe912a2d54 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_collapse.cc +++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.cc @@ -687,7 +687,7 @@ static void bm_edge_collapse_loop_customdata( { /* Disable seam check - the seam check would have to be done per layer, * its not really that important. */ - //#define USE_SEAM + // #define USE_SEAM /* these don't need to be updated, since they will get removed when the edge collapses */ BMLoop *l_clear, *l_other; const bool is_manifold = BM_edge_is_manifold(l->e); @@ -789,7 +789,7 @@ static void bm_edge_collapse_loop_customdata( } } - //#undef USE_SEAM + // #undef USE_SEAM } #endif /* USE_CUSTOMDATA */ diff --git a/source/blender/bmesh/tools/bmesh_decimate_dissolve.cc b/source/blender/bmesh/tools/bmesh_decimate_dissolve.cc index fdf5e288df0..380b4d116f8 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_dissolve.cc +++ b/source/blender/bmesh/tools/bmesh_decimate_dissolve.cc @@ -513,7 +513,8 @@ void BM_mesh_decimate_dissolve_ex(BMesh *bm, do { const int j = BM_elem_index_get(l_cycle_iter->v); if (j != -1 && vheap_table[j] && - (BLI_heap_node_value(vheap_table[j]) == COST_INVALID)) { + (BLI_heap_node_value(vheap_table[j]) == COST_INVALID)) + { const float cost = bm_vert_edge_face_angle( l_cycle_iter->v, delimit, &delimit_data); BLI_heap_node_value_update(vheap, vheap_table[j], cost); diff --git a/source/blender/bmesh/tools/bmesh_edgenet.cc b/source/blender/bmesh/tools/bmesh_edgenet.cc index ac461cb5002..4136dadff3f 100644 --- a/source/blender/bmesh/tools/bmesh_edgenet.cc +++ b/source/blender/bmesh/tools/bmesh_edgenet.cc @@ -200,7 +200,8 @@ begin: if (vn_curr->pass == -vn_next->pass) { if ((vn_curr->flag & VNINFO_FLAG_IS_MIXFACE) || - (vn_next->flag & VNINFO_FLAG_IS_MIXFACE)) { + (vn_next->flag & VNINFO_FLAG_IS_MIXFACE)) + { /* found connecting edge */ if (bm_edgenet_path_check_overlap(v_curr, v_next, vnet_info) == false) { return e; diff --git a/source/blender/bmesh/tools/bmesh_intersect.cc b/source/blender/bmesh/tools/bmesh_intersect.cc index de805730b53..719ada88ed9 100644 --- a/source/blender/bmesh/tools/bmesh_intersect.cc +++ b/source/blender/bmesh/tools/bmesh_intersect.cc @@ -315,7 +315,8 @@ static enum ISectType intersect_line_tri(const float p0[3], /* check ray isn't planar with tri */ if (fabsf(dot_v3v3(p_dir, t_nor)) >= e->eps) { if (isect_line_segment_tri_epsilon_v3( - p0, p1, t_cos[0], t_cos[1], t_cos[2], &fac, nullptr, 0.0f)) { + p0, p1, t_cos[0], t_cos[1], t_cos[2], &fac, nullptr, 0.0f)) + { if ((fac >= e->eps_margin) && (fac <= 1.0f - e->eps_margin)) { interp_v3_v3v3(r_ix, p0, p1, fac); if (min_fff(len_squared_v3v3(t_cos[0], r_ix), @@ -1426,7 +1427,8 @@ bool BM_mesh_intersect(BMesh *bm, !BLI_gset_haskey(verts_invalid, splice_ls[i][1])) { if (!BM_edge_exists(UNPACK2(splice_ls[i])) && - !BM_vert_splice_check_double(UNPACK2(splice_ls[i]))) { + !BM_vert_splice_check_double(UNPACK2(splice_ls[i]))) + { BM_vert_splice(bm, splice_ls[i][1], splice_ls[i][0]); } } diff --git a/source/blender/bmesh/tools/bmesh_intersect_edges.cc b/source/blender/bmesh/tools/bmesh_intersect_edges.cc index e2df87686e4..7d52ed9c40c 100644 --- a/source/blender/bmesh/tools/bmesh_intersect_edges.cc +++ b/source/blender/bmesh/tools/bmesh_intersect_edges.cc @@ -21,7 +21,7 @@ #include "bmesh_intersect_edges.hh" /* own include */ -//#define INTERSECT_EDGES_DEBUG +// #define INTERSECT_EDGES_DEBUG #define KDOP_TREE_TYPE 4 #define KDOP_AXIS_LEN 14 @@ -316,7 +316,8 @@ static bool bm_edgexvert_isect_cb(void *userdata, int index_a, int index_b, int EDBMSplitElem pair_tmp[2]; if (bm_edgexvert_isect_impl( - v, e, co, dir, lambda, data->dist_sq, &data->cut_edges_len, pair_tmp)) { + v, e, co, dir, lambda, data->dist_sq, &data->cut_edges_len, pair_tmp)) + { EDBMSplitElem *pair = static_cast(BLI_stack_push_r(data->pair_stack[thread])); pair[0] = pair_tmp[0]; pair[1] = pair_tmp[1]; @@ -718,7 +719,7 @@ bool BM_mesh_intersect_edges( int cuts_index[]; }; int as_int[0]; - } * e_map_iter, *e_map; + } *e_map_iter, *e_map; # ifdef INTERSECT_EDGES_DEBUG int cut_edges_len = 0; @@ -965,7 +966,8 @@ bool BM_mesh_intersect_edges( edgenet[0] = BM_edge_create(bm, va_dest, vb, e_net, BM_CREATE_NOP); } if ((edgenet_len > 1) && (v_other_dest != v_other) && - !BM_edge_exists(v_other_dest, v_other)) { + !BM_edge_exists(v_other_dest, v_other)) + { /** *
                  *  ---v---v_other
@@ -987,7 +989,8 @@ bool BM_mesh_intersect_edges(
                   continue;
                 }
                 if (!BM_elem_flag_test(e_test->v1, BM_ELEM_TAG) &&
-                    !BM_elem_flag_test(e_test->v2, BM_ELEM_TAG)) {
+                    !BM_elem_flag_test(e_test->v2, BM_ELEM_TAG))
+                {
                   continue;
                 }
                 /* Avoids endless loop. */
diff --git a/source/blender/bmesh/tools/bmesh_region_match.cc b/source/blender/bmesh/tools/bmesh_region_match.cc
index d3387226b28..5e170a41993 100644
--- a/source/blender/bmesh/tools/bmesh_region_match.cc
+++ b/source/blender/bmesh/tools/bmesh_region_match.cc
@@ -677,7 +677,8 @@ static bool bm_uuidwalk_facestep_begin(UUIDWalk *uuidwalk, UUIDFaceStep *fstep)
 static void bm_uuidwalk_facestep_end(UUIDWalk *uuidwalk, UUIDFaceStep *fstep)
 {
   while (
-      UUIDFaceStepItem *fstep_item = static_cast(BLI_pophead(&fstep->items))) {
+      UUIDFaceStepItem *fstep_item = static_cast(BLI_pophead(&fstep->items)))
+  {
     BLI_mempool_free(uuidwalk->step_pool_items, fstep_item);
   }
 }
@@ -735,7 +736,8 @@ static BMFace **bm_mesh_region_match_pair(
 
   /* setup the initial state */
   if (UNLIKELY(bm_uuidwalk_init_from_edge(w_src, e_src) !=
-               bm_uuidwalk_init_from_edge(w_dst, e_dst))) {
+               bm_uuidwalk_init_from_edge(w_dst, e_dst)))
+  {
     /* should never happen, if verts passed are compatible, but to be safe... */
     goto finally;
   }
@@ -766,7 +768,8 @@ static BMFace **bm_mesh_region_match_pair(
       }
 
       if (bm_uuidwalk_facestep_begin(w_src, fstep_src) &&
-          bm_uuidwalk_facestep_begin(w_dst, fstep_dst)) {
+          bm_uuidwalk_facestep_begin(w_dst, fstep_dst))
+      {
         /* Step over face-lists with matching UUID's
          * both lists are sorted, so no need for lookups.
          * The data is created on 'begin' and cleared on 'end' */
diff --git a/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc b/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc
index 6eb8817c81d..7e1d01925e4 100644
--- a/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc
+++ b/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc
@@ -194,7 +194,8 @@ void FullFrameExecutionModel::determine_areas_to_render(NodeOperation *output_op
     NodeOperation *operation = pair.first;
     const rcti &render_area = pair.second;
     if (BLI_rcti_is_empty(&render_area) ||
-        active_buffers_.is_area_registered(operation, render_area)) {
+        active_buffers_.is_area_registered(operation, render_area))
+    {
       continue;
     }
 
diff --git a/source/blender/compositor/intern/COM_MetaData.cc b/source/blender/compositor/intern/COM_MetaData.cc
index f885b201f5a..e823d455f06 100644
--- a/source/blender/compositor/intern/COM_MetaData.cc
+++ b/source/blender/compositor/intern/COM_MetaData.cc
@@ -30,7 +30,8 @@ void MetaData::replace_hash_neutral_cryptomatte_keys(const blender::StringRef la
   std::string cryptomatte_manifest = entries_.pop_default(META_DATA_KEY_CRYPTOMATTE_MANIFEST, "");
 
   if (cryptomatte_hash.length() || cryptomatte_conversion.length() ||
-      cryptomatte_manifest.length()) {
+      cryptomatte_manifest.length())
+  {
     add_cryptomatte_entry(layer_name, "name", layer_name);
   }
   if (cryptomatte_hash.length()) {
diff --git a/source/blender/compositor/intern/COM_NodeGraph.cc b/source/blender/compositor/intern/COM_NodeGraph.cc
index 01605130ca5..013d55d1845 100644
--- a/source/blender/compositor/intern/COM_NodeGraph.cc
+++ b/source/blender/compositor/intern/COM_NodeGraph.cc
@@ -279,7 +279,8 @@ void NodeGraph::add_proxies_group(const CompositorContext &context,
 
   /* create proxy nodes for group input/output nodes */
   for (bNode *b_node_io = (bNode *)b_group_tree->nodes.first; b_node_io;
-       b_node_io = b_node_io->next) {
+       b_node_io = b_node_io->next)
+  {
     if (b_node_io->type == NODE_GROUP_INPUT) {
       add_proxies_group_inputs(b_node, b_node_io);
     }
diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.cc b/source/blender/compositor/intern/COM_NodeOperationBuilder.cc
index 9388e7ca3f1..70a2fbbe12f 100644
--- a/source/blender/compositor/intern/COM_NodeOperationBuilder.cc
+++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.cc
@@ -289,7 +289,8 @@ void NodeOperationBuilder::add_datatype_conversions()
     NodeOperation *from_op = &link.from()->get_operation();
     NodeOperation *to_op = &link.to()->get_operation();
     if (!(from_op->get_flags().use_datatype_conversion ||
-          to_op->get_flags().use_datatype_conversion)) {
+          to_op->get_flags().use_datatype_conversion))
+    {
       continue;
     }
 
diff --git a/source/blender/compositor/intern/COM_TiledExecutionModel.cc b/source/blender/compositor/intern/COM_TiledExecutionModel.cc
index 48fa0477925..ae5c767e61b 100644
--- a/source/blender/compositor/intern/COM_TiledExecutionModel.cc
+++ b/source/blender/compositor/intern/COM_TiledExecutionModel.cc
@@ -138,7 +138,8 @@ void TiledExecutionModel::execute_groups(eCompositorPriority priority,
 {
   for (ExecutionGroup *execution_group : groups_) {
     if (execution_group->get_flags().is_output &&
-        execution_group->get_render_priority() == priority) {
+        execution_group->get_render_priority() == priority)
+    {
       execution_group->execute(&exec_system);
     }
   }
diff --git a/source/blender/compositor/nodes/COM_ImageNode.cc b/source/blender/compositor/nodes/COM_ImageNode.cc
index 5c31fdb40ba..965f7a302ff 100644
--- a/source/blender/compositor/nodes/COM_ImageNode.cc
+++ b/source/blender/compositor/nodes/COM_ImageNode.cc
@@ -81,7 +81,8 @@ void ImageNode::convert_to_operations(NodeConverter &converter,
           int view = 0;
 
           if (STREQ(storage->pass_name, RE_PASSNAME_COMBINED) &&
-              STREQ(bnode_socket->name, "Alpha")) {
+              STREQ(bnode_socket->name, "Alpha"))
+          {
             /* Alpha output is already handled with the associated combined output. */
             continue;
           }
diff --git a/source/blender/compositor/nodes/COM_RenderLayersNode.cc b/source/blender/compositor/nodes/COM_RenderLayersNode.cc
index 9263145a171..823a8478d60 100644
--- a/source/blender/compositor/nodes/COM_RenderLayersNode.cc
+++ b/source/blender/compositor/nodes/COM_RenderLayersNode.cc
@@ -68,7 +68,8 @@ void RenderLayersNode::test_render_link(NodeConverter &converter,
     RenderLayersProg *operation;
     bool is_preview;
     if (STREQ(rpass->name, RE_PASSNAME_COMBINED) &&
-        STREQ(output->get_bnode_socket()->name, "Alpha")) {
+        STREQ(output->get_bnode_socket()->name, "Alpha"))
+    {
       operation = new RenderLayersAlphaProg(rpass->name, DataType::Value, rpass->channels);
       is_preview = false;
     }
diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc
index 7695302dde2..9bf88ac04e7 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cc
@@ -814,7 +814,8 @@ static void do_allEdgeDetection(uint t,
       }
       else {
         if (!limask[pix_nextCol] || !limask[pix_prevCol] || !limask[pix_nextRow] ||
-            !limask[pix_prevRow]) {
+            !limask[pix_prevRow])
+        {
           in_isz++;    /* Increment the inner boundary pixel count. */
           lres[a] = 4; /* Flag pixel as part of inner edge. */
         }
diff --git a/source/blender/compositor/operations/COM_PreviewOperation.cc b/source/blender/compositor/operations/COM_PreviewOperation.cc
index cc40bbd4ca3..0e1406e503f 100644
--- a/source/blender/compositor/operations/COM_PreviewOperation.cc
+++ b/source/blender/compositor/operations/COM_PreviewOperation.cc
@@ -43,7 +43,8 @@ void PreviewOperation::init_execution()
   output_image_ = preview_->ibuf;
 
   if (this->get_width() == uint(preview_->ibuf->x) &&
-      this->get_height() == uint(preview_->ibuf->y)) {
+      this->get_height() == uint(preview_->ibuf->y))
+  {
     return;
   }
   const uint size[2] = {get_width(), get_height()};
diff --git a/source/blender/compositor/operations/COM_SMAAOperation.cc b/source/blender/compositor/operations/COM_SMAAOperation.cc
index 52e99f8355c..523fa8c9e77 100644
--- a/source/blender/compositor/operations/COM_SMAAOperation.cc
+++ b/source/blender/compositor/operations/COM_SMAAOperation.cc
@@ -1031,7 +1031,7 @@ void SMAANeighborhoodBlendingOperation::execute_pixel(float output[4],
   }
 
   /* Calculate the blending offsets: */
-  void (*samplefunc)(SocketReader * reader, int x, int y, float xoffset, float color[4]);
+  void (*samplefunc)(SocketReader *reader, int x, int y, float xoffset, float color[4]);
   float offset1, offset2, weight1, weight2, color1[4], color2[4];
 
   if (fmaxf(right, left) > fmaxf(bottom, top)) { /* max(horizontal) > max(vertical) */
@@ -1083,7 +1083,7 @@ void SMAANeighborhoodBlendingOperation::update_memory_buffer_partial(MemoryBuffe
     }
 
     /* Calculate the blending offsets: */
-    void (*sample_fn)(MemoryBuffer * reader, int x, int y, float xoffset, float color[4]);
+    void (*sample_fn)(MemoryBuffer *reader, int x, int y, float xoffset, float color[4]);
     float offset1, offset2, weight1, weight2, color1[4], color2[4];
 
     if (fmaxf(right, left) > fmaxf(bottom, top)) { /* `max(horizontal) > max(vertical)` */
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h
index 2fbcbdb6604..e239a916afe 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h
@@ -9,7 +9,7 @@
 
 namespace blender::compositor {
 
-//#define COM_DEFOCUS_SEARCH
+// #define COM_DEFOCUS_SEARCH
 
 class VariableSizeBokehBlurOperation : public MultiThreadedOperation, public QualityStepHelper {
  private:
diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.cc b/source/blender/compositor/operations/COM_VectorBlurOperation.cc
index 07020f0d709..e155629bc19 100644
--- a/source/blender/compositor/operations/COM_VectorBlurOperation.cc
+++ b/source/blender/compositor/operations/COM_VectorBlurOperation.cc
@@ -895,7 +895,8 @@ void zbuf_accumulate_vecblur(NodeBlurData *nbd,
       rw = rectweight;
       rm = rectmax;
       for (dr = rectdraw, dz2 = newrect, x = xsize * ysize - 1; x >= 0;
-           x--, dr++, dz2 += 4, rw++, rm++) {
+           x--, dr++, dz2 += 4, rw++, rm++)
+      {
         if (dr->colpoin) {
           float bfac = dr->alpha * blendfac;
 
diff --git a/source/blender/compositor/realtime_compositor/intern/scheduler.cc b/source/blender/compositor/realtime_compositor/intern/scheduler.cc
index 9312e917c04..70d8c05ff2b 100644
--- a/source/blender/compositor/realtime_compositor/intern/scheduler.cc
+++ b/source/blender/compositor/realtime_compositor/intern/scheduler.cc
@@ -337,7 +337,8 @@ Schedule compute_schedule(const Context &context, const DerivedNodeTree &tree)
       int insertion_position = 0;
       for (int i = 0; i < sorted_dependency_nodes.size(); i++) {
         if (needed_buffers.lookup(doutput.node()) >
-            needed_buffers.lookup(sorted_dependency_nodes[i])) {
+            needed_buffers.lookup(sorted_dependency_nodes[i]))
+        {
           insertion_position++;
         }
         else {
diff --git a/source/blender/compositor/tests/COM_ComputeSummedAreaTableOperation_test.cc b/source/blender/compositor/tests/COM_ComputeSummedAreaTableOperation_test.cc
index 986a340e240..e69738f335a 100644
--- a/source/blender/compositor/tests/COM_ComputeSummedAreaTableOperation_test.cc
+++ b/source/blender/compositor/tests/COM_ComputeSummedAreaTableOperation_test.cc
@@ -19,8 +19,7 @@ struct SatParams {
   std::vector> values;
 };
 
-class SummedAreaTableTestP : public testing::TestWithParam {
-};
+class SummedAreaTableTestP : public testing::TestWithParam {};
 
 TEST_P(SummedAreaTableTestP, Values)
 {
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_cache.cc b/source/blender/depsgraph/intern/builder/deg_builder_cache.cc
index 51fc299cf9a..5601ed01408 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_cache.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_cache.cc
@@ -81,7 +81,8 @@ void animated_property_cb(ID * /*id*/, FCurve *fcurve, void *data_v)
   PointerRNA pointer_rna;
   PropertyRNA *property_rna = nullptr;
   if (!RNA_path_resolve_property(
-          &data->pointer_rna, fcurve->rna_path, &pointer_rna, &property_rna)) {
+          &data->pointer_rna, fcurve->rna_path, &pointer_rna, &property_rna))
+  {
     return;
   }
   /* Get storage for the ID.
@@ -141,7 +142,8 @@ bool AnimatedPropertyStorage::isAnyPropertyAnimated(const PointerRNA *pointer_rn
 DepsgraphBuilderCache::~DepsgraphBuilderCache()
 {
   for (AnimatedPropertyStorage *animated_property_storage :
-       animated_property_storage_map_.values()) {
+       animated_property_storage_map_.values())
+  {
     delete animated_property_storage;
   }
 }
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc
index b5da7a1ccba..55595657b08 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_view_layer.cc
@@ -63,7 +63,8 @@ bool DepsgraphRelationBuilder::build_layer_collection(LayerCollection *layer_col
   const ComponentKey collection_hierarchy_key{&collection->id, NodeType::HIERARCHY};
 
   LISTBASE_FOREACH (
-      LayerCollection *, child_layer_collection, &layer_collection->layer_collections) {
+      LayerCollection *, child_layer_collection, &layer_collection->layer_collections)
+  {
     if (build_layer_collection(child_layer_collection)) {
       Collection *child_collection = child_layer_collection->collection;
       const ComponentKey child_collection_hierarchy_key{&child_collection->id,
diff --git a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
index 208f6fcfd06..fddf393ab8f 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
+++ b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
@@ -286,11 +286,13 @@ static void deg_debug_graphviz_relation_arrowhead(const Relation *rel, dot::Dire
   const char *shape_no_cow = "box";
   const char *shape = shape_default;
   if (rel->from->get_class() == NodeClass::OPERATION &&
-      rel->to->get_class() == NodeClass::OPERATION) {
+      rel->to->get_class() == NodeClass::OPERATION)
+  {
     OperationNode *op_from = (OperationNode *)rel->from;
     OperationNode *op_to = (OperationNode *)rel->to;
     if (op_from->owner->type == NodeType::COPY_ON_WRITE &&
-        !op_to->owner->need_tag_cow_before_update()) {
+        !op_to->owner->need_tag_cow_before_update())
+    {
       shape = shape_no_cow;
     }
   }
diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc
index c1622ca1a3b..ff23d80be9e 100644
--- a/source/blender/depsgraph/intern/depsgraph_query.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query.cc
@@ -307,7 +307,8 @@ bool DEG_is_original_id(const ID *id)
    *
    * NOTE: We consider ID evaluated if ANY of those flags is set. We do NOT require ALL of them. */
   if (id->tag &
-      (LIB_TAG_COPIED_ON_WRITE | LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT | LIB_TAG_LOCALIZED)) {
+      (LIB_TAG_COPIED_ON_WRITE | LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT | LIB_TAG_LOCALIZED))
+  {
     return false;
   }
   return true;
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.cc b/source/blender/draw/engines/eevee/eevee_lightcache.cc
index 0631ea2efe2..e3b3749f384 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.cc
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.cc
@@ -1473,7 +1473,8 @@ void EEVEE_lightbake_job(void *custom_data, wmJobWorkerStatus *worker_status)
         lbake->grid_sample_len = prb->grid_resolution_x * prb->grid_resolution_y *
                                  prb->grid_resolution_z;
         for (lbake->grid_sample = 0; lbake->grid_sample < lbake->grid_sample_len;
-             ++lbake->grid_sample) {
+             ++lbake->grid_sample)
+        {
           lightbake_do_sample(lbake, eevee_lightbake_render_grid_sample);
         }
       }
diff --git a/source/blender/draw/engines/eevee/eevee_materials.cc b/source/blender/draw/engines/eevee/eevee_materials.cc
index 9e5f7a61de5..7bb6b4c948e 100644
--- a/source/blender/draw/engines/eevee/eevee_materials.cc
+++ b/source/blender/draw/engines/eevee/eevee_materials.cc
@@ -881,7 +881,8 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata,
             /* Do not render surface if we are rendering a volume object
              * and do not have a surface closure. */
             if (use_volume_material &&
-                (gpumat_array[i] && !GPU_material_has_surface_output(gpumat_array[i]))) {
+                (gpumat_array[i] && !GPU_material_has_surface_output(gpumat_array[i])))
+            {
               continue;
             }
 
diff --git a/source/blender/draw/engines/eevee/eevee_renderpasses.cc b/source/blender/draw/engines/eevee/eevee_renderpasses.cc
index dd87b77ce6e..6f7b962cb69 100644
--- a/source/blender/draw/engines/eevee/eevee_renderpasses.cc
+++ b/source/blender/draw/engines/eevee/eevee_renderpasses.cc
@@ -82,7 +82,8 @@ void EEVEE_renderpasses_init(EEVEE_Data *vedata)
     g_data->aov_hash = 0;
 
     if (render_pass == EEVEE_RENDER_PASS_BLOOM &&
-        ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0)) {
+        ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0))
+    {
       render_pass = EEVEE_RENDER_PASS_COMBINED;
     }
     if (render_pass == EEVEE_RENDER_PASS_AOV) {
@@ -409,7 +410,8 @@ void EEVEE_renderpasses_output_accumulate(EEVEE_ViewLayerData *sldata,
   }
   else {
     if ((render_pass & EEVEE_RENDER_PASS_BLOOM) != 0 &&
-        (effects->enabled_effects & EFFECT_BLOOM) != 0) {
+        (effects->enabled_effects & EFFECT_BLOOM) != 0)
+    {
       EEVEE_bloom_output_accumulate(sldata, vedata);
     }
   }
@@ -436,7 +438,8 @@ void EEVEE_renderpasses_draw(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
   UNUSED_VARS(needs_color_transfer);
 
   if ((render_pass & EEVEE_RENDER_PASS_BLOOM) != 0 &&
-      (effects->enabled_effects & EFFECT_BLOOM) == 0) {
+      (effects->enabled_effects & EFFECT_BLOOM) == 0)
+  {
     is_valid = false;
   }
 
diff --git a/source/blender/draw/engines/eevee/eevee_shadows.cc b/source/blender/draw/engines/eevee/eevee_shadows.cc
index d86c6f04865..10671adf4c3 100644
--- a/source/blender/draw/engines/eevee/eevee_shadows.cc
+++ b/source/blender/draw/engines/eevee/eevee_shadows.cc
@@ -63,7 +63,8 @@ void EEVEE_shadows_init(EEVEE_ViewLayerData *sldata)
 
   EEVEE_LightsInfo *linfo = sldata->lights;
   if ((linfo->shadow_cube_size != sh_cube_size) ||
-      (linfo->shadow_high_bitdepth != sh_high_bitdepth)) {
+      (linfo->shadow_high_bitdepth != sh_high_bitdepth))
+  {
     BLI_assert((sh_cube_size > 0) && (sh_cube_size <= 4096));
     DRW_TEXTURE_FREE_SAFE(sldata->shadow_cube_pool);
     CLAMP(sh_cube_size, 1, 4096);
diff --git a/source/blender/draw/engines/eevee_next/eevee_cryptomatte.cc b/source/blender/draw/engines/eevee_next/eevee_cryptomatte.cc
index 5a0cd49b304..d488563933c 100644
--- a/source/blender/draw/engines/eevee_next/eevee_cryptomatte.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_cryptomatte.cc
@@ -27,7 +27,8 @@ void Cryptomatte::begin_sync()
     session_.reset(BKE_cryptomatte_init_from_view_layer(inst_.view_layer));
 
     for (const std::string &layer_name :
-         bke::cryptomatte::BKE_cryptomatte_layer_names_get(*session_)) {
+         bke::cryptomatte::BKE_cryptomatte_layer_names_get(*session_))
+    {
       StringRef layer_name_ref = layer_name;
       bke::cryptomatte::CryptomatteLayer *layer = bke::cryptomatte::BKE_cryptomatte_layer_get(
           *session_, layer_name);
diff --git a/source/blender/draw/engines/eevee_next/eevee_lightprobe.hh b/source/blender/draw/engines/eevee_next/eevee_lightprobe.hh
index 12104f46e81..0d047729d7d 100644
--- a/source/blender/draw/engines/eevee_next/eevee_lightprobe.hh
+++ b/source/blender/draw/engines/eevee_next/eevee_lightprobe.hh
@@ -56,8 +56,7 @@ struct IrradianceGrid : public LightProbe, IrradianceGridData {
   float viewport_display_size;
 };
 
-struct ReflectionCube : public LightProbe {
-};
+struct ReflectionCube : public LightProbe {};
 
 class LightProbeModule {
   friend class IrradianceCache;
diff --git a/source/blender/draw/engines/eevee_next/eevee_shader.cc b/source/blender/draw/engines/eevee_next/eevee_shader.cc
index d8da4340f7f..fa92c3ab0c2 100644
--- a/source/blender/draw/engines/eevee_next/eevee_shader.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_shader.cc
@@ -397,7 +397,8 @@ void ShaderModule::material_create_info_ammend(GPUMaterial *gpumat, GPUCodegenOu
   bool supports_render_passes = (pipeline_type == MAT_PIPE_DEFERRED);
   /* Opaque forward do support AOVs and render pass if not using transparency. */
   if (!GPU_material_flag_get(gpumat, GPU_MATFLAG_TRANSPARENT) &&
-      (pipeline_type == MAT_PIPE_FORWARD)) {
+      (pipeline_type == MAT_PIPE_FORWARD))
+  {
     supports_render_passes = true;
   }
 
diff --git a/source/blender/draw/engines/eevee_next/eevee_sync.cc b/source/blender/draw/engines/eevee_next/eevee_sync.cc
index 0f8befb3923..ca70ff224df 100644
--- a/source/blender/draw/engines/eevee_next/eevee_sync.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_sync.cc
@@ -574,7 +574,8 @@ void foreach_hair_particle_handle(Object *ob, ObjectHandle ob_handle, HairHandle
       const int draw_as = (part_settings->draw_as == PART_DRAW_REND) ? part_settings->ren_as :
                                                                        part_settings->draw_as;
       if (draw_as != PART_DRAW_PATH ||
-          !DRW_object_is_visible_psys_in_active_context(ob, particle_sys)) {
+          !DRW_object_is_visible_psys_in_active_context(ob, particle_sys))
+      {
         continue;
       }
 
diff --git a/source/blender/draw/engines/eevee_next/eevee_sync.hh b/source/blender/draw/engines/eevee_next/eevee_sync.hh
index 409c127f991..8aaff4a9406 100644
--- a/source/blender/draw/engines/eevee_next/eevee_sync.hh
+++ b/source/blender/draw/engines/eevee_next/eevee_sync.hh
@@ -145,11 +145,9 @@ struct ObjectHandle : BaseHandle {
   ObjectKey object_key;
 };
 
-struct WorldHandle : public BaseHandle {
-};
+struct WorldHandle : public BaseHandle {};
 
-struct SceneHandle : public BaseHandle {
-};
+struct SceneHandle : public BaseHandle {};
 
 class SyncModule {
  private:
diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl
index c2ca5522e89..d6c350a4f33 100644
--- a/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl
+++ b/source/blender/draw/engines/eevee_next/shaders/eevee_film_lib.glsl
@@ -669,7 +669,8 @@ void film_process_data(ivec2 texel_film, out vec4 out_color, out float out_depth
     else {
       out_depth = imageLoad(depth_img, texel_film).r;
       if (uniform_buf.film.display_id != -1 &&
-          uniform_buf.film.display_id == uniform_buf.film.normal_id) {
+          uniform_buf.film.display_id == uniform_buf.film.normal_id)
+      {
         out_color = imageLoad(color_accum_img, ivec3(texel_film, uniform_buf.film.display_id));
       }
     }
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_data.cc b/source/blender/draw/engines/gpencil/gpencil_draw_data.cc
index 520c100425c..6fee87d1420 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_data.cc
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_data.cc
@@ -224,7 +224,8 @@ GPENCIL_MaterialPool *gpencil_material_pool_create(GPENCIL_PrivateData *pd, Obje
     }
 
     if ((gp_style->mode != GP_MATERIAL_MODE_LINE) ||
-        (gp_style->flag & GP_MATERIAL_DISABLE_STENCIL)) {
+        (gp_style->flag & GP_MATERIAL_DISABLE_STENCIL))
+    {
       mat_data->flag |= GP_STROKE_OVERLAP;
     }
 
diff --git a/source/blender/draw/engines/gpencil/gpencil_material.hh b/source/blender/draw/engines/gpencil/gpencil_material.hh
index 272a7ebc8d9..edad5a1a85c 100644
--- a/source/blender/draw/engines/gpencil/gpencil_material.hh
+++ b/source/blender/draw/engines/gpencil/gpencil_material.hh
@@ -178,7 +178,8 @@ class MaterialModule {
         }
 
         if ((gp_style_override->fill_style == GP_MATERIAL_FILL_STYLE_TEXTURE) &&
-            (gp_style_override->ima)) {
+            (gp_style_override->ima))
+        {
           copy_v4_fl(gp_style_override->fill_rgba, 1.0f);
           gp_style_override->mix_factor = 0.0f;
         }
@@ -243,7 +244,8 @@ class MaterialModule {
 
     /* Overlap. */
     if ((gp_style->mode != GP_MATERIAL_MODE_LINE) ||
-        (gp_style->flag & GP_MATERIAL_DISABLE_STENCIL)) {
+        (gp_style->flag & GP_MATERIAL_DISABLE_STENCIL))
+    {
       material.flag |= GP_STROKE_OVERLAP;
     }
 
diff --git a/source/blender/draw/engines/image/image_drawing_mode.hh b/source/blender/draw/engines/image/image_drawing_mode.hh
index 901b68cffe3..6655fca05c7 100644
--- a/source/blender/draw/engines/image/image_drawing_mode.hh
+++ b/source/blender/draw/engines/image/image_drawing_mode.hh
@@ -498,7 +498,8 @@ template class ScreenSpaceDrawingMode : public AbstractD
           float v = info.clipping_uv_bounds.ymax * yf + info.clipping_uv_bounds.ymin * (1.0 - yf) -
                     tile_offset_y;
           for (int x = gpu_texture_region_to_update.xmin; x < gpu_texture_region_to_update.xmax;
-               x++) {
+               x++)
+          {
             float xf = x / (float)texture_width;
             float u = info.clipping_uv_bounds.xmax * xf +
                       info.clipping_uv_bounds.xmin * (1.0 - xf) - tile_offset_x;
diff --git a/source/blender/draw/engines/overlay/overlay_armature.cc b/source/blender/draw/engines/overlay/overlay_armature.cc
index a5662bba3e6..cb85541f413 100644
--- a/source/blender/draw/engines/overlay/overlay_armature.cc
+++ b/source/blender/draw/engines/overlay/overlay_armature.cc
@@ -1206,7 +1206,8 @@ static void get_pchan_color_constraint(const ThemeWireColor *bcolor,
   const ePchan_ConstFlag flags_to_color = PCHAN_HAS_NO_TARGET | PCHAN_HAS_IK | PCHAN_HAS_SPLINEIK |
                                           PCHAN_HAS_CONST;
   if ((constflag & flags_to_color) == 0 ||
-      (bcolor && (bcolor->flag & TH_WIRECOLOR_CONSTCOLS) == 0)) {
+      (bcolor && (bcolor->flag & TH_WIRECOLOR_CONSTCOLS) == 0))
+  {
     get_pchan_color_solid(bcolor, r_color);
     return;
   }
diff --git a/source/blender/draw/engines/overlay/overlay_edit_uv.cc b/source/blender/draw/engines/overlay/overlay_edit_uv.cc
index c788c1aeaea..d29478e0093 100644
--- a/source/blender/draw/engines/overlay/overlay_edit_uv.cc
+++ b/source/blender/draw/engines/overlay/overlay_edit_uv.cc
@@ -120,10 +120,10 @@ void OVERLAY_edit_uv_init(OVERLAY_Data *vedata)
   const bool show_modified_uvs = sima->flag & SI_DRAWSHADOW;
   const bool is_tiled_image = image && (image->source == IMA_SRC_TILED);
   const bool do_edges_only = (ts->uv_flag & UV_SYNC_SELECTION) ?
-                                  /* NOTE: Ignore #SCE_SELECT_EDGE because a single selected edge
-                                   * on the mesh may cause single UV vertices to be selected. */
-                                  false :
-                                  (ts->uv_selectmode == UV_SELECT_EDGE);
+                                 /* NOTE: Ignore #SCE_SELECT_EDGE because a single selected edge
+                                  * on the mesh may cause single UV vertices to be selected. */
+                                 false :
+                                 (ts->uv_selectmode == UV_SELECT_EDGE);
   const bool do_faces = ((sima->flag & SI_NO_DRAWFACES) == 0);
   const bool do_face_dots = (ts->uv_flag & UV_SYNC_SELECTION) ?
                                 (ts->selectmode & SCE_SELECT_FACE) != 0 :
diff --git a/source/blender/draw/engines/overlay/overlay_grid.cc b/source/blender/draw/engines/overlay/overlay_grid.cc
index 0bb2715941d..02a8915f4f2 100644
--- a/source/blender/draw/engines/overlay/overlay_grid.cc
+++ b/source/blender/draw/engines/overlay/overlay_grid.cc
@@ -158,7 +158,8 @@ void OVERLAY_grid_init(OVERLAY_Data *vedata)
       /* Perspective: If camera is below floor plane, we switch clipping.
        * Orthographic: If eye vector is looking up, we switch clipping. */
       if (((winmat[3][3] == 0.0f) && (campos[2] > 0.0f)) ||
-          ((winmat[3][3] != 0.0f) && (zvec[2] < 0.0f))) {
+          ((winmat[3][3] != 0.0f) && (zvec[2] < 0.0f)))
+      {
         zpos_flag |= CLIP_ZPOS;
         zneg_flag |= CLIP_ZNEG;
       }
diff --git a/source/blender/draw/engines/overlay/overlay_next_background.hh b/source/blender/draw/engines/overlay/overlay_next_background.hh
index 0033b3b677d..40cbbe52e86 100644
--- a/source/blender/draw/engines/overlay/overlay_next_background.hh
+++ b/source/blender/draw/engines/overlay/overlay_next_background.hh
@@ -38,7 +38,8 @@ class Background {
       background_type = BG_CHECKER;
     }
     else if (state.v3d->shading.background_type == V3D_SHADING_BACKGROUND_WORLD &&
-             state.scene->world) {
+             state.scene->world)
+    {
       background_type = BG_SOLID;
       /* TODO(fclem): this is a scene referred linear color. we should convert
        * it to display linear here. */
diff --git a/source/blender/draw/engines/overlay/overlay_paint.cc b/source/blender/draw/engines/overlay/overlay_paint.cc
index b92d0414bb6..d8589f99b5f 100644
--- a/source/blender/draw/engines/overlay/overlay_paint.cc
+++ b/source/blender/draw/engines/overlay/overlay_paint.cc
@@ -31,7 +31,8 @@ static bool paint_object_is_rendered_transparent(View3D *v3d, Object *ob)
       return ob->color[3] < 1.0f;
     }
     if (ob && ob->type == OB_MESH && ob->data &&
-        v3d->shading.color_type == V3D_SHADING_MATERIAL_COLOR) {
+        v3d->shading.color_type == V3D_SHADING_MATERIAL_COLOR)
+    {
       Mesh *mesh = static_cast(ob->data);
       for (int i = 0; i < mesh->totcol; i++) {
         Material *mat = BKE_object_material_get_eval(ob, i + 1);
diff --git a/source/blender/draw/intern/DRW_gpu_wrapper.hh b/source/blender/draw/intern/DRW_gpu_wrapper.hh
index 0afc2039365..859cbc14544 100644
--- a/source/blender/draw/intern/DRW_gpu_wrapper.hh
+++ b/source/blender/draw/intern/DRW_gpu_wrapper.hh
@@ -1158,8 +1158,7 @@ class TextureRef : public Texture {
  * Dummy type to bind texture as image.
  * It is just a GPUTexture in disguise.
  */
-class Image {
-};
+class Image {};
 
 static inline Image *as_image(GPUTexture *tex)
 {
diff --git a/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc b/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc
index 721ab76ba70..ccb955c94fc 100644
--- a/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc
+++ b/source/blender/draw/intern/draw_cache_extract_mesh_render_data.cc
@@ -477,7 +477,8 @@ static bool bm_loop_normals_required(BMesh *bm)
   }
 
   if (edge_mix == array_utils::BooleanMix::AllFalse &&
-      face_mix == array_utils::BooleanMix::AllFalse) {
+      face_mix == array_utils::BooleanMix::AllFalse)
+  {
     return false;
   }
 
diff --git a/source/blender/draw/intern/draw_cache_impl_lattice.cc b/source/blender/draw/intern/draw_cache_impl_lattice.cc
index 3a709601fd9..75e70034e78 100644
--- a/source/blender/draw/intern/draw_cache_impl_lattice.cc
+++ b/source/blender/draw/intern/draw_cache_impl_lattice.cc
@@ -367,7 +367,7 @@ static GPUIndexBuf *lattice_batch_cache_get_edges(LatticeRenderData *rdata,
     GPUIndexBufBuilder elb;
     GPU_indexbuf_init(&elb, GPU_PRIM_LINES, edge_len, vert_len);
 
-#define LATT_INDEX(u, v, w) ((((w)*rdata->dims.v_len + (v)) * rdata->dims.u_len) + (u))
+#define LATT_INDEX(u, v, w) ((((w) * rdata->dims.v_len + (v)) * rdata->dims.u_len) + (u))
 
     for (int w = 0; w < rdata->dims.w_len; w++) {
       int wxt = ELEM(w, 0, rdata->dims.w_len - 1);
diff --git a/source/blender/draw/intern/draw_cache_impl_particles.cc b/source/blender/draw/intern/draw_cache_impl_particles.cc
index 894b8ee438a..d383d6fcc11 100644
--- a/source/blender/draw/intern/draw_cache_impl_particles.cc
+++ b/source/blender/draw/intern/draw_cache_impl_particles.cc
@@ -1005,7 +1005,8 @@ static void particle_batch_cache_ensure_procedural_strand_data(PTCacheEdit *edit
   else {
     int curr_point = 0;
     if ((psys->pathcache != nullptr) &&
-        (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT))) {
+        (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT)))
+    {
       curr_point = particle_batch_cache_fill_strands_data(psys,
                                                           psmd,
                                                           psys->pathcache,
@@ -1105,7 +1106,8 @@ static void particle_batch_cache_ensure_procedural_indices(PTCacheEdit *edit,
   else {
     int curr_point = 0;
     if ((psys->pathcache != nullptr) &&
-        (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT))) {
+        (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT)))
+    {
       curr_point = particle_batch_cache_fill_segments_indices(
           psys->pathcache, 0, psys->totpart, verts_per_hair, &elb);
     }
@@ -1155,7 +1157,8 @@ static void particle_batch_cache_ensure_procedural_pos(PTCacheEdit *edit,
     }
     else {
       if ((psys->pathcache != nullptr) &&
-          (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT))) {
+          (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT)))
+      {
         particle_batch_cache_fill_segments_proc_pos(
             psys->pathcache, psys->totpart, &pos_step, &length_step);
       }
@@ -1301,7 +1304,8 @@ static void particle_batch_cache_ensure_pos_and_seg(PTCacheEdit *edit,
   }
   else {
     if ((psys->pathcache != nullptr) &&
-        (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT))) {
+        (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT)))
+    {
       curr_point = particle_batch_cache_fill_segments(psys,
                                                       psmd,
                                                       psys->pathcache,
diff --git a/source/blender/draw/intern/draw_debug.cc b/source/blender/draw/intern/draw_debug.cc
index 5a7bcfcc624..0a3bbad000f 100644
--- a/source/blender/draw/intern/draw_debug.cc
+++ b/source/blender/draw/intern/draw_debug.cc
@@ -28,7 +28,7 @@
 #  define DRAW_DEBUG
 #else
 /* Uncomment to forcibly enable debug draw in release mode. */
-//#define DRAW_DEBUG
+// #define DRAW_DEBUG
 #endif
 
 namespace blender::draw {
diff --git a/source/blender/draw/intern/draw_manager_data.cc b/source/blender/draw/intern/draw_manager_data.cc
index 3f1f16dc479..980ac5b3f11 100644
--- a/source/blender/draw/intern/draw_manager_data.cc
+++ b/source/blender/draw/intern/draw_manager_data.cc
@@ -714,7 +714,7 @@ static void drw_call_obinfos_init(DRWObjectInfos *ob_infos, const Object *ob)
   drw_call_calc_orco(ob, ob_infos->orcotexfac);
   /* Random float value. */
   uint random = (DST.dupli_source) ?
-                     DST.dupli_source->random_id :
+                    DST.dupli_source->random_id :
                      /* TODO(fclem): this is rather costly to do at runtime. Maybe we can
                       * put it in ob->runtime and make depsgraph ensure it is up to date. */
                      BLI_hash_int_2d(BLI_hash_string(ob->id.name + 2), 0);
@@ -1385,7 +1385,7 @@ static void drw_sculpt_generate_calls(DRWSculptCallbackData *scd)
     DRW_debug_modelmat(scd->ob->object_to_world);
     BKE_pbvh_draw_debug_cb(
         pbvh,
-        (void (*)(PBVHNode * n, void *d, const float min[3], const float max[3], PBVHNodeFlags f))
+        (void (*)(PBVHNode *n, void *d, const float min[3], const float max[3], PBVHNodeFlags f))
             DRW_sculpt_debug_cb,
         &debug_node_nr);
   }
@@ -1426,7 +1426,8 @@ void DRW_shgroup_call_sculpt(DRWShadingGroup *shgroup,
   if (use_color) {
     if (const char *name = mesh->active_color_attribute) {
       if (const std::optional meta_data = attributes.lookup_meta_data(
-              name)) {
+              name))
+      {
         attrs.append(pbvh::GenericRequest{name, meta_data->data_type, meta_data->domain});
       }
     }
diff --git a/source/blender/draw/intern/draw_manager_exec.cc b/source/blender/draw/intern/draw_manager_exec.cc
index ed28d4b08e2..491a864a18c 100644
--- a/source/blender/draw/intern/draw_manager_exec.cc
+++ b/source/blender/draw/intern/draw_manager_exec.cc
@@ -1078,7 +1078,8 @@ static void draw_shgroup(DRWShadingGroup *shgroup, DRWState pass_state)
           break;
         case DRW_CMD_DRAW:
           if (!USE_BATCHING || state.obmats_loc == -1 || (G.f & G_FLAG_PICKSEL) ||
-              cmd->draw.batch->inst[0]) {
+              cmd->draw.batch->inst[0])
+          {
             draw_call_single_do(
                 shgroup, &state, cmd->draw.batch, cmd->draw.handle, 0, 0, 0, 0, true);
           }
diff --git a/source/blender/draw/intern/draw_pbvh.cc b/source/blender/draw/intern/draw_pbvh.cc
index f110c1a3c07..e3f14ea6693 100644
--- a/source/blender/draw/intern/draw_pbvh.cc
+++ b/source/blender/draw/intern/draw_pbvh.cc
@@ -682,7 +682,8 @@ struct PBVHBatches {
         case CustomRequest::Mask: {
           float *data = static_cast(GPU_vertbuf_get_data(&vert_buf));
           if (const VArray mask = *attributes.lookup(".sculpt_mask",
-                                                                   bke::AttrDomain::Point)) {
+                                                                   bke::AttrDomain::Point))
+          {
             const VArraySpan mask_span(mask);
             const Span corner_verts = args.corner_verts;
             const Span corner_tris = args.corner_tris;
diff --git a/source/blender/draw/intern/draw_sculpt.cc b/source/blender/draw/intern/draw_sculpt.cc
index 19d20cb9bba..0559879dab4 100644
--- a/source/blender/draw/intern/draw_sculpt.cc
+++ b/source/blender/draw/intern/draw_sculpt.cc
@@ -139,7 +139,8 @@ Vector sculpt_batches_get(const Object *ob, SculptBatchFeature feat
   if (features & SCULPT_BATCH_VERTEX_COLOR) {
     if (const char *name = mesh->active_color_attribute) {
       if (const std::optional meta_data = attributes.lookup_meta_data(
-              name)) {
+              name))
+      {
         attrs.append(pbvh::GenericRequest{name, meta_data->data_type, meta_data->domain});
       }
     }
diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc
index d0110a0be27..8d39b1e6170 100644
--- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc
+++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_pos_nor.cc
@@ -97,7 +97,8 @@ static void extract_pos_nor_iter_face_mesh(const MeshRenderData &mr,
     vert->nor = data->normals[vert_i].low;
     /* Flag for paint mode overlay. */
     if (poly_hidden || vert_hidden ||
-        ((mr.v_origindex) && (mr.v_origindex[vert_i] == ORIGINDEX_NONE))) {
+        ((mr.v_origindex) && (mr.v_origindex[vert_i] == ORIGINDEX_NONE)))
+    {
       vert->nor.w = -1;
     }
     else if (!mr.select_vert.is_empty() && mr.select_vert[vert_i]) {
@@ -469,7 +470,8 @@ static void extract_pos_nor_hq_iter_face_mesh(const MeshRenderData &mr,
 
     /* Flag for paint mode overlay. */
     if (poly_hidden || vert_hidden ||
-        ((mr.v_origindex) && (mr.v_origindex[vert_i] == ORIGINDEX_NONE))) {
+        ((mr.v_origindex) && (mr.v_origindex[vert_i] == ORIGINDEX_NONE)))
+    {
       vert->nor[3] = -1;
     }
     else if (!mr.select_vert.is_empty() && mr.select_vert[vert_i]) {
diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_tan.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_tan.cc
index 073acbfebe2..b82d78341d3 100644
--- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_tan.cc
+++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_tan.cc
@@ -52,7 +52,8 @@ static void extract_tan_init_common(const MeshRenderData &mr,
   /* FIXME(#91838): This is to avoid a crash when orco tangent was requested but there are valid
    * uv layers. It would be better to fix the root cause. */
   if (tan_layers == 0 && use_orco_tan &&
-      CustomData_get_layer_index(cd_ldata, CD_PROP_FLOAT2) != -1) {
+      CustomData_get_layer_index(cd_ldata, CD_PROP_FLOAT2) != -1)
+  {
     tan_layers = 1;
     use_orco_tan = false;
   }
diff --git a/source/blender/draw/intern/shaders/common_subdiv_patch_evaluation_comp.glsl b/source/blender/draw/intern/shaders/common_subdiv_patch_evaluation_comp.glsl
index ef66ed49de1..e8ebe40eb9c 100644
--- a/source/blender/draw/intern/shaders/common_subdiv_patch_evaluation_comp.glsl
+++ b/source/blender/draw/intern/shaders/common_subdiv_patch_evaluation_comp.glsl
@@ -47,7 +47,7 @@ layout(std430, binding = 7) buffer patchParam_buffer
   OsdPatchParam patchParamBuffer[];
 };
 
-  /* Output buffer(s). */
+/* Output buffer(s). */
 
 #if defined(FVAR_EVALUATION)
 layout(std430, binding = 8) writeonly buffer outputFVarData
diff --git a/source/blender/editors/animation/anim_channels_edit.cc b/source/blender/editors/animation/anim_channels_edit.cc
index 0b5a6d0165c..3e95da4fc4a 100644
--- a/source/blender/editors/animation/anim_channels_edit.cc
+++ b/source/blender/editors/animation/anim_channels_edit.cc
@@ -3507,7 +3507,8 @@ static int click_select_channel_group(bAnimContext *ac,
 
     /* only select channels in group and group itself */
     for (fcu = static_cast(agrp->channels.first); fcu && fcu->grp == agrp;
-         fcu = fcu->next) {
+         fcu = fcu->next)
+    {
       fcu->flag |= FCURVE_SELECTED;
     }
     agrp->flag |= AGRP_SELECTED;
diff --git a/source/blender/editors/animation/anim_filter.cc b/source/blender/editors/animation/anim_filter.cc
index 434335f140a..f0e482afce4 100644
--- a/source/blender/editors/animation/anim_filter.cc
+++ b/source/blender/editors/animation/anim_filter.cc
@@ -1126,7 +1126,8 @@ static bool skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_id
 
     /* Check for selected nodes. */
     if (fcu->rna_path &&
-        BLI_str_quoted_substr(fcu->rna_path, "nodes[", node_name, sizeof(node_name))) {
+        BLI_str_quoted_substr(fcu->rna_path, "nodes[", node_name, sizeof(node_name)))
+    {
       /* Get strip name, and check if this strip is selected. */
       node = nodeFindNodebyName(ntree, node_name);
 
@@ -1276,7 +1277,8 @@ static FCurve *animfilter_fcurve_next(bDopeSheet *ads,
     if (ads && owner_id) {
       if ((filter_mode & ANIMFILTER_TMP_IGNORE_ONLYSEL) == 0) {
         if ((ads->filterflag & ADS_FILTER_ONLYSEL) ||
-            (ads->filterflag & ADS_FILTER_INCL_HIDDEN) == 0) {
+            (ads->filterflag & ADS_FILTER_INCL_HIDDEN) == 0)
+        {
           if (skip_fcurve_selected_data(ads, fcu, owner_id, filter_mode)) {
             continue;
           }
diff --git a/source/blender/editors/animation/anim_markers.cc b/source/blender/editors/animation/anim_markers.cc
index 743ebcc0cff..e7cdeac8d48 100644
--- a/source/blender/editors/animation/anim_markers.cc
+++ b/source/blender/editors/animation/anim_markers.cc
@@ -991,7 +991,8 @@ static void ed_marker_move_apply(bContext *C, wmOperator *op)
 
   ofs = RNA_int_get(op->ptr, "frames");
   for (a = 0, marker = static_cast(mm->markers->first); marker;
-       marker = marker->next) {
+       marker = marker->next)
+  {
     if (marker->flag & SELECT) {
       marker->frame = mm->oldframe[a] + ofs;
       a++;
diff --git a/source/blender/editors/animation/keyframes_draw.cc b/source/blender/editors/animation/keyframes_draw.cc
index 6bdaf543e4c..1f7e1c9af9d 100644
--- a/source/blender/editors/animation/keyframes_draw.cc
+++ b/source/blender/editors/animation/keyframes_draw.cc
@@ -319,7 +319,8 @@ static void draw_keylist_block(const DrawKeylistUIData *ctx, const ActKeyColumn
       }
     }
     if (ctx->show_ipo && actkeyblock_is_valid(ab) &&
-        (ab->block.flag & ACTKEYBLOCK_FLAG_NON_BEZIER)) {
+        (ab->block.flag & ACTKEYBLOCK_FLAG_NON_BEZIER))
+    {
       /* draw an interpolation line */
       draw_keylist_block_interpolation_line(ctx, ab, ypos);
     }
diff --git a/source/blender/editors/armature/armature_add.cc b/source/blender/editors/armature/armature_add.cc
index af060abe4bf..014c79bebe6 100644
--- a/source/blender/editors/armature/armature_add.cc
+++ b/source/blender/editors/armature/armature_add.cc
@@ -533,7 +533,8 @@ static void updateDuplicateActionConstraintSettings(
         const size_t slength = strlen(new_curve->rna_path);
         bool flip = false;
         if (BLI_strn_endswith(new_curve->rna_path, "location", slength) &&
-            new_curve->array_index == 0) {
+            new_curve->array_index == 0)
+        {
           flip = true;
         }
         else if (BLI_strn_endswith(new_curve->rna_path, "rotation_quaternion", slength) &&
diff --git a/source/blender/editors/armature/armature_edit.cc b/source/blender/editors/armature/armature_edit.cc
index eef0c33d294..7f073a19903 100644
--- a/source/blender/editors/armature/armature_edit.cc
+++ b/source/blender/editors/armature/armature_edit.cc
@@ -181,7 +181,8 @@ float ED_armature_ebone_roll_to_vector(const EditBone *bone,
 
   /* If tail == head or the bone is aligned with the axis... */
   if (normalize_v3(nor) <= FLT_EPSILON ||
-      (fabsf(dot_v3v3(align_axis, nor)) >= (1.0f - FLT_EPSILON))) {
+      (fabsf(dot_v3v3(align_axis, nor)) >= (1.0f - FLT_EPSILON)))
+  {
     return roll;
   }
 
diff --git a/source/blender/editors/armature/armature_naming.cc b/source/blender/editors/armature/armature_naming.cc
index 4904e659748..8251cba2285 100644
--- a/source/blender/editors/armature/armature_naming.cc
+++ b/source/blender/editors/armature/armature_naming.cc
@@ -189,7 +189,8 @@ void ED_armature_bone_rename(Main *bmain,
 
     /* do entire dbase - objects */
     for (ob = static_cast(bmain->objects.first); ob;
-         ob = static_cast(ob->id.next)) {
+         ob = static_cast(ob->id.next))
+    {
 
       /* we have the object using the armature */
       if (arm == ob->data) {
diff --git a/source/blender/editors/armature/armature_relations.cc b/source/blender/editors/armature/armature_relations.cc
index 6f780f2573e..f5420802930 100644
--- a/source/blender/editors/armature/armature_relations.cc
+++ b/source/blender/editors/armature/armature_relations.cc
@@ -223,7 +223,8 @@ static void joined_armature_fix_links(
 
   /* let's go through all objects in database */
   for (ob = static_cast(bmain->objects.first); ob;
-       ob = static_cast(ob->id.next)) {
+       ob = static_cast(ob->id.next))
+  {
     /* do some object-type specific things */
     if (ob->type == OB_ARMATURE) {
       pose = ob->pose;
@@ -493,7 +494,8 @@ static void separated_armature_fix_links(Main *bmain, Object *origArm, Object *n
 
   /* let's go through all objects in database */
   for (ob = static_cast(bmain->objects.first); ob;
-       ob = static_cast(ob->id.next)) {
+       ob = static_cast(ob->id.next))
+  {
     /* do some object-type specific things */
     if (ob->type == OB_ARMATURE) {
       LISTBASE_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
diff --git a/source/blender/editors/armature/armature_select.cc b/source/blender/editors/armature/armature_select.cc
index 803c3b76e6c..c47cfde1815 100644
--- a/source/blender/editors/armature/armature_select.cc
+++ b/source/blender/editors/armature/armature_select.cc
@@ -434,7 +434,8 @@ static bool armature_select_linked_impl(Object *ob, const bool select, const boo
 
     /* We have an un-touched link. */
     for (EditBone *ebone = ebone_iter; ebone;
-         ebone = CHECK_PARENT(ebone) ? ebone->parent : nullptr) {
+         ebone = CHECK_PARENT(ebone) ? ebone->parent : nullptr)
+    {
       ED_armature_ebone_select_set(ebone, select);
       changed = true;
 
@@ -464,7 +465,8 @@ static bool armature_select_linked_impl(Object *ob, const bool select, const boo
     /* First check if we're marked. */
     EditBone *ebone_touched_parent = nullptr;
     for (EditBone *ebone = ebone_iter; ebone;
-         ebone = CHECK_PARENT(ebone) ? ebone->parent : nullptr) {
+         ebone = CHECK_PARENT(ebone) ? ebone->parent : nullptr)
+    {
       if (ebone->temp.i & TOUCH) {
         ebone_touched_parent = ebone;
         break;
@@ -517,7 +519,8 @@ static int armature_select_linked_exec(bContext *C, wmOperator *op)
     bool found = false;
     LISTBASE_FOREACH (EditBone *, ebone, arm->edbo) {
       if (EBONE_VISIBLE(arm, ebone) &&
-          (ebone->flag & (BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL))) {
+          (ebone->flag & (BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL)))
+      {
         ebone->flag |= BONE_DONE;
         found = true;
       }
@@ -975,7 +978,8 @@ bool ED_armature_edit_select_pick_bone(
 
   if (params->sel_op == SEL_OP_SET) {
     if ((found && params->select_passthrough) &&
-        (ED_armature_ebone_selectflag_get(ebone) & selmask)) {
+        (ED_armature_ebone_selectflag_get(ebone) & selmask))
+    {
       found = false;
     }
     else if (found || params->deselect_all) {
diff --git a/source/blender/editors/armature/armature_skinning.cc b/source/blender/editors/armature/armature_skinning.cc
index 805edc29d17..57d2b8819eb 100644
--- a/source/blender/editors/armature/armature_skinning.cc
+++ b/source/blender/editors/armature/armature_skinning.cc
@@ -82,7 +82,8 @@ static int bone_skinnable_cb(Object * /*ob*/, Bone *bone, void *datap)
   if (!(data->is_weight_paint) || !(bone->flag & BONE_HIDDEN_P)) {
     if (!(bone->flag & BONE_NO_DEFORM)) {
       if (data->heat && data->armob->pose &&
-          BKE_pose_channel_find_name(data->armob->pose, bone->name)) {
+          BKE_pose_channel_find_name(data->armob->pose, bone->name))
+      {
         segments = bone->segments;
       }
       else {
@@ -156,7 +157,8 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap)
   if (!data->is_weight_paint || !(bone->flag & BONE_HIDDEN_P)) {
     if (!(bone->flag & BONE_NO_DEFORM)) {
       if (data->heat && data->armob->pose &&
-          BKE_pose_channel_find_name(data->armob->pose, bone->name)) {
+          BKE_pose_channel_find_name(data->armob->pose, bone->name))
+      {
         segments = bone->segments;
       }
       else {
diff --git a/source/blender/editors/armature/armature_utils.cc b/source/blender/editors/armature/armature_utils.cc
index 6b25725e49f..b78be20b4f2 100644
--- a/source/blender/editors/armature/armature_utils.cc
+++ b/source/blender/editors/armature/armature_utils.cc
@@ -179,7 +179,8 @@ EditBone *ED_armature_ebone_find_shared_parent(EditBone *ebone_child[], const ui
   /* accumulate */
   for (uint i = 0; i < ebone_child_tot; i++) {
     for (EditBone *ebone_iter = ebone_child[i]->parent; ebone_iter;
-         ebone_iter = ebone_iter->parent) {
+         ebone_iter = ebone_iter->parent)
+    {
       EBONE_TEMP_UINT(ebone_iter) += 1;
     }
   }
diff --git a/source/blender/editors/armature/meshlaplacian.h b/source/blender/editors/armature/meshlaplacian.h
index 8b425fe99b2..f7d510cbbdd 100644
--- a/source/blender/editors/armature/meshlaplacian.h
+++ b/source/blender/editors/armature/meshlaplacian.h
@@ -13,7 +13,7 @@
 extern "C" {
 #endif
 
-//#define RIGID_DEFORM
+// #define RIGID_DEFORM
 
 struct Mesh;
 struct Object;
diff --git a/source/blender/editors/armature/pose_select.cc b/source/blender/editors/armature/pose_select.cc
index 67010e285ff..c9f56fcab29 100644
--- a/source/blender/editors/armature/pose_select.cc
+++ b/source/blender/editors/armature/pose_select.cc
@@ -298,7 +298,8 @@ void ED_armature_pose_select_in_wpaint_mode(const Scene *scene,
         if (ob_arm != nullptr) {
           Base *base_arm = BKE_view_layer_base_find(view_layer, ob_arm);
           if ((base_arm != nullptr) && (base_arm != base_select) &&
-              (base_arm->flag & BASE_SELECTED)) {
+              (base_arm->flag & BASE_SELECTED))
+          {
             ED_object_base_select(base_arm, BA_DESELECT);
           }
         }
@@ -315,7 +316,8 @@ void ED_armature_pose_select_in_wpaint_mode(const Scene *scene,
         if (ob_arm != nullptr) {
           Base *base_arm = BKE_view_layer_base_find(view_layer, ob_arm);
           if ((base_arm != nullptr) && (base_arm != base_select) &&
-              (base_arm->flag & BASE_SELECTED)) {
+              (base_arm->flag & BASE_SELECTED))
+          {
             ED_object_base_select(base_arm, BA_DESELECT);
           }
         }
diff --git a/source/blender/editors/armature/pose_transform.cc b/source/blender/editors/armature/pose_transform.cc
index 1cd07c8dfcc..9538635f74b 100644
--- a/source/blender/editors/armature/pose_transform.cc
+++ b/source/blender/editors/armature/pose_transform.cc
@@ -89,7 +89,8 @@ static void applyarmature_fix_boneparents(const bContext *C, Scene *scene, Objec
 
   /* go through all objects in database */
   for (ob = static_cast(bmain->objects.first); ob;
-       ob = static_cast(ob->id.next)) {
+       ob = static_cast(ob->id.next))
+  {
     /* if parent is bone in this armature, apply corrections */
     if ((ob->parent == armob) && (ob->partype == PARBONE)) {
       /* apply current transform from parent (not yet destroyed),
@@ -1049,7 +1050,8 @@ static void pchan_clear_rot(bPoseChannel *pchan)
         /* check validity of axis - axis should never be 0,0,0
          * (if so, then we make it rotate about y). */
         if (IS_EQF(pchan->rotAxis[0], pchan->rotAxis[1]) &&
-            IS_EQF(pchan->rotAxis[1], pchan->rotAxis[2])) {
+            IS_EQF(pchan->rotAxis[1], pchan->rotAxis[2]))
+        {
           pchan->rotAxis[1] = 1.0f;
         }
       }
@@ -1116,7 +1118,8 @@ static void pchan_clear_rot(bPoseChannel *pchan)
 
         /* quaternions flip w sign to accumulate rotations correctly */
         if ((quat1[0] < 0.0f && pchan->quat[0] > 0.0f) ||
-            (quat1[0] > 0.0f && pchan->quat[0] < 0.0f)) {
+            (quat1[0] > 0.0f && pchan->quat[0] < 0.0f))
+        {
           mul_qt_fl(pchan->quat, -1.0f);
         }
       }
diff --git a/source/blender/editors/curve/editcurve.cc b/source/blender/editors/curve/editcurve.cc
index a253a00e68a..4f81ed39c77 100644
--- a/source/blender/editors/curve/editcurve.cc
+++ b/source/blender/editors/curve/editcurve.cc
@@ -3478,7 +3478,8 @@ static void subdividenurb(Object *obedit, View3D *v3d, int number_cuts)
           }
 
           if (BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, bezt) &&
-              BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, nextbezt)) {
+              BEZT_ISSEL_ANY_HIDDENHANDLES(v3d, nextbezt))
+          {
             float prevvec[3][3];
 
             memcpy(prevvec, bezt->vec, sizeof(float[9]));
@@ -4810,7 +4811,8 @@ bool ED_curve_editnurb_select_pick(bContext *C,
 
   if (params->sel_op == SEL_OP_SET) {
     if ((found && params->select_passthrough) &&
-        (((bezt ? (&bezt->f1)[hand] : bp->f1) & SELECT) != 0)) {
+        (((bezt ? (&bezt->f1)[hand] : bp->f1) & SELECT) != 0))
+    {
       found = false;
     }
     else if (found || params->deselect_all) {
diff --git a/source/blender/editors/curve/editcurve_select.cc b/source/blender/editors/curve/editcurve_select.cc
index 373ca3d55dc..2f16ceedc3a 100644
--- a/source/blender/editors/curve/editcurve_select.cc
+++ b/source/blender/editors/curve/editcurve_select.cc
@@ -355,7 +355,8 @@ static void select_adjacent_cp(ListBase *editnurb,
           break;
         }
         if ((lastsel == false) && (bezt->hide == 0) &&
-            ((bezt->f2 & SELECT) || (selstatus == false))) {
+            ((bezt->f2 & SELECT) || (selstatus == false)))
+        {
           bezt += next;
           if (!(bezt->f2 & SELECT) || (selstatus == false)) {
             bool sel = select_beztriple(bezt, selstatus, SELECT, VISIBLE);
@@ -1086,7 +1087,8 @@ static void curve_select_less(Object *obedit)
           else {
             bp -= nu->pntsu;
             if (BLI_BITMAP_TEST(selbpoints, a + nu->pntsu) ||
-                ((bp->hide == 0) && (bp->f1 & SELECT))) {
+                ((bp->hide == 0) && (bp->f1 & SELECT)))
+            {
               sel++;
             }
             bp += nu->pntsu;
@@ -1645,7 +1647,8 @@ static bool curve_nurb_select_similar_type(Object *ob,
           case SIMCURHAND_RADIUS: {
             float radius_ref = bezt->radius;
             if (ED_select_similar_compare_float_tree(
-                    tree_1d, radius_ref, thresh, eSimilarCmp(compare))) {
+                    tree_1d, radius_ref, thresh, eSimilarCmp(compare)))
+            {
               select = true;
             }
             break;
@@ -1653,7 +1656,8 @@ static bool curve_nurb_select_similar_type(Object *ob,
           case SIMCURHAND_WEIGHT: {
             float weight_ref = bezt->weight;
             if (ED_select_similar_compare_float_tree(
-                    tree_1d, weight_ref, thresh, eSimilarCmp(compare))) {
+                    tree_1d, weight_ref, thresh, eSimilarCmp(compare)))
+            {
               select = true;
             }
             break;
@@ -1692,7 +1696,8 @@ static bool curve_nurb_select_similar_type(Object *ob,
           case SIMCURHAND_RADIUS: {
             float radius_ref = bp->radius;
             if (ED_select_similar_compare_float_tree(
-                    tree_1d, radius_ref, thresh, eSimilarCmp(compare))) {
+                    tree_1d, radius_ref, thresh, eSimilarCmp(compare)))
+            {
               select = true;
             }
             break;
@@ -1700,7 +1705,8 @@ static bool curve_nurb_select_similar_type(Object *ob,
           case SIMCURHAND_WEIGHT: {
             float weight_ref = bp->weight;
             if (ED_select_similar_compare_float_tree(
-                    tree_1d, weight_ref, thresh, eSimilarCmp(compare))) {
+                    tree_1d, weight_ref, thresh, eSimilarCmp(compare)))
+            {
               select = true;
             }
             break;
@@ -1922,7 +1928,8 @@ static void curve_select_shortest_path_curve(Nurb *nu, int vert_src, int vert_ds
 
   if (nu->flagu & CU_NURB_CYCLIC) {
     if (curve_calc_dist_span(nu, vert_src, vert_dst) >
-        curve_calc_dist_span(nu, vert_dst, vert_src)) {
+        curve_calc_dist_span(nu, vert_dst, vert_src))
+    {
       SWAP(int, vert_src, vert_dst);
     }
   }
@@ -1953,7 +1960,7 @@ static void curve_select_shortest_path_surf(Nurb *nu, int vert_src, int vert_dst
   struct PointAdj {
     int vert, vert_prev;
     float cost;
-  } * data;
+  } *data;
 
   /* init connectivity data */
   data = static_cast(MEM_mallocN(sizeof(*data) * vert_num, __func__));
diff --git a/source/blender/editors/curves/intern/curves_selection.cc b/source/blender/editors/curves/intern/curves_selection.cc
index d3f25e3a699..6324741f0d1 100644
--- a/source/blender/editors/curves/intern/curves_selection.cc
+++ b/source/blender/editors/curves/intern/curves_selection.cc
@@ -292,7 +292,8 @@ void select_all(bke::CurvesGeometry &curves,
   if (action == SEL_SELECT) {
     std::optional range = mask.to_range();
     if (range.has_value() &&
-        (*range == IndexRange(curves.attributes().domain_size(selection_domain)))) {
+        (*range == IndexRange(curves.attributes().domain_size(selection_domain))))
+    {
       /* As an optimization, just remove the selection attributes when everything is selected. */
       attributes.remove(".selection");
       return;
@@ -539,7 +540,8 @@ static std::optional find_closest_point_to_screen_co(
 
           const float distance_proj_sq = math::distance_squared(pos_proj, mouse_pos);
           if (distance_proj_sq > radius_sq ||
-              distance_proj_sq > best_match.distance * best_match.distance) {
+              distance_proj_sq > best_match.distance * best_match.distance)
+          {
             /* Ignore the point because it's too far away or there is already a better point. */
             continue;
           }
@@ -598,7 +600,8 @@ static std::optional find_closest_curve_to_screen_co(
 
             const float distance_proj_sq = math::distance_squared(pos_proj, mouse_pos);
             if (distance_proj_sq > radius_sq ||
-                distance_proj_sq > best_match.distance * best_match.distance) {
+                distance_proj_sq > best_match.distance * best_match.distance)
+            {
               /* Ignore the point because it's too far away or there is already a better point.
                */
               continue;
@@ -621,7 +624,8 @@ static std::optional find_closest_curve_to_screen_co(
             const float distance_proj_sq = dist_squared_to_line_segment_v2(
                 mouse_pos, pos1_proj, pos2_proj);
             if (distance_proj_sq > radius_sq ||
-                distance_proj_sq > best_match.distance * best_match.distance) {
+                distance_proj_sq > best_match.distance * best_match.distance)
+            {
               /* Ignore the segment because it's too far away or there is already a better point.
                */
               continue;
diff --git a/source/blender/editors/geometry/node_group_operator.cc b/source/blender/editors/geometry/node_group_operator.cc
index abf882030b2..25cb8d4c131 100644
--- a/source/blender/editors/geometry/node_group_operator.cc
+++ b/source/blender/editors/geometry/node_group_operator.cc
@@ -948,7 +948,8 @@ static bool unassigned_local_poll(const bContext &C)
       continue;
     }
     if (!group->geometry_node_asset_traits ||
-        (group->geometry_node_asset_traits->flag & flag) != flag) {
+        (group->geometry_node_asset_traits->flag & flag) != flag)
+    {
       continue;
     }
     return true;
@@ -992,7 +993,8 @@ static void catalog_assets_draw_unassigned(const bContext *C, Menu *menu)
       continue;
     }
     if (!group->geometry_node_asset_traits ||
-        (group->geometry_node_asset_traits->flag & flag) != flag) {
+        (group->geometry_node_asset_traits->flag & flag) != flag)
+    {
       continue;
     }
 
diff --git a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.cc b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.cc
index 818c6b62f54..af562be8fee 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.cc
+++ b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.cc
@@ -333,7 +333,8 @@ static void dial_ghostarc_get_angles(const wmGizmo *gz,
   };
 
   if (!ED_view3d_win_to_3d_on_plane(
-          region, dial_plane, inter->init.mval, false, proj_mval_init_rel)) {
+          region, dial_plane, inter->init.mval, false, proj_mval_init_rel))
+  {
     return fail();
   }
   sub_v3_v3(proj_mval_init_rel, gz->matrix_basis[3]);
diff --git a/source/blender/editors/gpencil_legacy/annotate_draw.cc b/source/blender/editors/gpencil_legacy/annotate_draw.cc
index bd7d56f1471..51856d29779 100644
--- a/source/blender/editors/gpencil_legacy/annotate_draw.cc
+++ b/source/blender/editors/gpencil_legacy/annotate_draw.cc
@@ -211,7 +211,8 @@ static void annotation_draw_stroke_buffer(bGPdata *gps,
   if (totpoints > 1) {
     /* Draw ending arrow stroke. */
     if ((sflag & GP_STROKE_USE_ARROW_END) &&
-        (runtime.arrow_end_style != GP_STROKE_ARROWSTYLE_NONE)) {
+        (runtime.arrow_end_style != GP_STROKE_ARROWSTYLE_NONE))
+    {
       float end[2];
       copy_v2_v2(end, points[1].m_xy);
       annotation_draw_stroke_arrow_buffer(pos, end, runtime.arrow_end, runtime.arrow_end_style);
@@ -703,7 +704,8 @@ static void annotation_draw_data_layers(
      * that is being edited. (Stroke buffer is currently stored in gp-data)
      */
     if (ED_gpencil_session_active() && (gpl->flag & GP_LAYER_ACTIVE) &&
-        (gpf->flag & GP_FRAME_PAINT)) {
+        (gpf->flag & GP_FRAME_PAINT))
+    {
       /* Buffer stroke needs to be drawn with a different line-style
        * to help differentiate them from normal strokes.
        *
diff --git a/source/blender/editors/gpencil_legacy/gpencil_armature.cc b/source/blender/editors/gpencil_legacy/gpencil_armature.cc
index a4dc6c3caae..71b30b19e5c 100644
--- a/source/blender/editors/gpencil_legacy/gpencil_armature.cc
+++ b/source/blender/editors/gpencil_legacy/gpencil_armature.cc
@@ -127,7 +127,8 @@ static int gpencil_bone_skinnable_cb(Object * /*ob*/, Bone *bone, void *datap)
   if (!(bone->flag & BONE_HIDDEN_P)) {
     if (!(bone->flag & BONE_NO_DEFORM)) {
       if (data->heat && data->armob->pose &&
-          BKE_pose_channel_find_name(data->armob->pose, bone->name)) {
+          BKE_pose_channel_find_name(data->armob->pose, bone->name))
+      {
         segments = bone->segments;
       }
       else {
@@ -200,7 +201,8 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap)
   if (!(bone->flag & BONE_HIDDEN_P)) {
     if (!(bone->flag & BONE_NO_DEFORM)) {
       if (data->heat && data->armob->pose &&
-          BKE_pose_channel_find_name(data->armob->pose, bone->name)) {
+          BKE_pose_channel_find_name(data->armob->pose, bone->name))
+      {
         segments = bone->segments;
       }
       else {
diff --git a/source/blender/editors/gpencil_legacy/gpencil_convert.cc b/source/blender/editors/gpencil_legacy/gpencil_convert.cc
index 9bd48342df4..6005953b899 100644
--- a/source/blender/editors/gpencil_legacy/gpencil_convert.cc
+++ b/source/blender/editors/gpencil_legacy/gpencil_convert.cc
@@ -1522,7 +1522,8 @@ static int gpencil_convert_layer_exec(bContext *C, wmOperator *op)
   gtd.mode = RNA_enum_get(op->ptr, "timing_mode");
   /* Check for illegal timing mode! */
   if (!valid_timing &&
-      !ELEM(gtd.mode, GP_STROKECONVERT_TIMING_NONE, GP_STROKECONVERT_TIMING_LINEAR)) {
+      !ELEM(gtd.mode, GP_STROKECONVERT_TIMING_NONE, GP_STROKECONVERT_TIMING_LINEAR))
+  {
     gtd.mode = GP_STROKECONVERT_TIMING_LINEAR;
     RNA_enum_set(op->ptr, "timing_mode", gtd.mode);
   }
diff --git a/source/blender/editors/gpencil_legacy/gpencil_edit.cc b/source/blender/editors/gpencil_legacy/gpencil_edit.cc
index f7a296e4a03..da7df6fe782 100644
--- a/source/blender/editors/gpencil_legacy/gpencil_edit.cc
+++ b/source/blender/editors/gpencil_legacy/gpencil_edit.cc
@@ -1576,7 +1576,8 @@ static int gpencil_strokes_copy_exec(bContext *C, wmOperator *op)
 
         char **ma_name_val;
         if (!BLI_ghash_ensure_p(
-                gpencil_strokes_copypastebuf_colors, &gps->mat_nr, (void ***)&ma_name_val)) {
+                gpencil_strokes_copypastebuf_colors, &gps->mat_nr, (void ***)&ma_name_val))
+        {
           char *ma_name = static_cast(BLI_ghash_lookup(ma_to_name, ma));
           *ma_name_val = static_cast(MEM_dupallocN(ma_name));
         }
@@ -3303,7 +3304,8 @@ static int gpencil_stroke_cyclical_set_exec(bContext *C, wmOperator *op)
           }
           /* skip hidden or locked colors */
           if (!gp_style || (gp_style->flag & GP_MATERIAL_HIDE) ||
-              (gp_style->flag & GP_MATERIAL_LOCKED)) {
+              (gp_style->flag & GP_MATERIAL_LOCKED))
+          {
             continue;
           }
 
@@ -3449,12 +3451,14 @@ static int gpencil_stroke_caps_set_exec(bContext *C, wmOperator *op)
 
           /* skip strokes that are not selected or invalid for current view */
           if (((gps->flag & GP_STROKE_SELECT) == 0) ||
-              (ED_gpencil_stroke_can_use(C, gps) == false)) {
+              (ED_gpencil_stroke_can_use(C, gps) == false))
+          {
             continue;
           }
           /* skip hidden or locked colors */
           if (!gp_style || (gp_style->flag & GP_MATERIAL_HIDE) ||
-              (gp_style->flag & GP_MATERIAL_LOCKED)) {
+              (gp_style->flag & GP_MATERIAL_LOCKED))
+          {
             continue;
           }
 
diff --git a/source/blender/editors/gpencil_legacy/gpencil_fill.cc b/source/blender/editors/gpencil_legacy/gpencil_fill.cc
index d860c28d561..4547e908d1e 100644
--- a/source/blender/editors/gpencil_legacy/gpencil_fill.cc
+++ b/source/blender/editors/gpencil_legacy/gpencil_fill.cc
@@ -248,7 +248,8 @@ static void gpencil_delete_temp_stroke_extension(tGPDfill *tgpf, const bool all_
       LISTBASE_FOREACH_MUTABLE (bGPDstroke *, gps, &gpf->strokes) {
         /* free stroke */
         if ((gps->flag & GP_STROKE_NOFILL) &&
-            (gps->flag & GP_STROKE_TAG || gps->flag & GP_STROKE_HELP)) {
+            (gps->flag & GP_STROKE_TAG || gps->flag & GP_STROKE_HELP))
+        {
           BLI_remlink(&gpf->strokes, gps);
           BKE_gpencil_free_stroke(gps);
         }
@@ -2259,7 +2260,8 @@ static void gpencil_stroke_from_buffer(tGPDfill *tgpf)
 
   /* if axis locked, reproject to plane locked */
   if ((tgpf->lock_axis > GP_LOCKAXIS_VIEW) &&
-      ((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_VIEW) == 0)) {
+      ((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_VIEW) == 0))
+  {
     float origin[3];
     ED_gpencil_drawing_reference_get(tgpf->scene, tgpf->ob, ts->gpencil_v3d_align, origin);
     ED_gpencil_project_stroke_to_plane(
diff --git a/source/blender/editors/gpencil_legacy/gpencil_paint.cc b/source/blender/editors/gpencil_legacy/gpencil_paint.cc
index e9b4461e993..4cf4c477492 100644
--- a/source/blender/editors/gpencil_legacy/gpencil_paint.cc
+++ b/source/blender/editors/gpencil_legacy/gpencil_paint.cc
@@ -1732,7 +1732,8 @@ static void gpencil_stroke_eraser_dostroke(tGPsdata *p,
 
               /* if invisible, delete point */
               if ((pt0) && ((pt0->strength <= GPENCIL_ALPHA_OPACITY_THRESH) ||
-                            (pt0->pressure < cull_thresh))) {
+                            (pt0->pressure < cull_thresh)))
+              {
                 pt0->flag |= GP_SPOINT_TAG;
                 do_cull = true;
               }
@@ -1933,7 +1934,8 @@ static Brush *gpencil_get_default_eraser(Main *bmain, ToolSettings *ts)
       continue;
     }
     if ((brush->ob_mode == OB_MODE_PAINT_GPENCIL_LEGACY) &&
-        (brush->gpencil_tool == GPAINT_TOOL_ERASE)) {
+        (brush->gpencil_tool == GPAINT_TOOL_ERASE))
+    {
       /* save first eraser to use later if no default */
       if (brush_dft == nullptr) {
         brush_dft = brush;
diff --git a/source/blender/editors/gpencil_legacy/gpencil_select.cc b/source/blender/editors/gpencil_legacy/gpencil_select.cc
index 94c96419cc3..2f13a9a0859 100644
--- a/source/blender/editors/gpencil_legacy/gpencil_select.cc
+++ b/source/blender/editors/gpencil_legacy/gpencil_select.cc
@@ -850,7 +850,8 @@ static bool gpencil_select_same_material(bContext *C)
   if (is_curve_edit) {
     CTX_DATA_BEGIN (C, bGPDstroke *, gps, editable_gpencil_strokes) {
       if (gps->editcurve != nullptr &&
-          BLI_gset_haskey(selected_colors, POINTER_FROM_INT(gps->mat_nr))) {
+          BLI_gset_haskey(selected_colors, POINTER_FROM_INT(gps->mat_nr)))
+      {
         bGPDcurve *gpc = gps->editcurve;
         for (int i = 0; i < gpc->tot_curve_points; i++) {
           bGPDcurve_point *gpc_pt = &gpc->curve_points[i];
diff --git a/source/blender/editors/gpencil_legacy/gpencil_utils.cc b/source/blender/editors/gpencil_legacy/gpencil_utils.cc
index 3d11fb7c0db..9228993ff1b 100644
--- a/source/blender/editors/gpencil_legacy/gpencil_utils.cc
+++ b/source/blender/editors/gpencil_legacy/gpencil_utils.cc
@@ -721,7 +721,8 @@ void gpencil_point_to_xy_fl(const GP_SpaceConversion *gsc,
 
   if (gps->flag & GP_STROKE_3DSPACE) {
     if (ED_view3d_project_float_global(region, &pt->x, xyval, V3D_PROJ_TEST_NOP) ==
-        V3D_PROJ_RET_OK) {
+        V3D_PROJ_RET_OK)
+    {
       *r_x = xyval[0];
       *r_y = xyval[1];
     }
@@ -877,7 +878,8 @@ void gpencil_stroke_convertcoords_tpoint(Scene *scene,
                                            rvec);
 
     if (ED_view3d_project_float_global(region, rvec, mval_prj, V3D_PROJ_TEST_NOP) ==
-        V3D_PROJ_RET_OK) {
+        V3D_PROJ_RET_OK)
+    {
       float dvec[3];
       float xy_delta[2];
       sub_v2_v2v2(xy_delta, mval_prj, point2D->m_xy);
diff --git a/source/blender/editors/gpencil_legacy/gpencil_vertex_ops.cc b/source/blender/editors/gpencil_legacy/gpencil_vertex_ops.cc
index 19ab912780c..b9a1996c1fc 100644
--- a/source/blender/editors/gpencil_legacy/gpencil_vertex_ops.cc
+++ b/source/blender/editors/gpencil_legacy/gpencil_vertex_ops.cc
@@ -183,7 +183,8 @@ static int gpencil_vertexpaint_brightness_contrast_exec(bContext *C, wmOperator
               bGPDspoint *pt;
               for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
                 if (((!any_selected) || (pt->flag & GP_SPOINT_SELECT)) &&
-                    (pt->vert_color[3] > 0.0f)) {
+                    (pt->vert_color[3] > 0.0f))
+                {
                   for (int i2 = 0; i2 < 3; i2++) {
                     pt->vert_color[i2] = gain * pt->vert_color[i2] + offset;
                   }
@@ -295,7 +296,8 @@ static int gpencil_vertexpaint_hsv_exec(bContext *C, wmOperator *op)
               bGPDspoint *pt;
               for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
                 if (((!any_selected) || (pt->flag & GP_SPOINT_SELECT)) &&
-                    (pt->vert_color[3] > 0.0f)) {
+                    (pt->vert_color[3] > 0.0f))
+                {
                   rgb_to_hsv_v(pt->vert_color, hsv);
 
                   hsv[0] += (hue - 0.5f);
@@ -400,7 +402,8 @@ static int gpencil_vertexpaint_invert_exec(bContext *C, wmOperator *op)
 
               for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
                 if (((!any_selected) || (pt->flag & GP_SPOINT_SELECT)) &&
-                    (pt->vert_color[3] > 0.0f)) {
+                    (pt->vert_color[3] > 0.0f))
+                {
                   for (int i2 = 0; i2 < 3; i2++) {
                     pt->vert_color[i2] = 1.0f - pt->vert_color[i2];
                   }
@@ -492,7 +495,8 @@ static int gpencil_vertexpaint_levels_exec(bContext *C, wmOperator *op)
 
               for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
                 if (((!any_selected) || (pt->flag & GP_SPOINT_SELECT)) &&
-                    (pt->vert_color[3] > 0.0f)) {
+                    (pt->vert_color[3] > 0.0f))
+                {
                   for (int i2 = 0; i2 < 3; i2++) {
                     pt->vert_color[i2] = gain * (pt->vert_color[i2] + offset);
                   }
diff --git a/source/blender/editors/gpencil_legacy/gpencil_weight_paint.cc b/source/blender/editors/gpencil_legacy/gpencil_weight_paint.cc
index 4147c451e16..a83d37adf74 100644
--- a/source/blender/editors/gpencil_legacy/gpencil_weight_paint.cc
+++ b/source/blender/editors/gpencil_legacy/gpencil_weight_paint.cc
@@ -401,7 +401,8 @@ static bool do_weight_paint_normalize(MDeformVert *dvert,
     for (int i = dvert->totweight; i != 0; i--, dw++) {
       if (dw->def_nr < defbase_tot && vgroup_bone_deformed[dw->def_nr]) {
         if ((vgroup_locked[dw->def_nr] == false) &&
-            !(lock_active_vgroup && active_vgroup == dw->def_nr)) {
+            !(lock_active_vgroup && active_vgroup == dw->def_nr))
+        {
           dw->weight = 0.0f;
         }
       }
@@ -417,7 +418,8 @@ static bool do_weight_paint_normalize(MDeformVert *dvert,
       if (dw->def_nr < defbase_tot && vgroup_bone_deformed[dw->def_nr] && dw->weight > FLT_EPSILON)
       {
         if ((vgroup_locked[dw->def_nr] == false) &&
-            !(lock_active_vgroup && active_vgroup == dw->def_nr)) {
+            !(lock_active_vgroup && active_vgroup == dw->def_nr))
+        {
           dw->weight *= fac;
           CLAMP(dw->weight, 0.0f, 1.0f);
         }
@@ -433,7 +435,8 @@ static bool do_weight_paint_normalize(MDeformVert *dvert,
       if (dw->def_nr < defbase_tot && vgroup_bone_deformed[dw->def_nr] && dw->weight > FLT_EPSILON)
       {
         if ((vgroup_locked[dw->def_nr] == false) &&
-            !(lock_active_vgroup && active_vgroup == dw->def_nr)) {
+            !(lock_active_vgroup && active_vgroup == dw->def_nr))
+        {
           dw->weight = fac;
         }
       }
diff --git a/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc b/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc
index 6ff8a878550..052163e655d 100644
--- a/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc
+++ b/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc
@@ -246,7 +246,8 @@ void gaussian_blur_1D(const GSpan src,
     using T = decltype(dummy);
     /* Reduces unnecessary code generation. */
     if constexpr (std::is_same_v || std::is_same_v ||
-                  std::is_same_v) {
+                  std::is_same_v)
+    {
       gaussian_blur_1D(src.typed(),
                        iterations,
                        influence,
diff --git a/source/blender/editors/grease_pencil/intern/grease_pencil_frames.cc b/source/blender/editors/grease_pencil/intern/grease_pencil_frames.cc
index ccf5426bad8..60a67b48553 100644
--- a/source/blender/editors/grease_pencil/intern/grease_pencil_frames.cc
+++ b/source/blender/editors/grease_pencil/intern/grease_pencil_frames.cc
@@ -264,7 +264,8 @@ void select_frames_region(KeyframeEditData *ked,
       }
       else if (tool == BEZT_OK_CHANNEL_CIRCLE) {
         if (keyframe_region_circle_test(static_cast(ked->data),
-                                        pt)) {
+                                        pt))
+        {
           select_frame(frame, select_mode);
         }
       }
diff --git a/source/blender/editors/include/ED_transform_snap_object_context.hh b/source/blender/editors/include/ED_transform_snap_object_context.hh
index e97e06a03ff..30b46e12031 100644
--- a/source/blender/editors/include/ED_transform_snap_object_context.hh
+++ b/source/blender/editors/include/ED_transform_snap_object_context.hh
@@ -10,7 +10,7 @@
 
 #include "DNA_scene_types.h"
 
-//#define DEBUG_SNAP_TIME
+// #define DEBUG_SNAP_TIME
 
 struct BMEdge;
 struct BMFace;
diff --git a/source/blender/editors/interface/interface.cc b/source/blender/editors/interface/interface.cc
index 8c6be8ce0f0..e591d92e1d3 100644
--- a/source/blender/editors/interface/interface.cc
+++ b/source/blender/editors/interface/interface.cc
@@ -2472,7 +2472,8 @@ bool ui_but_is_bool(const uiBut *but)
   }
 
   if ((but->rnaprop && RNA_property_type(but->rnaprop) == PROP_ENUM) &&
-      (but->type == UI_BTYPE_ROW)) {
+      (but->type == UI_BTYPE_ROW))
+  {
     return true;
   }
 
diff --git a/source/blender/editors/interface/interface_context_menu.cc b/source/blender/editors/interface/interface_context_menu.cc
index 3aa8185a636..7d3d2ef4c3c 100644
--- a/source/blender/editors/interface/interface_context_menu.cc
+++ b/source/blender/editors/interface/interface_context_menu.cc
@@ -978,7 +978,8 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but, const wmEvent *ev
                    true);
 
     if (ptr->owner_id && !is_whole_array &&
-        ELEM(type, PROP_BOOLEAN, PROP_INT, PROP_FLOAT, PROP_ENUM)) {
+        ELEM(type, PROP_BOOLEAN, PROP_INT, PROP_FLOAT, PROP_ENUM))
+    {
       uiItemO(layout,
               CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy as New Driver"),
               ICON_NONE,
diff --git a/source/blender/editors/interface/interface_handlers.cc b/source/blender/editors/interface/interface_handlers.cc
index 48596af36f1..d5bbac775c1 100644
--- a/source/blender/editors/interface/interface_handlers.cc
+++ b/source/blender/editors/interface/interface_handlers.cc
@@ -657,7 +657,8 @@ static bool ui_but_dragedit_update_mval(uiHandleButtonData *data, int mx)
 #ifdef USE_DRAG_MULTINUM
     if (ELEM(data->multi_data.init,
              uiHandleButtonMulti::INIT_UNSET,
-             uiHandleButtonMulti::INIT_SETUP)) {
+             uiHandleButtonMulti::INIT_SETUP))
+    {
       return false;
     }
 #endif
@@ -959,7 +960,8 @@ static void ui_apply_but_undo(uiBut *but)
     else {
       ID *id = but->rnapoin.owner_id;
       if (!ED_undo_is_legacy_compatible_for_property(static_cast(but->block->evil_C),
-                                                     id)) {
+                                                     id))
+      {
         skip_undo = true;
       }
     }
@@ -4747,7 +4749,8 @@ static int ui_do_but_TEX(
 {
   if (data->state == BUTTON_STATE_HIGHLIGHT) {
     if (ELEM(event->type, LEFTMOUSE, EVT_BUT_OPEN, EVT_PADENTER, EVT_RETKEY) &&
-        event->val == KM_PRESS) {
+        event->val == KM_PRESS)
+    {
       if (ELEM(event->type, EVT_PADENTER, EVT_RETKEY) && !UI_but_is_utf8(but)) {
         /* Pass, allow file-selector, enter to execute. */
       }
@@ -6016,7 +6019,8 @@ static int ui_do_but_SCROLL(
     else if (event->type == MOUSEMOVE) {
       const bool is_motion = (event->type == MOUSEMOVE);
       if (ui_numedit_but_SLI(
-              but, data, (horizontal) ? mx : my, horizontal, is_motion, false, false)) {
+              but, data, (horizontal) ? mx : my, horizontal, is_motion, false, false))
+      {
         /* Scroll-bars in popups need UI layout refresh to update the right items to show. */
         if (ui_block_is_popup_any(but->block)) {
           ED_region_tag_refresh_ui(data->region);
@@ -9403,7 +9407,8 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but)
           if (data->hold_action_timer) {
             if (but->flag & UI_SELECT) {
               if (len_manhattan_v2v2_int(event->xy, event->prev_xy) <=
-                  WM_EVENT_CURSOR_MOTION_THRESHOLD) {
+                  WM_EVENT_CURSOR_MOTION_THRESHOLD)
+              {
                 /* pass */
               }
               else {
@@ -10474,7 +10479,8 @@ static int ui_handle_menu_event(bContext *C,
           if (event->val == KM_PRESS && (block->flag & UI_BLOCK_LOOP)) {
 
             if (ui_menu_pass_event_to_parent_if_nonactive(
-                    menu, but, level, is_parent_menu, retval)) {
+                    menu, but, level, is_parent_menu, retval))
+            {
               break;
             }
 
@@ -10575,7 +10581,8 @@ static int ui_handle_menu_event(bContext *C,
               }
 
               if (ui_menu_pass_event_to_parent_if_nonactive(
-                      menu, but, level, is_parent_menu, retval)) {
+                      menu, but, level, is_parent_menu, retval))
+              {
                 break;
               }
 
@@ -10687,7 +10694,8 @@ static int ui_handle_menu_event(bContext *C,
             int count;
 
             if (ui_menu_pass_event_to_parent_if_nonactive(
-                    menu, but, level, is_parent_menu, retval)) {
+                    menu, but, level, is_parent_menu, retval))
+            {
               break;
             }
 
@@ -10709,7 +10717,8 @@ static int ui_handle_menu_event(bContext *C,
                         UI_BTYPE_LABEL,
                         UI_BTYPE_SEPR,
                         UI_BTYPE_SEPR_LINE,
-                        UI_BTYPE_IMAGE)) {
+                        UI_BTYPE_IMAGE))
+              {
                 count++;
               }
 
@@ -10789,7 +10798,8 @@ static int ui_handle_menu_event(bContext *C,
             /* Menu search if space-bar or #MenuTypeFlag::SearchOnKeyPress. */
             MenuType *mt = WM_menutype_find(menu->menu_idname, true);
             if ((mt && bool(mt->flag & MenuTypeFlag::SearchOnKeyPress)) ||
-                event->type == EVT_SPACEKEY) {
+                event->type == EVT_SPACEKEY)
+            {
               if ((level != 0) && (but == nullptr || !menu->menu_idname[0])) {
                 /* Search parent if the child is open but not activated or not searchable. */
                 menu->menuretval = UI_RETURN_OUT | UI_RETURN_OUT_PARENT;
@@ -10801,7 +10811,8 @@ static int ui_handle_menu_event(bContext *C,
             }
 
             if (ui_menu_pass_event_to_parent_if_nonactive(
-                    menu, but, level, is_parent_menu, retval)) {
+                    menu, but, level, is_parent_menu, retval))
+            {
               break;
             }
 
@@ -10848,7 +10859,8 @@ static int ui_handle_menu_event(bContext *C,
               }
             }
             else if (saferct && !BLI_rctf_isect_pt(
-                                    &saferct->parent, float(event->xy[0]), float(event->xy[1]))) {
+                                    &saferct->parent, float(event->xy[0]), float(event->xy[1])))
+            {
               if (block->flag & UI_BLOCK_OUT_1) {
                 menu->menuretval = UI_RETURN_OK;
               }
@@ -10874,7 +10886,8 @@ static int ui_handle_menu_event(bContext *C,
       }
 #ifdef USE_KEYNAV_LIMIT
       else if ((event->type == MOUSEMOVE) &&
-               ui_mouse_motion_keynav_test(&menu->keynav_state, event)) {
+               ui_mouse_motion_keynav_test(&menu->keynav_state, event))
+      {
         /* Don't handle the mouse-move if we're using key-navigation. */
         retval = WM_UI_HANDLER_BREAK;
       }
@@ -10929,12 +10942,14 @@ static int ui_handle_menu_event(bContext *C,
 
           /* Check for all parent rects, enables arrow-keys to be used. */
           for (saferct = static_cast(block->saferct.first); saferct;
-               saferct = saferct->next) {
+               saferct = saferct->next)
+          {
             /* for mouse move we only check our own rect, for other
              * events we check all preceding block rects too to make
              * arrow keys navigation work */
             if (event->type != MOUSEMOVE ||
-                saferct == static_cast(block->saferct.first)) {
+                saferct == static_cast(block->saferct.first))
+            {
               if (BLI_rctf_isect_pt(&saferct->parent, float(event->xy[0]), float(event->xy[1]))) {
                 break;
               }
diff --git a/source/blender/editors/interface/interface_icons.cc b/source/blender/editors/interface/interface_icons.cc
index 7e8a010ec7a..b2285ebff4e 100644
--- a/source/blender/editors/interface/interface_icons.cc
+++ b/source/blender/editors/interface/interface_icons.cc
@@ -2144,7 +2144,8 @@ static int ui_id_brush_get_icon(const bContext *C, ID *id)
 
     /* reset the icon */
     if ((ob != nullptr) && (ob->mode & OB_MODE_ALL_PAINT_GPENCIL) &&
-        (br->gpencil_settings != nullptr)) {
+        (br->gpencil_settings != nullptr))
+    {
       switch (br->gpencil_settings->icon_id) {
         case GP_BRUSH_ICON_PENCIL:
           br->id.icon_id = ICON_GPBRUSH_PENCIL;
diff --git a/source/blender/editors/interface/interface_layout.cc b/source/blender/editors/interface/interface_layout.cc
index cf2e9a58a22..86b6206098d 100644
--- a/source/blender/editors/interface/interface_layout.cc
+++ b/source/blender/editors/interface/interface_layout.cc
@@ -693,7 +693,8 @@ static void ui_item_array(uiLayout *layout,
       /* Show check-boxes for rna on a non-emboss block (menu for eg). */
       bool *boolarr = nullptr;
       if (type == PROP_BOOLEAN &&
-          ELEM(layout->root->block->emboss, UI_EMBOSS_NONE, UI_EMBOSS_PULLDOWN)) {
+          ELEM(layout->root->block->emboss, UI_EMBOSS_NONE, UI_EMBOSS_PULLDOWN))
+      {
         boolarr = static_cast(MEM_callocN(sizeof(bool) * len, __func__));
         RNA_property_boolean_get_array(ptr, prop, boolarr);
       }
@@ -1176,7 +1177,8 @@ static void ui_but_tip_from_enum_item(uiBut *but, const EnumPropertyItem *item)
 {
   if (but->tip == nullptr || but->tip[0] == '\0') {
     if (item->description && item->description[0] &&
-        !(but->optype && but->optype->get_description)) {
+        !(but->optype && but->optype->get_description))
+    {
       but->tip = item->description;
     }
   }
@@ -1703,7 +1705,7 @@ void uiItemEnumO_value(uiLayout *layout,
                        int value)
 {
   wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */
-  UI_OPERATOR_ERROR_RET(ot, opname, return );
+  UI_OPERATOR_ERROR_RET(ot, opname, return);
 
   PointerRNA ptr;
   WM_operator_properties_create_ptr(&ptr, ot);
@@ -1740,7 +1742,7 @@ void uiItemEnumO_string(uiLayout *layout,
                         const char *value_str)
 {
   wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */
-  UI_OPERATOR_ERROR_RET(ot, opname, return );
+  UI_OPERATOR_ERROR_RET(ot, opname, return);
 
   PointerRNA ptr;
   WM_operator_properties_create_ptr(&ptr, ot);
@@ -1796,7 +1798,7 @@ void uiItemBooleanO(uiLayout *layout,
                     int value)
 {
   wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */
-  UI_OPERATOR_ERROR_RET(ot, opname, return );
+  UI_OPERATOR_ERROR_RET(ot, opname, return);
 
   PointerRNA ptr;
   WM_operator_properties_create_ptr(&ptr, ot);
@@ -1820,7 +1822,7 @@ void uiItemIntO(uiLayout *layout,
                 int value)
 {
   wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */
-  UI_OPERATOR_ERROR_RET(ot, opname, return );
+  UI_OPERATOR_ERROR_RET(ot, opname, return);
 
   PointerRNA ptr;
   WM_operator_properties_create_ptr(&ptr, ot);
@@ -1845,7 +1847,7 @@ void uiItemFloatO(uiLayout *layout,
 {
   wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */
 
-  UI_OPERATOR_ERROR_RET(ot, opname, return );
+  UI_OPERATOR_ERROR_RET(ot, opname, return);
 
   PointerRNA ptr;
   WM_operator_properties_create_ptr(&ptr, ot);
@@ -1870,7 +1872,7 @@ void uiItemStringO(uiLayout *layout,
 {
   wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */
 
-  UI_OPERATOR_ERROR_RET(ot, opname, return );
+  UI_OPERATOR_ERROR_RET(ot, opname, return);
 
   PointerRNA ptr;
   WM_operator_properties_create_ptr(&ptr, ot);
@@ -3684,7 +3686,7 @@ void uiItemMenuEnumFullO(uiLayout *layout,
 {
   wmOperatorType *ot = WM_operatortype_find(opname, false); /* print error next */
 
-  UI_OPERATOR_ERROR_RET(ot, opname, return );
+  UI_OPERATOR_ERROR_RET(ot, opname, return);
 
   if (!ot->srna) {
     ui_item_disabled(layout, opname);
diff --git a/source/blender/editors/interface/interface_panel.cc b/source/blender/editors/interface/interface_panel.cc
index f8faf7d8d0b..d7cda1deb52 100644
--- a/source/blender/editors/interface/interface_panel.cc
+++ b/source/blender/editors/interface/interface_panel.cc
@@ -621,7 +621,8 @@ static void panels_collapse_all(ARegion *region, const Panel *from_panel)
     if (pt && from_pt && !(pt->flag & PANEL_TYPE_NO_HEADER)) {
       if (!pt->context[0] || !from_pt->context[0] || STREQ(pt->context, from_pt->context)) {
         if ((panel->flag & PNL_PIN) || !category || !pt->category[0] ||
-            STREQ(pt->category, category)) {
+            STREQ(pt->category, category))
+        {
           panel->flag |= PNL_CLOSED;
         }
       }
@@ -2267,7 +2268,8 @@ static void ui_panel_category_active_set(ARegion *region, const char *idname, bo
     while ((pc_act = pc_act_next)) {
       pc_act_next = pc_act->next;
       if (!BLI_findstring(
-              ®ion->type->paneltypes, pc_act->idname, offsetof(PanelType, category))) {
+              ®ion->type->paneltypes, pc_act->idname, offsetof(PanelType, category)))
+      {
         BLI_remlink(lb, pc_act);
         MEM_freeN(pc_act);
       }
@@ -2471,7 +2473,8 @@ int ui_handler_panel_region(bContext *C,
       /* The panel collapse / expand key "A" is special as it takes priority over
        * active button handling. */
       if (event->type == EVT_AKEY &&
-          ((event->modifier & (KM_SHIFT | KM_CTRL | KM_ALT | KM_OSKEY)) == 0)) {
+          ((event->modifier & (KM_SHIFT | KM_CTRL | KM_ALT | KM_OSKEY)) == 0))
+      {
         retval = WM_UI_HANDLER_BREAK;
         ui_handle_panel_header(
             C, block, mx, event->type, event->modifier & KM_CTRL, event->modifier & KM_SHIFT);
diff --git a/source/blender/editors/interface/interface_region_popup.cc b/source/blender/editors/interface/interface_region_popup.cc
index 3e117bb4688..5ce3be7989a 100644
--- a/source/blender/editors/interface/interface_region_popup.cc
+++ b/source/blender/editors/interface/interface_region_popup.cc
@@ -863,7 +863,8 @@ void ui_popup_block_free(bContext *C, uiPopupBlockHandle *handle)
   if (region != nullptr) {
     LISTBASE_FOREACH (uiBlock *, block, ®ion->uiblocks) {
       if (block->handle && (block->flag & UI_BLOCK_POPOVER) &&
-          (block->flag & UI_BLOCK_KEEP_OPEN) == 0) {
+          (block->flag & UI_BLOCK_KEEP_OPEN) == 0)
+      {
         uiPopupBlockHandle *menu = block->handle;
         menu->menuretval = UI_RETURN_OK;
       }
diff --git a/source/blender/editors/interface/interface_region_search.cc b/source/blender/editors/interface/interface_region_search.cc
index aa0899af0e9..d6dbf6eb852 100644
--- a/source/blender/editors/interface/interface_region_search.cc
+++ b/source/blender/editors/interface/interface_region_search.cc
@@ -616,7 +616,8 @@ static void ui_searchbox_region_draw_fn(const bContext *C, ARegion *region)
 
         /* widget itself */
         if ((search_sep_len == 0) ||
-            !(name_sep_test = strstr(data->items.names[a], data->sep_string))) {
+            !(name_sep_test = strstr(data->items.names[a], data->sep_string)))
+        {
           if (!icon && data->items.has_icon) {
             /* If there is any icon item, make sure all items line up. */
             icon = ICON_BLANK1;
diff --git a/source/blender/editors/interface/interface_template_list.cc b/source/blender/editors/interface/interface_template_list.cc
index 7184cfe73a3..f168a415190 100644
--- a/source/blender/editors/interface/interface_template_list.cc
+++ b/source/blender/editors/interface/interface_template_list.cc
@@ -588,7 +588,8 @@ static void uilist_prepare(uiList *ui_list,
   /* If list length changes or list is tagged to check this,
    * and active is out of view, scroll to it. */
   if ((ui_list->list_last_len != items->tot_items) ||
-      (ui_list->flag & UILST_SCROLL_TO_ACTIVE_ITEM)) {
+      (ui_list->flag & UILST_SCROLL_TO_ACTIVE_ITEM))
+  {
     if (activei_row < ui_list->list_scroll) {
       ui_list->list_scroll = activei_row;
     }
@@ -782,7 +783,8 @@ static void ui_template_list_layout_draw(const bContext *C,
                                0,
                                editable ? TIP_("Double click to rename") : "");
           if ((dyntip_data = uilist_item_use_dynamic_tooltip(itemptr,
-                                                             input_data->item_dyntip_propname))) {
+                                                             input_data->item_dyntip_propname)))
+          {
             UI_but_func_tooltip_set(but, uilist_item_tooltip_func, dyntip_data, MEM_freeN);
           }
 
diff --git a/source/blender/editors/interface/interface_templates.cc b/source/blender/editors/interface/interface_templates.cc
index 1ad2072ce02..d80d020b6ab 100644
--- a/source/blender/editors/interface/interface_templates.cc
+++ b/source/blender/editors/interface/interface_templates.cc
@@ -2772,7 +2772,8 @@ static eAutoPropButsReturn template_operator_property_buts_draw_single(
         (layout_flags & UI_TEMPLATE_OP_PROPS_COMPACT));
 
     if ((return_info & UI_PROP_BUTS_NONE_ADDED) &&
-        (layout_flags & UI_TEMPLATE_OP_PROPS_SHOW_EMPTY)) {
+        (layout_flags & UI_TEMPLATE_OP_PROPS_SHOW_EMPTY))
+    {
       uiItemL(layout, IFACE_("No Properties"), ICON_NONE);
     }
   }
@@ -2883,7 +2884,8 @@ static bool ui_layout_operator_properties_only_booleans(const bContext *C,
         continue;
       }
       if (op->type->poll_property &&
-          !ui_layout_operator_buts_poll_property(&ptr, prop, &user_data)) {
+          !ui_layout_operator_buts_poll_property(&ptr, prop, &user_data))
+      {
         continue;
       }
       if (RNA_property_type(prop) != PROP_BOOLEAN) {
@@ -4819,7 +4821,8 @@ static void curvemap_buttons_layout(uiLayout *layout,
                       TIP_("Auto Handle"));
     UI_but_func_set(bt, curvemap_tools_handle_auto, cumap, nullptr);
     if (((cmp->flag & CUMA_HANDLE_AUTO_ANIM) == false) &&
-        ((cmp->flag & CUMA_HANDLE_VECTOR) == false)) {
+        ((cmp->flag & CUMA_HANDLE_VECTOR) == false))
+    {
       bt->flag |= UI_SELECT_DRAW;
     }
 
diff --git a/source/blender/editors/interface/interface_widgets.cc b/source/blender/editors/interface/interface_widgets.cc
index 696827f197e..bc885fb8398 100644
--- a/source/blender/editors/interface/interface_widgets.cc
+++ b/source/blender/editors/interface/interface_widgets.cc
@@ -1998,7 +1998,8 @@ static void widget_draw_text(const uiFontStyle *fstyle,
         bool has_prev = false;
         if (pos > 0) {
           if (BLF_str_offset_to_glyph_bounds(
-                  fstyle->uifont_id, drawstr + but->ofs, pos - 1, &bounds)) {
+                  fstyle->uifont_id, drawstr + but->ofs, pos - 1, &bounds))
+          {
             if (bounds.xmax > bounds.xmin) {
               prev_right_edge = bounds.xmax;
             }
@@ -5097,7 +5098,8 @@ void ui_draw_but(const bContext *C, ARegion *region, uiStyle *style, uiBut *but,
   }
 
   if ((but->editstr) ||
-      (UNLIKELY(but->flag & UI_BUT_DRAG_MULTI) && ui_but_drag_multi_edit_get(but))) {
+      (UNLIKELY(but->flag & UI_BUT_DRAG_MULTI) && ui_but_drag_multi_edit_get(but)))
+  {
     state.is_text_input = true;
   }
 
@@ -5416,7 +5418,8 @@ void ui_draw_pie_center(uiBlock *block)
   immUnbindProgram();
 
   if (U.pie_menu_confirm > 0 &&
-      !(block->pie_data.flags & (UI_PIE_INVALID_DIR | UI_PIE_CLICK_STYLE))) {
+      !(block->pie_data.flags & (UI_PIE_INVALID_DIR | UI_PIE_CLICK_STYLE)))
+  {
     const float pie_confirm_radius = UI_SCALE_FAC * (pie_radius_internal + U.pie_menu_confirm);
     const float pie_confirm_external = UI_SCALE_FAC *
                                        (pie_radius_internal + U.pie_menu_confirm + 7.0f);
diff --git a/source/blender/editors/interface/view2d.cc b/source/blender/editors/interface/view2d.cc
index b95358ebb83..6b55c5c9190 100644
--- a/source/blender/editors/interface/view2d.cc
+++ b/source/blender/editors/interface/view2d.cc
@@ -651,7 +651,8 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize)
 
     /* width */
     if ((curwidth > totwidth) &&
-        !(v2d->keepzoom & (V2D_KEEPZOOM | V2D_LOCKZOOM_X | V2D_LIMITZOOM))) {
+        !(v2d->keepzoom & (V2D_KEEPZOOM | V2D_LOCKZOOM_X | V2D_LIMITZOOM)))
+    {
       /* if zoom doesn't have to be maintained, just clamp edges */
       if (cur->xmin < tot->xmin) {
         cur->xmin = tot->xmin;
@@ -740,7 +741,8 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize)
 
     /* height */
     if ((curheight > totheight) &&
-        !(v2d->keepzoom & (V2D_KEEPZOOM | V2D_LOCKZOOM_Y | V2D_LIMITZOOM))) {
+        !(v2d->keepzoom & (V2D_KEEPZOOM | V2D_LOCKZOOM_Y | V2D_LIMITZOOM)))
+    {
       /* if zoom doesn't have to be maintained, just clamp edges */
       if (cur->ymin < tot->ymin) {
         cur->ymin = tot->ymin;
diff --git a/source/blender/editors/interface/view2d_ops.cc b/source/blender/editors/interface/view2d_ops.cc
index 77a23c32f56..064458c7510 100644
--- a/source/blender/editors/interface/view2d_ops.cc
+++ b/source/blender/editors/interface/view2d_ops.cc
@@ -785,7 +785,8 @@ static void view_zoomstep_apply_ex(bContext *C,
 
         /* only move view to mouse if zoom fac is inside minzoom/maxzoom */
         if (((v2d->keepzoom & V2D_LIMITZOOM) == 0) ||
-            IN_RANGE_INCL(zoomx, v2d->minzoom, v2d->maxzoom)) {
+            IN_RANGE_INCL(zoomx, v2d->minzoom, v2d->maxzoom))
+        {
           const float mval_fac = (vzd->mx_2d - cur_old.xmin) / BLI_rctf_size_x(&cur_old);
           const float mval_faci = 1.0f - mval_fac;
           const float ofs = (mval_fac * dx) - (mval_faci * dx);
@@ -820,7 +821,8 @@ static void view_zoomstep_apply_ex(bContext *C,
 
         /* only move view to mouse if zoom fac is inside minzoom/maxzoom */
         if (((v2d->keepzoom & V2D_LIMITZOOM) == 0) ||
-            IN_RANGE_INCL(zoomy, v2d->minzoom, v2d->maxzoom)) {
+            IN_RANGE_INCL(zoomy, v2d->minzoom, v2d->maxzoom))
+        {
           const float mval_fac = (vzd->my_2d - cur_old.ymin) / BLI_rctf_size_y(&cur_old);
           const float mval_faci = 1.0f - mval_fac;
           const float ofs = (mval_fac * dy) - (mval_faci * dy);
@@ -1174,7 +1176,8 @@ static int view_zoomdrag_invoke(bContext *C, wmOperator *op, const wmEvent *even
     /* Only respect user setting zoom axis if the view does not have any zoom restrictions
      * any will be scaled uniformly. */
     if (((v2d->keepzoom & (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y)) == 0) &&
-        (v2d->keepzoom & V2D_KEEPASPECT)) {
+        (v2d->keepzoom & V2D_KEEPASPECT))
+    {
       if (U.uiflag & USER_ZOOM_HORIZ) {
         facy = 0.0f;
       }
diff --git a/source/blender/editors/mask/mask_add.cc b/source/blender/editors/mask/mask_add.cc
index 4d70222c498..a62e46c486c 100644
--- a/source/blender/editors/mask/mask_add.cc
+++ b/source/blender/editors/mask/mask_add.cc
@@ -183,7 +183,8 @@ static void finSelectedSplinePoint(MaskLayer *mask_layer,
   if (check_active) {
     /* TODO: having an active point but no active spline is possible, why? */
     if (mask_layer->act_spline && mask_layer->act_point &&
-        MASKPOINT_ISSEL_ANY(mask_layer->act_point)) {
+        MASKPOINT_ISSEL_ANY(mask_layer->act_point))
+    {
       *spline = mask_layer->act_spline;
       *point = mask_layer->act_point;
       return;
diff --git a/source/blender/editors/mesh/editface.cc b/source/blender/editors/mesh/editface.cc
index 01588560bbb..2110b1099d8 100644
--- a/source/blender/editors/mesh/editface.cc
+++ b/source/blender/editors/mesh/editface.cc
@@ -256,7 +256,8 @@ static void build_poly_connections(blender::AtomicDisjointSet &islands,
         }
 
         for (const int inner_edge :
-             face_edges.slice(poly_loop_index, face_edges.size() - poly_loop_index)) {
+             face_edges.slice(poly_loop_index, face_edges.size() - poly_loop_index))
+        {
           if (outer_edge == inner_edge) {
             continue;
           }
diff --git a/source/blender/editors/mesh/editmesh_automerge.cc b/source/blender/editors/mesh/editmesh_automerge.cc
index b1660b531aa..0853837205e 100644
--- a/source/blender/editors/mesh/editmesh_automerge.cc
+++ b/source/blender/editors/mesh/editmesh_automerge.cc
@@ -19,7 +19,7 @@
 
 #include "tools/bmesh_intersect_edges.hh"
 
-//#define DEBUG_TIME
+// #define DEBUG_TIME
 #ifdef DEBUG_TIME
 #  include "PIL_time.h"
 #endif
diff --git a/source/blender/editors/mesh/editmesh_bisect.cc b/source/blender/editors/mesh/editmesh_bisect.cc
index d03ac2d195d..07d48b7c4ca 100644
--- a/source/blender/editors/mesh/editmesh_bisect.cc
+++ b/source/blender/editors/mesh/editmesh_bisect.cc
@@ -58,7 +58,7 @@ struct BisectData {
     BMBackup mesh_backup;
     bool is_valid;
     bool is_dirty;
-  } * backup;
+  } *backup;
   int backup_len;
 };
 
diff --git a/source/blender/editors/mesh/editmesh_intersect.cc b/source/blender/editors/mesh/editmesh_intersect.cc
index 3b6ea24c778..60e85fade9b 100644
--- a/source/blender/editors/mesh/editmesh_intersect.cc
+++ b/source/blender/editors/mesh/editmesh_intersect.cc
@@ -770,7 +770,8 @@ static BMEdge *bm_face_split_edge_find(BMEdge *e_a,
         bool ok = true;
 
         if (UNLIKELY(BM_edge_exists(v_pivot, l_iter->e->v1) ||
-                     BM_edge_exists(v_pivot, l_iter->e->v2))) {
+                     BM_edge_exists(v_pivot, l_iter->e->v2)))
+        {
           /* very unlikely but will cause complications splicing the verts together,
            * so just skip this case */
           ok = false;
diff --git a/source/blender/editors/mesh/editmesh_knife.cc b/source/blender/editors/mesh/editmesh_knife.cc
index a648ee102fc..5357ffaf9c5 100644
--- a/source/blender/editors/mesh/editmesh_knife.cc
+++ b/source/blender/editors/mesh/editmesh_knife.cc
@@ -2058,7 +2058,8 @@ static bool knife_add_single_cut__is_linehit_outside_face(BMFace *f,
   if (lh->v && lh->v->v) {
     BMLoop *l; /* side-of-loop */
     if ((l = BM_face_vert_share_loop(f, lh->v->v)) &&
-        (BM_loop_point_side_of_loop_test(l, co) < 0.0f)) {
+        (BM_loop_point_side_of_loop_test(l, co) < 0.0f))
+    {
       return true;
     }
   }
@@ -3492,7 +3493,8 @@ static KnifeVert *knife_find_closest_vert_of_edge(KnifeTool_OpData *kcd,
      * or we ignore. */
     if ((kcd->is_angle_snapping || kcd->axis_constrained) && (kcd->mode == MODE_DRAGGING)) {
       if (dist_squared_to_line_segment_v2(kfv_sco, kcd->prev.mval, kcd->curr.mval) >
-          KNIFE_FLT_EPSBIG) {
+          KNIFE_FLT_EPSBIG)
+      {
         continue;
       }
     }
diff --git a/source/blender/editors/mesh/editmesh_select_similar.cc b/source/blender/editors/mesh/editmesh_select_similar.cc
index b694ed16336..3eba7dbc186 100644
--- a/source/blender/editors/mesh/editmesh_select_similar.cc
+++ b/source/blender/editors/mesh/editmesh_select_similar.cc
@@ -385,7 +385,8 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
           case SIMFACE_PERIMETER: {
             float perimeter = BM_face_calc_perimeter_with_mat3(face, ob_m3);
             if (ED_select_similar_compare_float_tree(
-                    tree_1d, perimeter, thresh, eSimilarCmp(compare))) {
+                    tree_1d, perimeter, thresh, eSimilarCmp(compare)))
+            {
               select = true;
             }
             break;
@@ -424,7 +425,8 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
           }
           case SIMFACE_SMOOTH:
             if ((BM_elem_flag_test(face, BM_ELEM_SMOOTH) != 0) ==
-                ((face_data_value & SIMFACE_DATA_TRUE) != 0)) {
+                ((face_data_value & SIMFACE_DATA_TRUE) != 0))
+            {
               select = true;
             }
             break;
@@ -829,7 +831,8 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
           case SIMEDGE_LENGTH: {
             float length = edge_length_squared_worldspace_get(ob, edge);
             if (ED_select_similar_compare_float_tree(
-                    tree_1d, length, thresh, eSimilarCmp(compare))) {
+                    tree_1d, length, thresh, eSimilarCmp(compare)))
+            {
               select = true;
             }
             break;
@@ -845,13 +848,15 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
           }
           case SIMEDGE_SEAM:
             if ((BM_elem_flag_test(edge, BM_ELEM_SEAM) != 0) ==
-                ((edge_data_value & SIMEDGE_DATA_TRUE) != 0)) {
+                ((edge_data_value & SIMEDGE_DATA_TRUE) != 0))
+            {
               select = true;
             }
             break;
           case SIMEDGE_SHARP:
             if ((BM_elem_flag_test(edge, BM_ELEM_SMOOTH) != 0) ==
-                ((edge_data_value & SIMEDGE_DATA_TRUE) != 0)) {
+                ((edge_data_value & SIMEDGE_DATA_TRUE) != 0))
+            {
               select = true;
             }
             break;
@@ -882,7 +887,8 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
 
             const float *value = BM_ELEM_CD_GET_FLOAT_P(edge, custom_data_offset);
             if (ED_select_similar_compare_float_tree(
-                    tree_1d, *value, thresh, eSimilarCmp(compare))) {
+                    tree_1d, *value, thresh, eSimilarCmp(compare)))
+            {
               select = true;
             }
             break;
@@ -1238,7 +1244,8 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
             }
             const float *value = BM_ELEM_CD_GET_FLOAT_P(vert, cd_crease_offset);
             if (ED_select_similar_compare_float_tree(
-                    tree_1d, *value, thresh, eSimilarCmp(compare))) {
+                    tree_1d, *value, thresh, eSimilarCmp(compare)))
+            {
               select = true;
             }
             break;
diff --git a/source/blender/editors/mesh/editmesh_tools.cc b/source/blender/editors/mesh/editmesh_tools.cc
index 7a7fe0fa623..d00510dbe67 100644
--- a/source/blender/editors/mesh/editmesh_tools.cc
+++ b/source/blender/editors/mesh/editmesh_tools.cc
@@ -1156,7 +1156,8 @@ static int edbm_mark_sharp_exec(bContext *C, wmOperator *op)
     BM_ITER_MESH (eed, &iter, bm, BM_EDGES_OF_MESH) {
       if (use_verts) {
         if (!(BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) ||
-              BM_elem_flag_test(eed->v2, BM_ELEM_SELECT))) {
+              BM_elem_flag_test(eed->v2, BM_ELEM_SELECT)))
+        {
           continue;
         }
       }
@@ -1862,7 +1863,8 @@ static bool edbm_edge_split_selected_edges(wmOperator *op, Object *obedit, BMEdi
   BM_custom_loop_normals_to_vector_layer(em->bm);
 
   if (!EDBM_op_call_and_selectf(
-          em, op, "edges.out", false, "split_edges edges=%he", BM_ELEM_SELECT)) {
+          em, op, "edges.out", false, "split_edges edges=%he", BM_ELEM_SELECT))
+  {
     return false;
   }
 
@@ -3526,11 +3528,13 @@ static const EnumPropertyItem *merge_type_itemf(bContext *C,
         RNA_enum_items_add_value(&item, &totitem, merge_type_items, MESH_MERGE_LAST);
       }
       else if (em->bm->selected.first &&
-               ((BMEditSelection *)em->bm->selected.first)->htype == BM_VERT) {
+               ((BMEditSelection *)em->bm->selected.first)->htype == BM_VERT)
+      {
         RNA_enum_items_add_value(&item, &totitem, merge_type_items, MESH_MERGE_FIRST);
       }
       else if (em->bm->selected.last &&
-               ((BMEditSelection *)em->bm->selected.last)->htype == BM_VERT) {
+               ((BMEditSelection *)em->bm->selected.last)->htype == BM_VERT)
+      {
         RNA_enum_items_add_value(&item, &totitem, merge_type_items, MESH_MERGE_LAST);
       }
     }
@@ -3721,7 +3725,8 @@ static bool shape_propagate(BMEditMesh *em, bool use_symmetry)
       BMVert *mirr = use_symmetry ? EDBM_verts_mirror_get(em, eve) : nullptr;
 
       if (!mirr || !BM_elem_flag_test(mirr, BM_ELEM_SELECT) ||
-          BM_elem_flag_test(mirr, BM_ELEM_HIDDEN)) {
+          BM_elem_flag_test(mirr, BM_ELEM_HIDDEN))
+      {
         continue;
       }
     }
@@ -5108,7 +5113,8 @@ static bool edbm_fill_grid_prepare(BMesh *bm, int offset, int *span_p, const boo
           MEM_mallocN(sizeof(*ele_sort) * verts_len, __func__));
       LinkData *v_link;
       for (v_link = static_cast(verts->first), i = 0; v_link;
-           v_link = v_link->next, i++) {
+           v_link = v_link->next, i++)
+      {
         BMVert *v = static_cast(v_link->data);
         const float angle = edbm_fill_grid_vert_tag_angle(v);
         ele_sort[i].sort_value = angle;
@@ -7811,7 +7817,8 @@ static int edbm_convex_hull_exec(bContext *C, wmOperator *op)
     /* Delete unused vertices, edges, and faces */
     if (delete_unused) {
       if (!EDBM_op_callf(
-              em, op, "delete geom=%S context=%i", &bmop, "geom_unused.out", DEL_ONLYTAGGED)) {
+              em, op, "delete geom=%S context=%i", &bmop, "geom_unused.out", DEL_ONLYTAGGED))
+      {
         EDBM_op_finish(em, &bmop, op, true);
         continue;
       }
@@ -7820,7 +7827,8 @@ static int edbm_convex_hull_exec(bContext *C, wmOperator *op)
     /* Delete hole edges/faces */
     if (make_holes) {
       if (!EDBM_op_callf(
-              em, op, "delete geom=%S context=%i", &bmop, "geom_holes.out", DEL_ONLYTAGGED)) {
+              em, op, "delete geom=%S context=%i", &bmop, "geom_holes.out", DEL_ONLYTAGGED))
+      {
         EDBM_op_finish(em, &bmop, op, true);
         continue;
       }
@@ -9009,7 +9017,8 @@ static void normals_split(BMesh *bm)
            (!BM_elem_flag_test(l_curr, BM_ELEM_TAG) && BM_loop_check_cyclic_smooth_fan(l_curr))))
       {
         if (!BM_elem_flag_test(l_curr->e, BM_ELEM_TAG) &&
-            !BM_elem_flag_test(l_curr->prev->e, BM_ELEM_TAG)) {
+            !BM_elem_flag_test(l_curr->prev->e, BM_ELEM_TAG))
+        {
           const int loop_index = BM_elem_index_get(l_curr);
           short *clnors = static_cast(BM_ELEM_CD_GET_VOID_P(l_curr, cd_clnors_offset));
           BKE_lnor_space_custom_normal_to_data(
@@ -9238,7 +9247,8 @@ static int edbm_average_normals_exec(bContext *C, wmOperator *op)
              (!BM_elem_flag_test(l_curr, BM_ELEM_TAG) && BM_loop_check_cyclic_smooth_fan(l_curr))))
         {
           if (!BM_elem_flag_test(l_curr->e, BM_ELEM_TAG) &&
-              !BM_elem_flag_test(l_curr->prev->e, BM_ELEM_TAG)) {
+              !BM_elem_flag_test(l_curr->prev->e, BM_ELEM_TAG))
+          {
             const int loop_index = BM_elem_index_get(l_curr);
             short *clnors = static_cast(BM_ELEM_CD_GET_VOID_P(l_curr, cd_clnors_offset));
             BKE_lnor_space_custom_normal_to_data(
@@ -9475,7 +9485,8 @@ static int edbm_normals_tools_exec(bContext *C, wmOperator *op)
         }
 
         if (done_copy ||
-            (bm->totfacesel != 1 && lnors_ed_arr->totloop != 1 && bm->totvertsel != 1)) {
+            (bm->totfacesel != 1 && lnors_ed_arr->totloop != 1 && bm->totvertsel != 1))
+        {
           BKE_report(op->reports,
                      RPT_ERROR,
                      "Can only copy one custom normal, vertex normal or face normal");
@@ -9703,7 +9714,8 @@ static int edbm_set_normals_from_faces_exec(bContext *C, wmOperator *op)
     BM_ITER_MESH (f, &fiter, bm, BM_FACES_OF_MESH) {
       BM_ITER_ELEM (e, &eiter, f, BM_EDGES_OF_FACE) {
         if (!keep_sharp ||
-            (BM_elem_flag_test(e, BM_ELEM_SMOOTH) && BM_elem_flag_test(e, BM_ELEM_SELECT))) {
+            (BM_elem_flag_test(e, BM_ELEM_SMOOTH) && BM_elem_flag_test(e, BM_ELEM_SELECT)))
+        {
           BM_ITER_ELEM (v, &viter, e, BM_VERTS_OF_EDGE) {
             l = BM_face_vert_share_loop(f, v);
             const int l_index = BM_elem_index_get(l);
diff --git a/source/blender/editors/mesh/editmesh_utils.cc b/source/blender/editors/mesh/editmesh_utils.cc
index 3735fb85a5f..e5ce19d3412 100644
--- a/source/blender/editors/mesh/editmesh_utils.cc
+++ b/source/blender/editors/mesh/editmesh_utils.cc
@@ -1942,7 +1942,8 @@ void EDBM_project_snap_verts(
     if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
       float mval[2], co_proj[3];
       if (ED_view3d_project_float_object(region, eve->co, mval, V3D_PROJ_TEST_NOP) ==
-          V3D_PROJ_RET_OK) {
+          V3D_PROJ_RET_OK)
+      {
         SnapObjectParams params{};
         params.snap_target_select = target_op;
         params.edit_mode_type = SNAP_GEOM_FINAL;
diff --git a/source/blender/editors/metaball/mball_edit.cc b/source/blender/editors/metaball/mball_edit.cc
index cb201b01c90..de0ecf8e3ae 100644
--- a/source/blender/editors/metaball/mball_edit.cc
+++ b/source/blender/editors/metaball/mball_edit.cc
@@ -814,7 +814,8 @@ static bool ed_mball_findnearest_metaelem(bContext *C,
         }
 
         if (((select_id & 0xFFFF) == base_index) &&
-            ((select_id & ~MBALLSEL_ANY) >> 16 == ml_index)) {
+            ((select_id & ~MBALLSEL_ANY) >> 16 == ml_index))
+        {
           hit_cycle_offset = a + 1;
           break;
         }
diff --git a/source/blender/editors/object/object_bake_api.cc b/source/blender/editors/object/object_bake_api.cc
index 04a217ff3d6..4625d3993cb 100644
--- a/source/blender/editors/object/object_bake_api.cc
+++ b/source/blender/editors/object/object_bake_api.cc
@@ -687,7 +687,8 @@ static bool bake_objects_check(Main *bmain,
 
     LISTBASE_FOREACH (CollectionPointerLink *, link, selected_objects) {
       if (!bake_object_check(
-              scene, view_layer, static_cast(link->ptr.data), target, reports)) {
+              scene, view_layer, static_cast(link->ptr.data), target, reports))
+      {
         return false;
       }
     }
@@ -1739,7 +1740,8 @@ static int bake(const BakeAPIRender *bkr,
   else {
     /* save the results */
     if (bake_targets_output(
-            bkr, &targets, ob_low, ob_low_eval, me_low_eval, pixel_array_low, reports)) {
+            bkr, &targets, ob_low, ob_low_eval, me_low_eval, pixel_array_low, reports))
+    {
       op_result = OPERATOR_FINISHED;
     }
     else {
diff --git a/source/blender/editors/object/object_constraint.cc b/source/blender/editors/object/object_constraint.cc
index 774342791c8..660f9b3d824 100644
--- a/source/blender/editors/object/object_constraint.cc
+++ b/source/blender/editors/object/object_constraint.cc
@@ -500,7 +500,8 @@ static void test_constraint(
       if (ELEM(con->type,
                CONSTRAINT_TYPE_FOLLOWPATH,
                CONSTRAINT_TYPE_CLAMPTO,
-               CONSTRAINT_TYPE_SPLINEIK)) {
+               CONSTRAINT_TYPE_SPLINEIK))
+      {
         if (ct->tar) {
           /* The object type check is only needed here in case we have a placeholder
            * object assigned (because the library containing the curve is missing).
@@ -2292,7 +2293,8 @@ static bool get_new_constraint_target(
           break;
         }
         if (((!only_curve) || (ob->type == OB_CURVES_LEGACY)) &&
-            ((!only_mesh) || (ob->type == OB_MESH))) {
+            ((!only_mesh) || (ob->type == OB_MESH)))
+        {
           /* set target */
           *tar_ob = ob;
           found = true;
diff --git a/source/blender/editors/object/object_edit.cc b/source/blender/editors/object/object_edit.cc
index 3aeac1ff02f..e7320ba78d8 100644
--- a/source/blender/editors/object/object_edit.cc
+++ b/source/blender/editors/object/object_edit.cc
@@ -1967,7 +1967,8 @@ static int move_to_collection_exec(bContext *C, wmOperator *op)
                               nullptr;
 
   if ((single_object != nullptr) && is_link &&
-      BKE_collection_has_object(collection, single_object)) {
+      BKE_collection_has_object(collection, single_object))
+  {
     BKE_reportf(op->reports,
                 RPT_ERROR,
                 "%s already in %s",
diff --git a/source/blender/editors/object/object_modifier.cc b/source/blender/editors/object/object_modifier.cc
index aa04f82c00b..c1aad69163b 100644
--- a/source/blender/editors/object/object_modifier.cc
+++ b/source/blender/editors/object/object_modifier.cc
@@ -186,7 +186,8 @@ ModifierData *ED_object_modifier_add(
       md = static_cast(ob->modifiers.first);
 
       while (md &&
-             BKE_modifier_get_info((ModifierType)md->type)->type == ModifierTypeType::OnlyDeform) {
+             BKE_modifier_get_info((ModifierType)md->type)->type == ModifierTypeType::OnlyDeform)
+      {
         md = md->next;
       }
 
@@ -775,7 +776,8 @@ static Mesh *create_applied_mesh_for_modifier(Depsgraph *depsgraph,
 
   if (build_shapekey_layers && mesh->key) {
     if (KeyBlock *kb = static_cast(
-            BLI_findlink(&mesh->key->block, ob_eval->shapenr - 1))) {
+            BLI_findlink(&mesh->key->block, ob_eval->shapenr - 1)))
+    {
       BKE_keyblock_convert_to_mesh(
           kb,
           reinterpret_cast(mesh->vert_positions_for_write().data()),
diff --git a/source/blender/editors/object/object_relations.cc b/source/blender/editors/object/object_relations.cc
index bf809fe3a95..69c8e6776c2 100644
--- a/source/blender/editors/object/object_relations.cc
+++ b/source/blender/editors/object/object_relations.cc
@@ -654,7 +654,8 @@ bool ED_object_parent_set(ReportList *reports,
                 ((CurveModifierData *)md)->object = par;
               }
               if (par->runtime->curve_cache &&
-                  par->runtime->curve_cache->anim_path_accum_length == nullptr) {
+                  par->runtime->curve_cache->anim_path_accum_length == nullptr)
+              {
                 DEG_id_tag_update(&par->id, ID_RECALC_GEOMETRY);
               }
             }
@@ -1200,7 +1201,8 @@ static int object_track_clear_exec(bContext *C, wmOperator *op)
       if (ELEM(con->type,
                CONSTRAINT_TYPE_TRACKTO,
                CONSTRAINT_TYPE_LOCKTRACK,
-               CONSTRAINT_TYPE_DAMPTRACK)) {
+               CONSTRAINT_TYPE_DAMPTRACK))
+      {
         BKE_constraint_remove(&ob->constraints, con);
       }
     }
@@ -1557,7 +1559,8 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
 
             /* now add in the collections from the link nodes */
             for (collection_node = ob_collections; collection_node;
-                 collection_node = collection_node->next) {
+                 collection_node = collection_node->next)
+            {
               if (ob_dst->instance_collection != collection_node->link) {
                 BKE_collection_object_add(
                     bmain, static_cast(collection_node->link), ob_dst);
@@ -2158,7 +2161,8 @@ static bool make_local_all__instance_indirect_unused(Main *bmain,
   bool changed = false;
 
   for (ob = static_cast(bmain->objects.first); ob;
-       ob = static_cast(ob->id.next)) {
+       ob = static_cast(ob->id.next))
+  {
     if (ID_IS_LINKED(ob) && (ob->id.us == 0)) {
       Base *base;
 
@@ -2280,7 +2284,8 @@ static int make_local_exec(bContext *C, wmOperator *op)
       }
 
       if (ELEM(mode, MAKE_LOCAL_SELECT_OBDATA, MAKE_LOCAL_SELECT_OBDATA_MATERIAL) &&
-          ob->data != nullptr) {
+          ob->data != nullptr)
+      {
         ID *ob_data = static_cast(ob->data);
         ob_data->tag &= ~LIB_TAG_PRE_EXISTING;
         make_local_animdata_tag(BKE_animdata_from_id(ob_data));
@@ -2514,7 +2519,8 @@ static int make_override_library_exec(bContext *C, wmOperator *op)
         case ID_GR: {
           Collection *collection_root = (Collection *)id_root;
           LISTBASE_FOREACH_MUTABLE (
-              CollectionParent *, collection_parent, &collection_root->runtime.parents) {
+              CollectionParent *, collection_parent, &collection_root->runtime.parents)
+          {
             if (ID_IS_LINKED(collection_parent->collection) ||
                 !BKE_view_layer_has_collection(view_layer, collection_parent->collection))
             {
diff --git a/source/blender/editors/object/object_select.cc b/source/blender/editors/object/object_select.cc
index 4a558f73ddf..1c5f5871d03 100644
--- a/source/blender/editors/object/object_select.cc
+++ b/source/blender/editors/object/object_select.cc
@@ -953,7 +953,8 @@ static bool select_grouped_color(bContext *C, Object *ob)
 
   CTX_DATA_BEGIN (C, Base *, base, selectable_bases) {
     if (((base->flag & BASE_SELECTED) == 0) &&
-        compare_v3v3(base->object->color, ob->color, 0.005f)) {
+        compare_v3v3(base->object->color, ob->color, 0.005f))
+    {
       ED_object_base_select(base, BA_SELECT);
       changed = true;
     }
diff --git a/source/blender/editors/physics/particle_edit.cc b/source/blender/editors/physics/particle_edit.cc
index ead3d77c38e..6d60d69c4f5 100644
--- a/source/blender/editors/physics/particle_edit.cc
+++ b/source/blender/editors/physics/particle_edit.cc
@@ -2896,7 +2896,8 @@ static void rekey_particle_to_time(
 
   /* update edit pointers */
   for (k = 0, key = pa->hair, ekey = edit->points[pa_index].keys; k < pa->totkey;
-       k++, key++, ekey++) {
+       k++, key++, ekey++)
+  {
     ekey->co = key->co;
     ekey->time = &key->time;
   }
diff --git a/source/blender/editors/physics/particle_object.cc b/source/blender/editors/physics/particle_object.cc
index 4e534a9339c..8cf70f52542 100644
--- a/source/blender/editors/physics/particle_object.cc
+++ b/source/blender/editors/physics/particle_object.cc
@@ -1067,7 +1067,8 @@ static void remove_particle_systems_from_object(Object *ob_to)
     if (ELEM(md->type,
              eModifierType_ParticleSystem,
              eModifierType_DynamicPaint,
-             eModifierType_Fluid)) {
+             eModifierType_Fluid))
+    {
       BLI_remlink(&ob_to->modifiers, md);
       BKE_modifier_free(md);
     }
diff --git a/source/blender/editors/render/render_opengl.cc b/source/blender/editors/render/render_opengl.cc
index fbc1ef13dcb..c843aa914af 100644
--- a/source/blender/editors/render/render_opengl.cc
+++ b/source/blender/editors/render/render_opengl.cc
@@ -1169,7 +1169,8 @@ static bool screen_opengl_render_anim_step(bContext *C, wmOperator *op)
 
   if (view_context) {
     if (oglrender->rv3d->persp == RV3D_CAMOB && oglrender->v3d->camera &&
-        oglrender->v3d->scenelock) {
+        oglrender->v3d->scenelock)
+    {
       /* since BKE_scene_graph_update_for_newframe() is used rather
        * then ED_update_for_newframe() the camera needs to be set */
       if (BKE_scene_camera_switch_update(scene)) {
diff --git a/source/blender/editors/render/render_preview.cc b/source/blender/editors/render/render_preview.cc
index 88841f453a0..d76a12f6e1d 100644
--- a/source/blender/editors/render/render_preview.cc
+++ b/source/blender/editors/render/render_preview.cc
@@ -427,7 +427,8 @@ static const char *preview_world_name(const Scene *sce,
    * this approximation.
    */
   if (id_type == ID_MA && pr_method == PR_ICON_RENDER &&
-      !render_engine_supports_ray_visibility(sce)) {
+      !render_engine_supports_ray_visibility(sce))
+  {
     return "WorldFloor";
   }
   return "World";
@@ -1451,7 +1452,8 @@ static void icon_preview_startjob(void *customdata, bool *stop, bool *do_update)
      * only get existing `ibuf`. */
     ibuf = BKE_image_acquire_ibuf(ima, &iuser, nullptr);
     if (ibuf == nullptr ||
-        (ibuf->byte_buffer.data == nullptr && ibuf->float_buffer.data == nullptr)) {
+        (ibuf->byte_buffer.data == nullptr && ibuf->float_buffer.data == nullptr))
+    {
       BKE_image_release_ibuf(ima, ibuf, nullptr);
       return;
     }
diff --git a/source/blender/editors/render/render_update.cc b/source/blender/editors/render/render_update.cc
index dd37d6bccfd..fd8916ec56b 100644
--- a/source/blender/editors/render/render_update.cc
+++ b/source/blender/editors/render/render_update.cc
@@ -286,7 +286,8 @@ static void image_changed(Main *bmain, Image *ima)
 
   /* textures */
   for (tex = static_cast(bmain->textures.first); tex;
-       tex = static_cast(tex->id.next)) {
+       tex = static_cast(tex->id.next))
+  {
     if (tex->type == TEX_IMAGE && tex->ima == ima) {
       texture_changed(bmain, tex);
     }
@@ -299,7 +300,8 @@ static void scene_changed(Main *bmain, Scene *scene)
 
   /* glsl */
   for (ob = static_cast(bmain->objects.first); ob;
-       ob = static_cast(ob->id.next)) {
+       ob = static_cast(ob->id.next))
+  {
     if (ob->mode & OB_MODE_TEXTURE_PAINT) {
       BKE_texpaint_slots_refresh_object(scene, ob);
       ED_paint_proj_mesh_data_check(scene, ob, nullptr, nullptr, nullptr, nullptr);
diff --git a/source/blender/editors/screen/area.cc b/source/blender/editors/screen/area.cc
index c780e30e649..1b48c64d25c 100644
--- a/source/blender/editors/screen/area.cc
+++ b/source/blender/editors/screen/area.cc
@@ -1157,7 +1157,8 @@ static void region_azones_scrollbars_init(ScrArea *area, ARegion *region)
     region_azone_scrollbar_init(area, region, AZ_SCROLL_VERT);
   }
   if ((v2d->scroll & V2D_SCROLL_HORIZONTAL) &&
-      ((v2d->scroll & V2D_SCROLL_HORIZONTAL_HANDLES) == 0)) {
+      ((v2d->scroll & V2D_SCROLL_HORIZONTAL_HANDLES) == 0))
+  {
     region_azone_scrollbar_init(area, region, AZ_SCROLL_HOR);
   }
 }
diff --git a/source/blender/editors/screen/glutil.cc b/source/blender/editors/screen/glutil.cc
index f5fe22b134e..fd06d9144e4 100644
--- a/source/blender/editors/screen/glutil.cc
+++ b/source/blender/editors/screen/glutil.cc
@@ -232,7 +232,8 @@ void immDrawPixelsTexTiled_scaling_clipping(IMMDrawPixelsTexState *state,
 
       if (use_clipping) {
         if (rast_x + right * xzoom * scaleX < clip_min_x ||
-            rast_y + top * yzoom * scaleY < clip_min_y) {
+            rast_y + top * yzoom * scaleY < clip_min_y)
+        {
           continue;
         }
         if (rast_x + left * xzoom > clip_max_x || rast_y + bottom * yzoom > clip_max_y) {
diff --git a/source/blender/editors/screen/screen_edit.cc b/source/blender/editors/screen/screen_edit.cc
index dae1a2fc714..b8900550429 100644
--- a/source/blender/editors/screen/screen_edit.cc
+++ b/source/blender/editors/screen/screen_edit.cc
@@ -224,7 +224,8 @@ void screen_data_copy(bScreen *to, bScreen *from)
 
   ScrVert *s2 = static_cast(to->vertbase.first);
   for (ScrVert *s1 = static_cast(from->vertbase.first); s1;
-       s1 = s1->next, s2 = s2->next) {
+       s1 = s1->next, s2 = s2->next)
+  {
     s1->newv = s2;
   }
 
@@ -1838,7 +1839,8 @@ bool ED_screen_stereo3d_required(const bScreen *screen, const Scene *scene)
          * the file doesn't have views enabled */
         sima = static_cast(area->spacedata.first);
         if (sima->image && BKE_image_is_stereo(sima->image) &&
-            (sima->iuser.flag & IMA_SHOW_STEREO)) {
+            (sima->iuser.flag & IMA_SHOW_STEREO))
+        {
           return true;
         }
         break;
diff --git a/source/blender/editors/screen/screen_ops.cc b/source/blender/editors/screen/screen_ops.cc
index 5730fc22f9d..088599ee7c7 100644
--- a/source/blender/editors/screen/screen_ops.cc
+++ b/source/blender/editors/screen/screen_ops.cc
@@ -4702,7 +4702,7 @@ static void screen_animation_region_tag_redraw(
   ED_region_tag_redraw(region);
 }
 
-//#define PROFILE_AUDIO_SYNCH
+// #define PROFILE_AUDIO_SYNCH
 
 static int screen_animation_step_invoke(bContext *C, wmOperator * /*op*/, const wmEvent *event)
 {
diff --git a/source/blender/editors/screen/screen_user_menu.cc b/source/blender/editors/screen/screen_user_menu.cc
index c639ca153e0..6d09a327cdb 100644
--- a/source/blender/editors/screen/screen_user_menu.cc
+++ b/source/blender/editors/screen/screen_user_menu.cc
@@ -294,7 +294,8 @@ static void screen_user_menu_draw(const bContext *C, Menu *menu)
           PropertyRNA *prop = nullptr;
           PointerRNA prop_ptr = ptr;
           if ((data_path == nullptr) ||
-              RNA_path_resolve_full(&ptr, data_path, &prop_ptr, nullptr, nullptr)) {
+              RNA_path_resolve_full(&ptr, data_path, &prop_ptr, nullptr, nullptr))
+          {
             prop = RNA_struct_find_property(&prop_ptr, umi_pr->prop_id);
             if (prop) {
               ok = true;
diff --git a/source/blender/editors/sculpt_paint/paint_hide.cc b/source/blender/editors/sculpt_paint/paint_hide.cc
index 6cd2d7b2d1c..3f267b8181a 100644
--- a/source/blender/editors/sculpt_paint/paint_hide.cc
+++ b/source/blender/editors/sculpt_paint/paint_hide.cc
@@ -157,7 +157,8 @@ void mesh_show_all(Object &object, const Span nodes)
   Mesh &mesh = *static_cast(object.data);
   bke::MutableAttributeAccessor attributes = mesh.attributes_for_write();
   if (const VArray attribute = *attributes.lookup(".hide_vert",
-                                                              bke::AttrDomain::Point)) {
+                                                              bke::AttrDomain::Point))
+  {
     const VArraySpan hide_vert(attribute);
     threading::parallel_for(nodes.index_range(), 1, [&](const IndexRange range) {
       for (PBVHNode *node : nodes.slice(range)) {
@@ -382,7 +383,8 @@ static void partialvis_update_grids(Depsgraph &depsgraph,
               for (const int x : IndexRange(key.grid_size)) {
                 CCGElem *elem = CCG_grid_elem(&key, grid, x, y);
                 if (isect_point_planes_v3(planes, 4, CCG_elem_co(&key, elem)) ==
-                    (area == VisArea::Inside)) {
+                    (area == VisArea::Inside))
+                {
                   hide[y * key.grid_size + x].set(value);
                 }
               }
diff --git a/source/blender/editors/sculpt_paint/paint_image.cc b/source/blender/editors/sculpt_paint/paint_image.cc
index c071ed71e0c..6d409132778 100644
--- a/source/blender/editors/sculpt_paint/paint_image.cc
+++ b/source/blender/editors/sculpt_paint/paint_image.cc
@@ -297,7 +297,8 @@ static bool image_paint_poll_ex(bContext *C, bool check_tool)
 
     if (sima) {
       if (sima->image != nullptr &&
-          (ID_IS_LINKED(sima->image) || ID_IS_OVERRIDE_LIBRARY(sima->image))) {
+          (ID_IS_LINKED(sima->image) || ID_IS_OVERRIDE_LIBRARY(sima->image)))
+      {
         return false;
       }
       if (sima->mode == SI_MODE_PAINT) {
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.cc b/source/blender/editors/sculpt_paint/paint_image_proj.cc
index f55603608db..69044c792f6 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.cc
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.cc
@@ -105,7 +105,7 @@
 
 #include "IMB_colormanagement.h"
 
-//#include "bmesh_tools.hh"
+// #include "bmesh_tools.hh"
 
 #include "paint_intern.hh"
 
@@ -136,15 +136,15 @@ BLI_INLINE uchar f_to_char(const float val)
 #define PROJ_BOUNDBOX_DIV 8
 #define PROJ_BOUNDBOX_SQUARED (PROJ_BOUNDBOX_DIV * PROJ_BOUNDBOX_DIV)
 
-//#define PROJ_DEBUG_PAINT 1
-//#define PROJ_DEBUG_NOSEAMBLEED 1
-//#define PROJ_DEBUG_PRINT_CLIP 1
+// #define PROJ_DEBUG_PAINT 1
+// #define PROJ_DEBUG_NOSEAMBLEED 1
+// #define PROJ_DEBUG_PRINT_CLIP 1
 #define PROJ_DEBUG_WINCLIP 1
 
 #ifndef PROJ_DEBUG_NOSEAMBLEED
 /* projectFaceSeamFlags options */
-//#define PROJ_FACE_IGNORE  (1<<0)  /* When the face is hidden, back-facing or occluded. */
-//#define PROJ_FACE_INIT    (1<<1)  /* When we have initialized the faces data */
+// #define PROJ_FACE_IGNORE  (1<<0)  /* When the face is hidden, back-facing or occluded. */
+// #define PROJ_FACE_INIT    (1<<1)  /* When we have initialized the faces data */
 
 /* If this face has a seam on any of its edges. */
 #  define PROJ_FACE_SEAM0 (1 << 0)
@@ -2032,14 +2032,16 @@ static ProjPixel *project_paint_uvpixel_init(const ProjPaintState *ps,
        * the faces are already initialized in project_paint_delayed_face_init(...) */
       if (ibuf->float_buffer.data) {
         if (!project_paint_PickColor(
-                ps, co, ((ProjPixelClone *)projPixel)->clonepx.f, nullptr, true)) {
+                ps, co, ((ProjPixelClone *)projPixel)->clonepx.f, nullptr, true))
+        {
           /* zero alpha - ignore */
           ((ProjPixelClone *)projPixel)->clonepx.f[3] = 0;
         }
       }
       else {
         if (!project_paint_PickColor(
-                ps, co, nullptr, ((ProjPixelClone *)projPixel)->clonepx.ch, true)) {
+                ps, co, nullptr, ((ProjPixelClone *)projPixel)->clonepx.ch, true))
+        {
           /* zero alpha - ignore */
           ((ProjPixelClone *)projPixel)->clonepx.ch[3] = 0;
         }
@@ -2577,7 +2579,8 @@ static void project_bucket_clip_face(const bool is_ortho,
     flag = inside_bucket_flag & (ISECT_1 | ISECT_2);
     if (flag && flag != (ISECT_1 | ISECT_2)) {
       if (line_rect_clip(
-              bucket_bounds, v1coSS, v2coSS, uv1co, uv2co, bucket_bounds_uv[*tot], is_ortho)) {
+              bucket_bounds, v1coSS, v2coSS, uv1co, uv2co, bucket_bounds_uv[*tot], is_ortho))
+      {
         (*tot)++;
       }
     }
@@ -2590,7 +2593,8 @@ static void project_bucket_clip_face(const bool is_ortho,
     flag = inside_bucket_flag & (ISECT_2 | ISECT_3);
     if (flag && flag != (ISECT_2 | ISECT_3)) {
       if (line_rect_clip(
-              bucket_bounds, v2coSS, v3coSS, uv2co, uv3co, bucket_bounds_uv[*tot], is_ortho)) {
+              bucket_bounds, v2coSS, v3coSS, uv2co, uv3co, bucket_bounds_uv[*tot], is_ortho))
+      {
         (*tot)++;
       }
     }
@@ -2603,7 +2607,8 @@ static void project_bucket_clip_face(const bool is_ortho,
     flag = inside_bucket_flag & (ISECT_3 | ISECT_1);
     if (flag && flag != (ISECT_3 | ISECT_1)) {
       if (line_rect_clip(
-              bucket_bounds, v3coSS, v1coSS, uv3co, uv1co, bucket_bounds_uv[*tot], is_ortho)) {
+              bucket_bounds, v3coSS, v1coSS, uv3co, uv1co, bucket_bounds_uv[*tot], is_ortho))
+      {
         (*tot)++;
       }
     }
@@ -3182,12 +3187,12 @@ static void project_paint_face_init(const ProjPaintState *ps,
               }
             }
           }
-          //#if 0
+          // #if 0
           else if (has_x_isect) {
             /* assuming the face is not a bow-tie - we know we can't intersect again on the X */
             break;
           }
-          //#endif
+          // #endif
         }
 
 #if 0 /* TODO: investigate why this doesn't work sometimes! it should! */
diff --git a/source/blender/editors/sculpt_paint/paint_ops.cc b/source/blender/editors/sculpt_paint/paint_ops.cc
index 8a7da1867e5..9d15d213e66 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.cc
+++ b/source/blender/editors/sculpt_paint/paint_ops.cc
@@ -391,7 +391,8 @@ static int palette_color_add_exec(bContext *C, wmOperator * /*op*/)
              PAINT_MODE_TEXTURE_3D,
              PAINT_MODE_TEXTURE_2D,
              PAINT_MODE_VERTEX,
-             PAINT_MODE_SCULPT)) {
+             PAINT_MODE_SCULPT))
+    {
       copy_v3_v3(color->rgb, BKE_brush_color_get(scene, brush));
       color->value = 0.0;
     }
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.cc b/source/blender/editors/sculpt_paint/paint_stroke.cc
index 1fd84646b6f..5df016edae5 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.cc
+++ b/source/blender/editors/sculpt_paint/paint_stroke.cc
@@ -46,7 +46,7 @@
 #include "paint_intern.hh"
 #include "sculpt_intern.hh"
 
-//#define DEBUG_TIME
+// #define DEBUG_TIME
 
 #ifdef DEBUG_TIME
 #  include "PIL_time_utildefines.h"
@@ -359,7 +359,8 @@ static bool paint_brush_update(bContext *C,
     if (ELEM(brush->mtex.brush_map_mode,
              MTEX_MAP_MODE_VIEW,
              MTEX_MAP_MODE_AREA,
-             MTEX_MAP_MODE_RANDOM)) {
+             MTEX_MAP_MODE_RANDOM))
+    {
       do_random = true;
     }
 
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.cc b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.cc
index db8669dd0c1..5c5a6cc0a2a 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.cc
@@ -187,7 +187,8 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, const wmEvent *even
 
     if (use_vert_sel) {
       if (ED_mesh_pick_vert(
-              C, vc.obact, event->mval, ED_MESH_PICK_DEFAULT_VERT_DIST, true, &index)) {
+              C, vc.obact, event->mval, ED_MESH_PICK_DEFAULT_VERT_DIST, true, &index))
+      {
         v_idx_best = index;
       }
     }
@@ -444,7 +445,8 @@ static bool weight_paint_set(Object *ob, float paintweight)
     for (const int vert : corner_verts.slice(faces[i])) {
       if (!dvert[vert].flag) {
         if ((paint_selmode == SCE_SELECT_VERTEX) &&
-            !(!select_vert.is_empty() && select_vert[vert])) {
+            !(!select_vert.is_empty() && select_vert[vert]))
+        {
           continue;
         }
 
diff --git a/source/blender/editors/sculpt_paint/paint_weight.cc b/source/blender/editors/sculpt_paint/paint_weight.cc
index 003bef145af..4cf7ddb84a2 100644
--- a/source/blender/editors/sculpt_paint/paint_weight.cc
+++ b/source/blender/editors/sculpt_paint/paint_weight.cc
@@ -949,7 +949,8 @@ static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float mo
    * vgroups affect deform bones */
   wpd->lock_flags = BKE_object_defgroup_lock_flags_get(ob, wpd->defbase_tot);
   if (ts->auto_normalize || ts->multipaint || wpd->lock_flags != nullptr ||
-      ts->wpaint_lock_relative) {
+      ts->wpaint_lock_relative)
+  {
     wpd->vgroup_validmap = BKE_object_defgroup_validmap_get(ob, wpd->defbase_tot);
   }
 
@@ -1399,7 +1400,8 @@ static WPaintAverageAccum do_wpaint_brush_calc_average_weight(Object *ob,
     const float angle_cos = (use_normal && vd.no) ? dot_v3v3(sculpt_normal_frontface, vd.no) :
                                                     1.0f;
     if (angle_cos <= 0.0f ||
-        BKE_brush_curve_strength(brush, sqrtf(test.dist), cache->radius) <= 0.0f) {
+        BKE_brush_curve_strength(brush, sqrtf(test.dist), cache->radius) <= 0.0f)
+    {
       continue;
     }
 
diff --git a/source/blender/editors/sculpt_paint/sculpt.cc b/source/blender/editors/sculpt_paint/sculpt.cc
index 3a251a18b42..ec91b0ff46a 100644
--- a/source/blender/editors/sculpt_paint/sculpt.cc
+++ b/source/blender/editors/sculpt_paint/sculpt.cc
@@ -4387,7 +4387,8 @@ static bool sculpt_needs_delta_from_anchored_origin(Brush *brush)
     return true;
   }
   if (brush->sculpt_tool == SCULPT_TOOL_CLOTH &&
-      brush->cloth_deform_type == BRUSH_CLOTH_DEFORM_GRAB) {
+      brush->cloth_deform_type == BRUSH_CLOTH_DEFORM_GRAB)
+  {
     return true;
   }
   return false;
@@ -5855,7 +5856,8 @@ static void do_fake_neighbor_search_task(SculptSession *ss,
     {
       float distance_squared = len_squared_v3v3(vd.co, nearest_vertex_search_co);
       if (distance_squared < nvtd->nearest_vertex_distance_sq &&
-          distance_squared < max_distance_sq) {
+          distance_squared < max_distance_sq)
+      {
         nvtd->nearest_vertex = vd.vertex;
         nvtd->nearest_vertex_distance_sq = distance_squared;
       }
@@ -5957,7 +5959,8 @@ void SCULPT_fake_neighbors_ensure(Sculpt *sd, Object *ob, const float max_dist)
    * recalculated.
    */
   if (ss->fake_neighbors.fake_neighbor_index &&
-      ss->fake_neighbors.current_max_distance == max_dist) {
+      ss->fake_neighbors.current_max_distance == max_dist)
+  {
     return;
   }
 
diff --git a/source/blender/editors/sculpt_paint/sculpt_boundary.cc b/source/blender/editors/sculpt_paint/sculpt_boundary.cc
index 50b8c44a552..84e9684b80f 100644
--- a/source/blender/editors/sculpt_paint/sculpt_boundary.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_boundary.cc
@@ -353,7 +353,8 @@ static void sculpt_boundary_edit_data_init(SculptSession *ss,
       SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN (ss, from_v, ni) {
         const bool is_visible = hide::vert_visible_get(ss, ni.vertex);
         if (!is_visible ||
-            boundary->edit_info[ni.index].propagation_steps_num != BOUNDARY_STEPS_NONE) {
+            boundary->edit_info[ni.index].propagation_steps_num != BOUNDARY_STEPS_NONE)
+        {
           continue;
         }
         boundary->edit_info[ni.index].original_vertex_i =
diff --git a/source/blender/editors/sculpt_paint/sculpt_geodesic.cc b/source/blender/editors/sculpt_paint/sculpt_geodesic.cc
index 940d0eaa65a..27de17ccc53 100644
--- a/source/blender/editors/sculpt_paint/sculpt_geodesic.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_geodesic.cc
@@ -185,9 +185,11 @@ static float *geodesic_mesh_create(Object *ob, GSet *initial_verts, const float
               continue;
             }
             if (sculpt_geodesic_mesh_test_dist_add(
-                    vert_positions, v_other, v1, v2, dists, initial_verts)) {
+                    vert_positions, v_other, v1, v2, dists, initial_verts))
+            {
               for (int edge_map_index = 0; edge_map_index < ss->vemap[v_other].size();
-                   edge_map_index++) {
+                   edge_map_index++)
+              {
                 const int e_other = ss->vemap[v_other][edge_map_index];
                 int ev_other;
                 if (edges[e_other][0] == v_other) {
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.hh b/source/blender/editors/sculpt_paint/sculpt_intern.hh
index 10e2ab6be52..6f262ee5cb9 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.hh
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.hh
@@ -919,7 +919,8 @@ void SCULPT_vertex_neighbors_get(SculptSession *ss,
 #define SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN(ss, v_index, neighbor_iterator) \
   SCULPT_vertex_neighbors_get(ss, v_index, false, &neighbor_iterator); \
   for (neighbor_iterator.i = 0; neighbor_iterator.i < neighbor_iterator.size; \
-       neighbor_iterator.i++) { \
+       neighbor_iterator.i++) \
+  { \
     neighbor_iterator.vertex = neighbor_iterator.neighbors[neighbor_iterator.i]; \
     neighbor_iterator.index = neighbor_iterator.neighbor_indices[neighbor_iterator.i];
 
diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc
index 7de4915bd38..eaa635a80d7 100644
--- a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc
@@ -3,7 +3,7 @@
  * SPDX-License-Identifier: GPL-2.0-or-later */
 
 /* Paint a color made from hash of node pointer. */
-//#define DEBUG_PIXEL_NODES
+// #define DEBUG_PIXEL_NODES
 
 #include "DNA_brush_types.h"
 #include "DNA_image_types.h"
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.cc b/source/blender/editors/sculpt_paint/sculpt_undo.cc
index 3254f48ba2a..493ba042af5 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.cc
@@ -82,7 +82,7 @@
 namespace blender::ed::sculpt_paint::undo {
 
 /* Uncomment to print the undo stack in the console on push/undo/redo. */
-//#define SCULPT_UNDO_DEBUG
+// #define SCULPT_UNDO_DEBUG
 
 /* Implementation of undo system for objects in sculpt mode.
  *
@@ -935,7 +935,8 @@ static void restore_list(bContext *C, Depsgraph *depsgraph, UndoSculpt &usculpt)
     }
     else if (unode->maxgrid && subdiv_ccg != nullptr) {
       if ((subdiv_ccg->grids.size() != unode->maxgrid) ||
-          (subdiv_ccg->grid_size != unode->gridsize)) {
+          (subdiv_ccg->grid_size != unode->gridsize))
+      {
         continue;
       }
 
diff --git a/source/blender/editors/space_action/action_draw.cc b/source/blender/editors/space_action/action_draw.cc
index f5d11117b7f..6645396e780 100644
--- a/source/blender/editors/space_action/action_draw.cc
+++ b/source/blender/editors/space_action/action_draw.cc
@@ -88,7 +88,8 @@ void draw_channel_names(bContext *C, bAnimContext *ac, ARegion *region)
 
       /* check if visible */
       if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) ||
-          IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) {
+          IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax))
+      {
         /* draw all channels using standard channel-drawing API */
         ANIM_channel_draw(ac, ale, ymin, ymax, channel_index);
       }
@@ -106,7 +107,8 @@ void draw_channel_names(bContext *C, bAnimContext *ac, ARegion *region)
 
       /* check if visible */
       if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) ||
-          IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) {
+          IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax))
+      {
         /* draw all channels using standard channel-drawing API */
         rctf channel_rect;
         BLI_rctf_init(&channel_rect, 0, v2d->cur.xmax, ymin, ymax);
@@ -152,7 +154,8 @@ static void draw_channel_action_ranges(ListBase *anim_data, View2D *v2d)
 
     /* check if visible */
     if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) ||
-        IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) {
+        IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax))
+    {
       /* check if anything to show for this channel */
       if (ale->datatype != ALE_NONE) {
         action = ANIM_channel_action_get(ale);
diff --git a/source/blender/editors/space_action/action_select.cc b/source/blender/editors/space_action/action_select.cc
index d59419d319b..7770dedf39b 100644
--- a/source/blender/editors/space_action/action_select.cc
+++ b/source/blender/editors/space_action/action_select.cc
@@ -468,7 +468,8 @@ static void box_select_elem(
       Mask *mask = static_cast(ale->data);
       MaskLayer *masklay;
       for (masklay = static_cast(mask->masklayers.first); masklay;
-           masklay = masklay->next) {
+           masklay = masklay->next)
+      {
         ED_masklayer_frames_select_box(masklay, xmin, xmax, sel_data->selectmode);
       }
       break;
@@ -751,7 +752,8 @@ static void region_select_elem(RegionSelectData *sel_data, bAnimListElem *ale, b
       Mask *mask = static_cast(ale->data);
       MaskLayer *masklay;
       for (masklay = static_cast(mask->masklayers.first); masklay;
-           masklay = masklay->next) {
+           masklay = masklay->next)
+      {
         ED_masklayer_frames_select_region(
             &sel_data->ked, masklay, sel_data->mode, sel_data->selectmode);
       }
diff --git a/source/blender/editors/space_clip/clip_dopesheet_draw.cc b/source/blender/editors/space_clip/clip_dopesheet_draw.cc
index 88ee492ab48..76f1bb2bc80 100644
--- a/source/blender/editors/space_clip/clip_dopesheet_draw.cc
+++ b/source/blender/editors/space_clip/clip_dopesheet_draw.cc
@@ -136,7 +136,8 @@ void clip_draw_dopesheet_main(SpaceClip *sc, ARegion *region, Scene *scene)
 
       /* check if visible */
       if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
-          IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) {
+          IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax))
+      {
         MovieTrackingTrack *track = channel->track;
         int i;
         bool sel = (track->flag & TRACK_DOPE_SEL) != 0;
@@ -226,7 +227,8 @@ void clip_draw_dopesheet_main(SpaceClip *sc, ARegion *region, Scene *scene)
 
         /* check if visible */
         if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
-            IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) {
+            IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax))
+        {
           MovieTrackingTrack *track = channel->track;
           int i;
           bool sel = (track->flag & TRACK_DOPE_SEL) != 0;
@@ -320,7 +322,8 @@ void clip_draw_dopesheet_channels(const bContext *C, ARegion *region)
 
     /* check if visible */
     if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
-        IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) {
+        IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax))
+    {
       MovieTrackingTrack *track = channel->track;
       float color[3];
       track_channel_color(track, nullptr, color);
@@ -349,7 +352,8 @@ void clip_draw_dopesheet_channels(const bContext *C, ARegion *region)
 
     /* check if visible */
     if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
-        IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) {
+        IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax))
+    {
       MovieTrackingTrack *track = channel->track;
       bool sel = (track->flag & TRACK_DOPE_SEL) != 0;
 
@@ -379,7 +383,8 @@ void clip_draw_dopesheet_channels(const bContext *C, ARegion *region)
 
     /* check if visible */
     if (IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
-        IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax)) {
+        IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax))
+    {
       MovieTrackingTrack *track = channel->track;
       const int icon = (track->flag & TRACK_LOCKED) ? ICON_LOCKED : ICON_UNLOCKED;
       PointerRNA ptr = RNA_pointer_create(&clip->id, &RNA_MovieTrackingTrack, track);
diff --git a/source/blender/editors/space_file/file_draw.cc b/source/blender/editors/space_file/file_draw.cc
index 3e83e4fa830..76883ef8ca4 100644
--- a/source/blender/editors/space_file/file_draw.cc
+++ b/source/blender/editors/space_file/file_draw.cc
@@ -377,7 +377,8 @@ static void file_but_enable_drag(uiBut *but,
     }
   }
   else if (sfile->browse_mode == FILE_BROWSE_MODE_ASSETS &&
-           (file->typeflag & FILE_TYPE_ASSET) != 0) {
+           (file->typeflag & FILE_TYPE_ASSET) != 0)
+  {
     const int import_method = ED_fileselect_asset_import_method_get(sfile, file);
     BLI_assert(import_method > -1);
 
diff --git a/source/blender/editors/space_file/filelist.cc b/source/blender/editors/space_file/filelist.cc
index d03896f3732..79947e37768 100644
--- a/source/blender/editors/space_file/filelist.cc
+++ b/source/blender/editors/space_file/filelist.cc
@@ -1640,7 +1640,8 @@ static void filelist_cache_previews_push(FileList *filelist, FileDirEntry *entry
    * some time in heavy files, because otherwise for each missing preview and for each preview
    * reload, we'd reopen the .blend to look for the preview. */
   if ((entry->typeflag & FILE_TYPE_BLENDERLIB) &&
-      (entry->flags & FILE_ENTRY_BLENDERLIB_NO_PREVIEW)) {
+      (entry->flags & FILE_ENTRY_BLENDERLIB_NO_PREVIEW))
+  {
     return;
   }
 
@@ -3747,7 +3748,8 @@ static void filelist_readjob_recursive_dir_add_items(const bool do_lib,
       entry->free_name = true;
 
       if (filelist_readjob_should_recurse_into_entry(
-              max_recursion, is_lib, recursion_level, entry)) {
+              max_recursion, is_lib, recursion_level, entry))
+      {
         /* We have a directory we want to list, add it to todo list!
          * Using #BLI_path_join works but isn't needed as `root` has a trailing slash. */
         BLI_string_join(dir, sizeof(dir), root, entry->relpath);
diff --git a/source/blender/editors/space_file/fsmenu_system.cc b/source/blender/editors/space_file/fsmenu_system.cc
index 0706aaaf5b8..5500dc07c58 100644
--- a/source/blender/editors/space_file/fsmenu_system.cc
+++ b/source/blender/editors/space_file/fsmenu_system.cc
@@ -168,7 +168,8 @@ static void fsmenu_add_windows_quick_access(FSMenu *fsmenu,
 {
   Microsoft::WRL::ComPtr shell;
   if (CoCreateInstance(CLSID_Shell, nullptr, CLSCTX_ALL, IID_PPV_ARGS(shell.GetAddressOf())) !=
-      S_OK) {
+      S_OK)
+  {
     return;
   }
 
@@ -267,7 +268,8 @@ void fsmenu_read_system(FSMenu *fsmenu, int read_bookmarks)
           if (SHGetDesktopFolder(&desktop) == S_OK) {
             PIDLIST_RELATIVE volume;
             if (desktop->ParseDisplayName(nullptr, nullptr, wline, nullptr, &volume, nullptr) ==
-                S_OK) {
+                S_OK)
+            {
               STRRET volume_name;
               volume_name.uType = STRRET_WSTR;
               if (desktop->GetDisplayNameOf(volume, SHGDN_FORADDRESSBAR, &volume_name) == S_OK) {
diff --git a/source/blender/editors/space_graph/graph_draw.cc b/source/blender/editors/space_graph/graph_draw.cc
index 862a8ba71b1..146790a6b6e 100644
--- a/source/blender/editors/space_graph/graph_draw.cc
+++ b/source/blender/editors/space_graph/graph_draw.cc
@@ -309,7 +309,8 @@ static void draw_fcurve_selected_handle_vertices(
      */
     if (!sel_handle_only || BEZT_ISSEL_ANY(bezt)) {
       if ((!prevbezt && (bezt->ipo == BEZT_IPO_BEZ)) ||
-          (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ))) {
+          (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ)))
+      {
         if ((bezt->f1 & SELECT) == sel
             /* && v2d->cur.xmin < bezt->vec[0][0] < v2d->cur.xmax) */)
         {
@@ -482,7 +483,8 @@ static void draw_fcurve_handles(SpaceGraph *sipo, ARegion *region, FCurve *fcu)
       if ((bezt->f2 & SELECT) == sel) {
         /* only draw first handle if previous segment had handles */
         if ((!prevbezt && (bezt->ipo == BEZT_IPO_BEZ)) ||
-            (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ))) {
+            (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ)))
+        {
           UI_GetThemeColor3ubv(basecol + bezt->h1, col);
           col[3] = fcurve_display_alpha(fcu) * 255;
           immAttr4ubv(color, col);
@@ -1252,7 +1254,8 @@ static void draw_fcurve(bAnimContext *ac, SpaceGraph *sipo, ARegion *region, bAn
    *   we must obey this.
    */
   if (!(U.animation_flag & USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS) ||
-      (fcu->flag & FCURVE_SELECTED)) {
+      (fcu->flag & FCURVE_SELECTED))
+  {
     if (!BKE_fcurve_are_keyframes_usable(fcu) && !(fcu->fpt && fcu->totvert)) {
       /* only draw controls if this is the active modifier */
       if ((fcu->flag & FCURVE_ACTIVE) && (fcm)) {
@@ -1553,7 +1556,8 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *region)
 
       /* check if visible */
       if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) ||
-          IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) {
+          IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax))
+      {
         /* draw all channels using standard channel-drawing API */
         ANIM_channel_draw(ac, ale, ymin, ymax, channel_index);
       }
@@ -1574,7 +1578,8 @@ void graph_draw_channel_names(bContext *C, bAnimContext *ac, ARegion *region)
 
       /* check if visible */
       if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) ||
-          IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) {
+          IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax))
+      {
         /* draw all channels using standard channel-drawing API */
         rctf channel_rect;
         BLI_rctf_init(&channel_rect, 0, v2d->cur.xmax - V2D_SCROLL_WIDTH, ymin, ymax);
diff --git a/source/blender/editors/space_graph/graph_edit.cc b/source/blender/editors/space_graph/graph_edit.cc
index a7204c7b686..6966cd3ad4f 100644
--- a/source/blender/editors/space_graph/graph_edit.cc
+++ b/source/blender/editors/space_graph/graph_edit.cc
@@ -2279,7 +2279,8 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
       continue;
     }
     if ((next && closest_fcu_frame < closest_frame) ||
-        (!next && closest_fcu_frame > closest_frame)) {
+        (!next && closest_fcu_frame > closest_frame))
+    {
       closest_frame = closest_fcu_frame;
       found = true;
     }
diff --git a/source/blender/editors/space_graph/graph_select.cc b/source/blender/editors/space_graph/graph_select.cc
index 938f43b0203..c8ec51e750b 100644
--- a/source/blender/editors/space_graph/graph_select.cc
+++ b/source/blender/editors/space_graph/graph_select.cc
@@ -218,7 +218,8 @@ static void get_nearest_fcurve_verts_list(bAnimContext *ac, const int mval[2], L
         if (fcurve_handle_sel_check(sipo, bezt1)) {
           /* first handle only visible if previous segment had handles */
           if ((!prevbezt && (bezt1->ipo == BEZT_IPO_BEZ)) ||
-              (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ))) {
+              (prevbezt && (prevbezt->ipo == BEZT_IPO_BEZ)))
+          {
             nearest_fcurve_vert_store(matches,
                                       v2d,
                                       fcu,
diff --git a/source/blender/editors/space_graph/graph_slider_ops.cc b/source/blender/editors/space_graph/graph_slider_ops.cc
index b9324bd4522..e13bf32d381 100644
--- a/source/blender/editors/space_graph/graph_slider_ops.cc
+++ b/source/blender/editors/space_graph/graph_slider_ops.cc
@@ -267,7 +267,8 @@ static void graph_slider_exit(bContext *C, wmOperator *op)
   ED_slider_destroy(C, gso->slider);
 
   for (link = static_cast(gso->bezt_arr_list.first); link != nullptr;
-       link = link->next) {
+       link = link->next)
+  {
     tBeztCopyData *copy = static_cast(link->data);
     MEM_freeN(copy->bezt);
     MEM_freeN(link->data);
diff --git a/source/blender/editors/space_image/space_image.cc b/source/blender/editors/space_image/space_image.cc
index a25e93056dc..e47a5b1ec2e 100644
--- a/source/blender/editors/space_image/space_image.cc
+++ b/source/blender/editors/space_image/space_image.cc
@@ -1012,7 +1012,8 @@ static void image_id_remap(ScrArea * /*area*/, SpaceLink *slink, const IDRemappe
   SpaceImage *simg = (SpaceImage *)slink;
 
   if (!BKE_id_remapper_has_mapping_for(mappings,
-                                       FILTER_ID_IM | FILTER_ID_GD_LEGACY | FILTER_ID_MSK)) {
+                                       FILTER_ID_IM | FILTER_ID_GD_LEGACY | FILTER_ID_MSK))
+  {
     return;
   }
 
diff --git a/source/blender/editors/space_nla/nla_draw.cc b/source/blender/editors/space_nla/nla_draw.cc
index f3dad2d0f76..8281742077f 100644
--- a/source/blender/editors/space_nla/nla_draw.cc
+++ b/source/blender/editors/space_nla/nla_draw.cc
@@ -810,7 +810,8 @@ void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *region)
 
     /* check if visible */
     if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) ||
-        IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) {
+        IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax))
+    {
       /* data to draw depends on the type of track */
       switch (ale->type) {
         case ANIMTYPE_NLATRACK: {
@@ -947,7 +948,8 @@ void draw_nla_track_list(const bContext *C, bAnimContext *ac, ARegion *region)
 
       /* check if visible */
       if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) ||
-          IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) {
+          IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax))
+      {
         /* draw all tracks using standard channel-drawing API */
         ANIM_channel_draw(ac, ale, ymin, ymax, track_index);
       }
@@ -969,7 +971,8 @@ void draw_nla_track_list(const bContext *C, bAnimContext *ac, ARegion *region)
 
       /* check if visible */
       if (IN_RANGE(ymin, v2d->cur.ymin, v2d->cur.ymax) ||
-          IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax)) {
+          IN_RANGE(ymax, v2d->cur.ymin, v2d->cur.ymax))
+      {
         /* draw all tracks using standard channel-drawing API */
         rctf track_rect;
         BLI_rctf_init(&track_rect, 0, v2d->cur.xmax, ymin, ymax);
diff --git a/source/blender/editors/space_nla/nla_edit.cc b/source/blender/editors/space_nla/nla_edit.cc
index b080d8aef74..b0d718c208c 100644
--- a/source/blender/editors/space_nla/nla_edit.cc
+++ b/source/blender/editors/space_nla/nla_edit.cc
@@ -2164,7 +2164,8 @@ static int nlaedit_apply_scale_exec(bContext *C, wmOperator * /*op*/)
        * (transitions don't have scale) */
       if ((strip->flag & NLASTRIP_FLAG_SELECT) && (strip->type == NLASTRIP_TYPE_CLIP)) {
         if (strip->act == nullptr || ID_IS_OVERRIDE_LIBRARY(strip->act) ||
-            ID_IS_LINKED(strip->act)) {
+            ID_IS_LINKED(strip->act))
+        {
           continue;
         }
         /* if the referenced action is used by other strips,
diff --git a/source/blender/editors/space_nla/nla_select.cc b/source/blender/editors/space_nla/nla_select.cc
index 76141ac0fda..892c9282c31 100644
--- a/source/blender/editors/space_nla/nla_select.cc
+++ b/source/blender/editors/space_nla/nla_select.cc
@@ -241,7 +241,8 @@ static void box_select_nla_strips(bAnimContext *ac, rcti rect, short mode, short
         /* only select strips if they fall within the required ranges (if applicable) */
         LISTBASE_FOREACH (NlaStrip *, strip, &nlt->strips) {
           if ((mode == NLA_BOXSEL_CHANNELS) ||
-              BKE_nlastrip_within_bounds(strip, rectf.xmin, rectf.xmax)) {
+              BKE_nlastrip_within_bounds(strip, rectf.xmin, rectf.xmax))
+          {
             /* set selection */
             ACHANNEL_SET_FLAG(strip, selectmode, NLASTRIP_FLAG_SELECT);
 
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc
index 0080f7b73a2..afc830b4598 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -2620,7 +2620,8 @@ static Vector node_get_extra_info(const bContext &C,
 
   if (snode.overlay.flag & SN_OVERLAY_SHOW_NAMED_ATTRIBUTES) {
     if (std::optional row = node_get_accessed_attributes_row(tree_draw_ctx,
-                                                                               node)) {
+                                                                               node))
+    {
       rows.append(std::move(*row));
     }
   }
diff --git a/source/blender/editors/space_node/node_group.cc b/source/blender/editors/space_node/node_group.cc
index a27645a6c39..f1018f7a46d 100644
--- a/source/blender/editors/space_node/node_group.cc
+++ b/source/blender/editors/space_node/node_group.cc
@@ -415,7 +415,8 @@ static void node_group_ungroup(Main *bmain, bNodeTree *ntree, bNode *gnode)
 
         /* find internal links to this output */
         for (bNodeLink *tlink = glinks_first->next; tlink != glinks_last->next;
-             tlink = tlink->next) {
+             tlink = tlink->next)
+        {
           /* only use active output node */
           if (tlink->tonode->type == NODE_GROUP_OUTPUT && (tlink->tonode->flag & NODE_DO_OUTPUT)) {
             if (STREQ(tlink->tosock->identifier, identifier)) {
@@ -736,7 +737,8 @@ static bool node_group_make_test_selected(bNodeTree &ntree,
   for (bNode *node : nodes_to_group) {
     const char *disabled_hint = nullptr;
     if (node->typeinfo->poll_instance &&
-        !node->typeinfo->poll_instance(node, ngroup, &disabled_hint)) {
+        !node->typeinfo->poll_instance(node, ngroup, &disabled_hint))
+    {
       if (disabled_hint) {
         BKE_reportf(&reports,
                     RPT_WARNING,
diff --git a/source/blender/editors/space_node/node_templates.cc b/source/blender/editors/space_node/node_templates.cc
index a6d6d2ad29f..5f6831c030c 100644
--- a/source/blender/editors/space_node/node_templates.cc
+++ b/source/blender/editors/space_node/node_templates.cc
@@ -259,7 +259,8 @@ static void node_socket_add_replace(const bContext *C,
         }
 
         if (STREQ(sock_prev->identifier, sock_from->identifier) &&
-            sock_prev->type == sock_from->type) {
+            sock_prev->type == sock_from->type)
+        {
           bNodeLink *link = sock_prev->link;
 
           if (link && link->fromnode) {
@@ -922,7 +923,8 @@ static void ui_node_draw_input(uiLayout &layout,
       UI_block_emboss_set(block, UI_EMBOSS_NONE);
 
       if (lnode &&
-          (lnode->inputs.first || (lnode->typeinfo->draw_buttons && lnode->type != NODE_GROUP))) {
+          (lnode->inputs.first || (lnode->typeinfo->draw_buttons && lnode->type != NODE_GROUP)))
+      {
         int icon = (input.flag & SOCK_COLLAPSED) ? ICON_DISCLOSURE_TRI_RIGHT :
                                                    ICON_DISCLOSURE_TRI_DOWN;
         uiItemR(sub, &inputptr, "show_expanded", UI_ITEM_R_ICON_ONLY, "", icon);
diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.cc b/source/blender/editors/space_outliner/outliner_dragdrop.cc
index e075ad17bbb..fe60ae3bafe 100644
--- a/source/blender/editors/space_outliner/outliner_dragdrop.cc
+++ b/source/blender/editors/space_outliner/outliner_dragdrop.cc
@@ -978,7 +978,8 @@ static void datastack_drop_copy(bContext *C, StackDropData *drop_data)
             ob_dst, static_cast(drop_data->drag_directdata));
       }
       else if (drop_data->ob_parent->type != OB_GPENCIL_LEGACY &&
-               ob_dst->type != OB_GPENCIL_LEGACY) {
+               ob_dst->type != OB_GPENCIL_LEGACY)
+      {
         ED_object_modifier_copy_to_object(C,
                                           ob_dst,
                                           drop_data->ob_parent,
@@ -1184,7 +1185,8 @@ static bool collection_drop_init(bContext *C, wmDrag *drag, const int xy[2], Col
 
   /* Currently this should not be allowed, cannot edit items in an override of a Collection. */
   if (ID_IS_OVERRIDE_LIBRARY(to_collection) &&
-      !ELEM(insert_type, TE_INSERT_AFTER, TE_INSERT_BEFORE)) {
+      !ELEM(insert_type, TE_INSERT_AFTER, TE_INSERT_BEFORE))
+  {
     return false;
   }
 
@@ -1511,7 +1513,8 @@ static int outliner_item_drag_drop_invoke(bContext *C, wmOperator * /*op*/, cons
         /* Keep collection hierarchies intact when dragging. */
         bool parent_selected = false;
         for (TreeElement *te_parent = te_selected->parent; te_parent;
-             te_parent = te_parent->parent) {
+             te_parent = te_parent->parent)
+        {
           if (outliner_is_collection_tree_element(te_parent)) {
             if (TREESTORE(te_parent)->flag & TSE_SELECTED) {
               parent_selected = true;
@@ -1532,7 +1535,8 @@ static int outliner_item_drag_drop_invoke(bContext *C, wmOperator * /*op*/, cons
 
       if (te_selected->parent) {
         for (TreeElement *te_parent = te_selected->parent; te_parent;
-             te_parent = te_parent->parent) {
+             te_parent = te_parent->parent)
+        {
           if (outliner_is_collection_tree_element(te_parent)) {
             parent = outliner_collection_from_tree_element(te_parent);
             break;
diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc
index 1ac6cefa798..71e0e0f3595 100644
--- a/source/blender/editors/space_outliner/outliner_draw.cc
+++ b/source/blender/editors/space_outliner/outliner_draw.cc
@@ -1135,7 +1135,8 @@ static void outliner_draw_restrictbuts(uiBlock *block,
 
     if (te->ys + 2 * UI_UNIT_Y >= region->v2d.cur.ymin && te->ys <= region->v2d.cur.ymax) {
       if (tselem->type == TSE_R_LAYER &&
-          ELEM(space_outliner->outlinevis, SO_SCENES, SO_VIEW_LAYER)) {
+          ELEM(space_outliner->outlinevis, SO_SCENES, SO_VIEW_LAYER))
+      {
         if (space_outliner->show_restrict_flags & SO_RESTRICT_RENDER) {
           /* View layer render toggle. */
           ViewLayer *layer = static_cast(te->directdata);
@@ -1659,7 +1660,8 @@ static void outliner_draw_restrictbuts(uiBlock *block,
                               (char *)"indirect_only");
               UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK);
               if (props_active.layer_collection_holdout ||
-                  !props_active.layer_collection_indirect_only) {
+                  !props_active.layer_collection_indirect_only)
+              {
                 UI_but_flag_enable(bt, UI_BUT_INACTIVE);
               }
             }
diff --git a/source/blender/editors/space_outliner/outliner_select.cc b/source/blender/editors/space_outliner/outliner_select.cc
index 9eda64c7c1e..16b2245e916 100644
--- a/source/blender/editors/space_outliner/outliner_select.cc
+++ b/source/blender/editors/space_outliner/outliner_select.cc
@@ -412,7 +412,8 @@ static void tree_element_material_activate(bContext *C,
   /* NOTE: `ob->matbits` can be nullptr when a local object points to a library mesh. */
   BKE_view_layer_synced_ensure(scene, view_layer);
   if (ob == nullptr || ob != BKE_view_layer_active_object_get(view_layer) ||
-      ob->matbits == nullptr) {
+      ob->matbits == nullptr)
+  {
     return; /* just paranoia */
   }
 
@@ -1075,7 +1076,8 @@ static eOLDrawState tree_element_active_material_get(const Scene *scene,
   /* NOTE: `ob->matbits` can be nullptr when a local object points to a library mesh. */
   BKE_view_layer_synced_ensure(scene, view_layer);
   if (ob == nullptr || ob != BKE_view_layer_active_object_get(view_layer) ||
-      ob->matbits == nullptr) {
+      ob->matbits == nullptr)
+  {
     return OL_DRAWSEL_NONE; /* just paranoia */
   }
 
diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc
index b679cebd312..dd163bded9a 100644
--- a/source/blender/editors/space_outliner/outliner_tools.cc
+++ b/source/blender/editors/space_outliner/outliner_tools.cc
@@ -530,7 +530,8 @@ static void outliner_do_libdata_operation(bContext *C,
     TreeStoreElem *tselem = TREESTORE(te);
     if (tselem->flag & TSE_SELECTED) {
       if (((tselem->type == TSE_SOME_ID) && (te->idcode != 0)) ||
-          tselem->type == TSE_LAYER_COLLECTION) {
+          tselem->type == TSE_LAYER_COLLECTION)
+      {
         TreeStoreElem *tsep = te->parent ? TREESTORE(te->parent) : nullptr;
         operation_fn(C, reports, scene, te, tsep, tselem, user_data);
       }
diff --git a/source/blender/editors/space_outliner/outliner_utils.cc b/source/blender/editors/space_outliner/outliner_utils.cc
index 4529122e673..aec0803bacc 100644
--- a/source/blender/editors/space_outliner/outliner_utils.cc
+++ b/source/blender/editors/space_outliner/outliner_utils.cc
@@ -74,7 +74,8 @@ TreeElement *outliner_find_item_at_y(const SpaceOutliner *space_outliner,
       }
 
       if (BLI_listbase_is_empty(&te_iter->subtree) ||
-          !TSELEM_OPEN(TREESTORE(te_iter), space_outliner)) {
+          !TSELEM_OPEN(TREESTORE(te_iter), space_outliner))
+      {
         /* No need for recursion. */
         continue;
       }
diff --git a/source/blender/editors/space_sequencer/sequencer_add.cc b/source/blender/editors/space_sequencer/sequencer_add.cc
index 6e1d27eb80a..991af06f717 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.cc
+++ b/source/blender/editors/space_sequencer/sequencer_add.cc
@@ -293,12 +293,14 @@ static void load_data_init_from_operator(SeqLoadData *load_data, bContext *C, wm
   }
 
   if ((prop = RNA_struct_find_property(op->ptr, "cache")) &&
-      RNA_property_boolean_get(op->ptr, prop)) {
+      RNA_property_boolean_get(op->ptr, prop))
+  {
     load_data->flags |= SEQ_LOAD_SOUND_CACHE;
   }
 
   if ((prop = RNA_struct_find_property(op->ptr, "mono")) &&
-      RNA_property_boolean_get(op->ptr, prop)) {
+      RNA_property_boolean_get(op->ptr, prop))
+  {
     load_data->flags |= SEQ_LOAD_SOUND_MONO;
   }
 
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.cc b/source/blender/editors/space_sequencer/sequencer_edit.cc
index c80b268303e..edd0732380f 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.cc
+++ b/source/blender/editors/space_sequencer/sequencer_edit.cc
@@ -1410,14 +1410,16 @@ static int sequencer_split_exec(bContext *C, wmOperator *op)
       if (use_cursor_position) {
         LISTBASE_FOREACH (Sequence *, seq, SEQ_active_seqbase_get(ed)) {
           if (SEQ_time_right_handle_frame_get(scene, seq) == split_frame &&
-              seq->machine == split_channel) {
+              seq->machine == split_channel)
+          {
             seq_selected = seq->flag & SEQ_ALLSEL;
           }
         }
         if (!seq_selected) {
           LISTBASE_FOREACH (Sequence *, seq, SEQ_active_seqbase_get(ed)) {
             if (SEQ_time_left_handle_frame_get(scene, seq) == split_frame &&
-                seq->machine == split_channel) {
+                seq->machine == split_channel)
+            {
               seq->flag &= ~SEQ_ALLSEL;
             }
           }
@@ -2205,14 +2207,16 @@ static Sequence *find_next_prev_sequence(Scene *scene, Sequence *test, int lr, i
       switch (lr) {
         case SEQ_SIDE_LEFT:
           if (SEQ_time_right_handle_frame_get(scene, seq) <=
-              SEQ_time_left_handle_frame_get(scene, test)) {
+              SEQ_time_left_handle_frame_get(scene, test))
+          {
             dist = SEQ_time_right_handle_frame_get(scene, test) -
                    SEQ_time_left_handle_frame_get(scene, seq);
           }
           break;
         case SEQ_SIDE_RIGHT:
           if (SEQ_time_left_handle_frame_get(scene, seq) >=
-              SEQ_time_right_handle_frame_get(scene, test)) {
+              SEQ_time_right_handle_frame_get(scene, test))
+          {
             dist = SEQ_time_left_handle_frame_get(scene, seq) -
                    SEQ_time_right_handle_frame_get(scene, test);
           }
diff --git a/source/blender/editors/space_sequencer/sequencer_select.cc b/source/blender/editors/space_sequencer/sequencer_select.cc
index d479cff94b0..8de4940fc6c 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.cc
+++ b/source/blender/editors/space_sequencer/sequencer_select.cc
@@ -276,13 +276,15 @@ Sequence *find_neighboring_sequence(Scene *scene, Sequence *test, int lr, int se
       switch (lr) {
         case SEQ_SIDE_LEFT:
           if (SEQ_time_left_handle_frame_get(scene, test) ==
-              SEQ_time_right_handle_frame_get(scene, seq)) {
+              SEQ_time_right_handle_frame_get(scene, seq))
+          {
             return seq;
           }
           break;
         case SEQ_SIDE_RIGHT:
           if (SEQ_time_right_handle_frame_get(scene, test) ==
-              SEQ_time_left_handle_frame_get(scene, seq)) {
+              SEQ_time_left_handle_frame_get(scene, seq))
+          {
             return seq;
           }
           break;
diff --git a/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc b/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc
index 9a427736528..623f285ff37 100644
--- a/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc
+++ b/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc
@@ -777,7 +777,8 @@ static void draw_seq_outline(TimelineDrawContext *timeline_ctx, const StripDrawC
    */
   const eSeqOverlapMode overlap_mode = SEQ_tool_settings_overlap_mode_get(timeline_ctx->scene);
   if ((G.moving & G_TRANSFORM_SEQ) && (seq->flag & SELECT) &&
-      overlap_mode != SEQ_OVERLAP_OVERWRITE) {
+      overlap_mode != SEQ_OVERLAP_OVERWRITE)
+  {
     if (seq->flag & SEQ_OVERLAP) {
       col[0] = 255;
       col[1] = col[2] = 33;
@@ -1624,7 +1625,8 @@ static bool draw_cache_view_iter_fn(void *userdata,
   size_t *vert_count;
 
   if ((cache_type & SEQ_CACHE_STORE_FINAL_OUT) &&
-      (drawdata->cache_flag & SEQ_CACHE_VIEW_FINAL_OUT)) {
+      (drawdata->cache_flag & SEQ_CACHE_VIEW_FINAL_OUT))
+  {
     stripe_bot = UI_view2d_region_to_view_y(v2d, V2D_SCROLL_HANDLE_HEIGHT);
     vbo = drawdata->final_out_vbo;
     vert_count = &drawdata->final_out_vert_count;
diff --git a/source/blender/editors/space_text/text_draw.cc b/source/blender/editors/space_text/text_draw.cc
index 05646e52382..4d03be9187e 100644
--- a/source/blender/editors/space_text/text_draw.cc
+++ b/source/blender/editors/space_text/text_draw.cc
@@ -937,7 +937,8 @@ static void calc_text_rcts(SpaceText *st, ARegion *region, rcti *scroll, rcti *b
     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) {
+          lhlstart <= st->top + st->runtime.viewlines)
+      {
         /* 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);
@@ -1362,7 +1363,8 @@ static void draw_brackets(const SpaceText *st, const TextDrawContext *tdc, ARegi
     while (linep) {
       while (c < linep->len) {
         if (linep->format && linep->format[fc] != FMT_TYPE_STRING &&
-            linep->format[fc] != FMT_TYPE_COMMENT) {
+            linep->format[fc] != FMT_TYPE_COMMENT)
+        {
           b = text_check_bracket(linep->line[c]);
           if (b == find) {
             if (stack == 0) {
@@ -1396,7 +1398,8 @@ static void draw_brackets(const SpaceText *st, const TextDrawContext *tdc, ARegi
     while (linep) {
       while (fc >= 0) {
         if (linep->format && linep->format[fc] != FMT_TYPE_STRING &&
-            linep->format[fc] != FMT_TYPE_COMMENT) {
+            linep->format[fc] != FMT_TYPE_COMMENT)
+        {
           b = text_check_bracket(linep->line[c]);
           if (b == find) {
             if (stack == 0) {
diff --git a/source/blender/editors/space_text/text_ops.cc b/source/blender/editors/space_text/text_ops.cc
index 4c6ce1442e4..d14a20c7836 100644
--- a/source/blender/editors/space_text/text_ops.cc
+++ b/source/blender/editors/space_text/text_ops.cc
@@ -1481,7 +1481,8 @@ static int text_convert_whitespace_exec(bContext *C, wmOperator *op)
           /* a + 0 we already know to be ' ' char... */
           for (j = 1;
                (j < tab_len) && (a + j < text_check_line_len) && (text_check_line[a + j] == ' ');
-               j++) {
+               j++)
+          {
             /* pass */
           }
 
diff --git a/source/blender/editors/space_view3d/view3d_buttons.cc b/source/blender/editors/space_view3d/view3d_buttons.cc
index 6c816e6bd91..3bc0c2e282f 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.cc
+++ b/source/blender/editors/space_view3d/view3d_buttons.cc
@@ -1008,7 +1008,8 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
       /* Vertices */
 
       if (apply_vcos || median->bv_weight || median->v_crease || median->skin[0] ||
-          median->skin[1]) {
+          median->skin[1])
+      {
         if (median->bv_weight) {
           if (!CustomData_has_layer_named(&bm->vdata, CD_PROP_FLOAT, "bevel_weight_vert")) {
             BM_data_layer_add_named(bm, &bm->vdata, CD_PROP_FLOAT, "bevel_weight_vert");
diff --git a/source/blender/editors/space_view3d/view3d_context.cc b/source/blender/editors/space_view3d/view3d_context.cc
index cacaabaf842..06e2d24216d 100644
--- a/source/blender/editors/space_view3d/view3d_context.cc
+++ b/source/blender/editors/space_view3d/view3d_context.cc
@@ -63,7 +63,8 @@ int view3d_context(const bContext *C, const char *member, bContextDataResult *re
       Object *ob = base->object;
       /* if hidden but in edit mode, we still display, can happen with animation */
       if ((base->flag & BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT) != 0 ||
-          (ob->mode != OB_MODE_OBJECT)) {
+          (ob->mode != OB_MODE_OBJECT))
+      {
         CTX_data_id_pointer_set(result, &ob->id);
       }
     }
diff --git a/source/blender/editors/space_view3d/view3d_draw.cc b/source/blender/editors/space_view3d/view3d_draw.cc
index 53a15ef3993..1c9a9c9dbb9 100644
--- a/source/blender/editors/space_view3d/view3d_draw.cc
+++ b/source/blender/editors/space_view3d/view3d_draw.cc
@@ -2227,7 +2227,8 @@ static void validate_object_select_id(Depsgraph *depsgraph,
   }
   /* texture paint mode sampling */
   else if (obact_eval && (obact_eval->mode & OB_MODE_TEXTURE_PAINT) &&
-           (v3d->shading.type > OB_WIRE)) {
+           (v3d->shading.type > OB_WIRE))
+  {
     /* do nothing */
   }
   else if ((obact_eval && (obact_eval->mode & OB_MODE_PARTICLE_EDIT)) && !XRAY_ENABLED(v3d)) {
diff --git a/source/blender/editors/space_view3d/view3d_edit.cc b/source/blender/editors/space_view3d/view3d_edit.cc
index ea5887c5aa6..ded997921ef 100644
--- a/source/blender/editors/space_view3d/view3d_edit.cc
+++ b/source/blender/editors/space_view3d/view3d_edit.cc
@@ -638,7 +638,8 @@ static int background_image_remove_exec(bContext *C, wmOperator *op)
 
   if (bgpic_rem) {
     if (ID_IS_OVERRIDE_LIBRARY(cam) &&
-        (bgpic_rem->flag & CAM_BGIMG_FLAG_OVERRIDE_LIBRARY_LOCAL) == 0) {
+        (bgpic_rem->flag & CAM_BGIMG_FLAG_OVERRIDE_LIBRARY_LOCAL) == 0)
+    {
       BKE_reportf(op->reports,
                   RPT_WARNING,
                   "Cannot remove background image %d from camera '%s', as it is from the linked "
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc b/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc
index c141b2fa14e..55c2884f75b 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc
+++ b/source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc
@@ -135,7 +135,8 @@ static int gizmo_preselect_elem_test_select(bContext *C, wmGizmo *gz, const int
     View3D *v3d = CTX_wm_view3d(C);
     BKE_view_layer_synced_ensure(scene, view_layer);
     if ((gz_ele->bases) == nullptr ||
-        (gz_ele->bases[0] != BKE_view_layer_active_base_get(view_layer))) {
+        (gz_ele->bases[0] != BKE_view_layer_active_base_get(view_layer)))
+    {
       MEM_SAFE_FREE(gz_ele->bases);
       gz_ele->bases = BKE_view_layer_array_from_bases_in_edit_mode(
           scene, view_layer, v3d, &gz_ele->bases_len);
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc b/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc
index dd874b28d45..49f3f66831f 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc
+++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc
@@ -434,7 +434,8 @@ static bool view3d_ruler_item_mousemove(const bContext *C,
 
 #ifdef USE_AXIS_CONSTRAINTS
       if (!(ruler_item->flag & RULERITEM_USE_ANGLE) &&
-          ruler_info->constrain_mode != CONSTRAIN_MODE_OFF) {
+          ruler_info->constrain_mode != CONSTRAIN_MODE_OFF)
+      {
 
         Scene *scene = DEG_get_input_scene(depsgraph);
         ViewLayer *view_layer = DEG_get_input_view_layer(depsgraph);
@@ -1409,7 +1410,8 @@ static int view3d_ruler_remove_invoke(bContext *C, wmOperator *op, const wmEvent
     if (ruler_info->item_active) {
       RulerItem *ruler_item = ruler_info->item_active;
       if ((ruler_item->flag & RULERITEM_USE_ANGLE) &&
-          (ruler_item->flag & RULERITEM_USE_ANGLE_ACTIVE)) {
+          (ruler_item->flag & RULERITEM_USE_ANGLE_ACTIVE))
+      {
         ruler_item->flag &= ~(RULERITEM_USE_ANGLE | RULERITEM_USE_ANGLE_ACTIVE);
       }
       else {
diff --git a/source/blender/editors/space_view3d/view3d_iterators.cc b/source/blender/editors/space_view3d/view3d_iterators.cc
index 74815a64fe0..23a2bcab212 100644
--- a/source/blender/editors/space_view3d/view3d_iterators.cc
+++ b/source/blender/editors/space_view3d/view3d_iterators.cc
@@ -718,7 +718,8 @@ void mball_foreachScreenElem(ViewContext *vc,
   LISTBASE_FOREACH (MetaElem *, ml, mb->editelems) {
     float screen_co[2];
     if (ED_view3d_project_float_object(vc->region, &ml->x, screen_co, clip_flag) ==
-        V3D_PROJ_RET_OK) {
+        V3D_PROJ_RET_OK)
+    {
       func(user_data, ml, screen_co);
     }
   }
diff --git a/source/blender/editors/space_view3d/view3d_navigate_fly.cc b/source/blender/editors/space_view3d/view3d_navigate_fly.cc
index 7fa1123203e..753fa9f48e3 100644
--- a/source/blender/editors/space_view3d/view3d_navigate_fly.cc
+++ b/source/blender/editors/space_view3d/view3d_navigate_fly.cc
@@ -13,9 +13,9 @@
  */
 
 #ifdef WITH_INPUT_NDOF
-//#  define NDOF_FLY_DEBUG
+// #  define NDOF_FLY_DEBUG
 /* NOTE(@ideasman42): is this needed for NDOF? commented so redraw doesn't thrash. */
-//#  define NDOF_FLY_DRAW_TOOMUCH
+// #  define NDOF_FLY_DRAW_TOOMUCH
 #endif /* WITH_INPUT_NDOF */
 
 #include "DNA_object_types.h"
@@ -327,7 +327,8 @@ static bool initFlyInfo(bContext *C, FlyInfo *fly, wmOperator *op, const wmEvent
   }
 
   if (fly->rv3d->persp == RV3D_CAMOB &&
-      !BKE_id_is_editable(CTX_data_main(C), &fly->v3d->camera->id)) {
+      !BKE_id_is_editable(CTX_data_main(C), &fly->v3d->camera->id))
+  {
     BKE_report(op->reports,
                RPT_ERROR,
                "Cannot navigate a camera from an external library or non-editable override");
@@ -1115,10 +1116,9 @@ static int fly_modal(bContext *C, wmOperator *op, const wmEvent *event)
   }
   else
 #endif /* WITH_INPUT_NDOF */
-      if (event->type == TIMER && event->customdata == fly->timer)
-  {
-    flyApply(C, fly, false);
-  }
+    if (event->type == TIMER && event->customdata == fly->timer) {
+      flyApply(C, fly, false);
+    }
 
   do_draw |= fly->redraw;
 
diff --git a/source/blender/editors/space_view3d/view3d_navigate_walk.cc b/source/blender/editors/space_view3d/view3d_navigate_walk.cc
index da9b9e4eef8..e8fc763ed6c 100644
--- a/source/blender/editors/space_view3d/view3d_navigate_walk.cc
+++ b/source/blender/editors/space_view3d/view3d_navigate_walk.cc
@@ -53,9 +53,9 @@
 #include "BLI_strict_flags.h"
 
 #ifdef WITH_INPUT_NDOF
-//#  define NDOF_WALK_DEBUG
+// #  define NDOF_WALK_DEBUG
 /* NOTE(@ideasman42): Is this needed for NDOF? commented so redraw doesn't thrash. */
-//#  define NDOF_WALK_DRAW_TOOMUCH
+// #  define NDOF_WALK_DRAW_TOOMUCH
 #endif
 
 #define USE_TABLET_SUPPORT
@@ -1518,10 +1518,9 @@ static int walk_modal(bContext *C, wmOperator *op, const wmEvent *event)
   }
   else
 #endif /* WITH_INPUT_NDOF */
-      if (event->type == TIMER && event->customdata == walk->timer)
-  {
-    walkApply(C, walk, false);
-  }
+    if (event->type == TIMER && event->customdata == walk->timer) {
+      walkApply(C, walk, false);
+    }
 
   do_draw |= walk->redraw;
 
diff --git a/source/blender/editors/space_view3d/view3d_select.cc b/source/blender/editors/space_view3d/view3d_select.cc
index 8415e8a75cc..44b26181a1a 100644
--- a/source/blender/editors/space_view3d/view3d_select.cc
+++ b/source/blender/editors/space_view3d/view3d_select.cc
@@ -1379,7 +1379,8 @@ static bool view3d_lasso_select(bContext *C,
       changed_multi |= do_lasso_select_paintvert(vc, wm_userdata, mcoords, mcoords_len, sel_op);
     }
     else if (ob &&
-             (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT))) {
+             (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT)))
+    {
       /* pass */
     }
     else if (ob && (ob->mode & OB_MODE_PARTICLE_EDIT)) {
@@ -2751,7 +2752,8 @@ static bool ed_object_select_pick(bContext *C,
         MovieClip *clip = BKE_object_movieclip_get(scene, basact->object, false);
         if (clip != nullptr) {
           if (ed_object_select_pick_camera_track(
-                  C, scene, basact, clip, gpu->buffer, gpu->hits, params)) {
+                  C, scene, basact, clip, gpu->buffer, gpu->hits, params))
+          {
             ED_object_base_select(basact, BA_SELECT);
             /* Don't set `handled` here as the object activation may be necessary. */
             changed_object = true;
@@ -3931,7 +3933,8 @@ static bool do_meta_box_select(ViewContext *vc, const rcti *rect, const eSelectO
 
   int metaelem_id = 0;
   for (ml = static_cast(mb->editelems->first); ml;
-       ml = ml->next, metaelem_id += 0x10000) {
+       ml = ml->next, metaelem_id += 0x10000)
+  {
     bool is_inside_radius = false;
     bool is_inside_stiff = false;
 
@@ -5283,7 +5286,8 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op)
     }
 
     FOREACH_OBJECT_IN_MODE_BEGIN (
-        vc.scene, vc.view_layer, vc.v3d, obact->type, obact->mode, ob_iter) {
+        vc.scene, vc.view_layer, vc.v3d, obact->type, obact->mode, ob_iter)
+    {
       ED_view3d_viewcontext_init_object(&vc, ob_iter);
 
       obact = vc.obact;
diff --git a/source/blender/editors/space_view3d/view3d_utils.cc b/source/blender/editors/space_view3d/view3d_utils.cc
index 17102724dee..8a10d32e452 100644
--- a/source/blender/editors/space_view3d/view3d_utils.cc
+++ b/source/blender/editors/space_view3d/view3d_utils.cc
@@ -1625,7 +1625,8 @@ static bool view3d_camera_to_view_selected_impl(Main *bmain,
     bool is_ortho_camera = false;
 
     if ((camera_ob_eval->type == OB_CAMERA) &&
-        (((Camera *)camera_ob_eval->data)->type == CAM_ORTHO)) {
+        (((Camera *)camera_ob_eval->data)->type == CAM_ORTHO))
+    {
       ((Camera *)camera_ob->data)->ortho_scale = scale;
       is_ortho_camera = true;
     }
diff --git a/source/blender/editors/transform/transform.cc b/source/blender/editors/transform/transform.cc
index f2f40e6cec6..3874ed24de2 100644
--- a/source/blender/editors/transform/transform.cc
+++ b/source/blender/editors/transform/transform.cc
@@ -539,7 +539,8 @@ static void viewRedrawPost(bContext *C, TransInfo *t)
                                          UVCALC_TRANSFORM_CORRECT;
 
     if ((t->data_type == &TransConvertType_Mesh) &&
-        (t->settings->uvcalc_flag & uvcalc_correct_flag)) {
+        (t->settings->uvcalc_flag & uvcalc_correct_flag))
+    {
       WM_event_add_notifier(C, NC_GEOM | ND_DATA, nullptr);
     }
 
diff --git a/source/blender/editors/transform/transform_convert.cc b/source/blender/editors/transform/transform_convert.cc
index 7e59cb272b4..c5b46ba5ea1 100644
--- a/source/blender/editors/transform/transform_convert.cc
+++ b/source/blender/editors/transform/transform_convert.cc
@@ -575,7 +575,8 @@ bool constraints_list_needinv(TransInfo *t, ListBase *list)
           bChildOfConstraint *data = (bChildOfConstraint *)con->data;
 
           if ((data->flag & CHILDOF_LOCX) && (data->flag & CHILDOF_LOCY) &&
-              (data->flag & CHILDOF_LOCZ)) {
+              (data->flag & CHILDOF_LOCZ))
+          {
             return true;
           }
         }
@@ -584,7 +585,8 @@ bool constraints_list_needinv(TransInfo *t, ListBase *list)
           bRotateLikeConstraint *data = (bRotateLikeConstraint *)con->data;
 
           if (ELEM(data->mix_mode, ROTLIKE_MIX_OFFSET, ROTLIKE_MIX_BEFORE) &&
-              ELEM(t->mode, TFM_ROTATION)) {
+              ELEM(t->mode, TFM_ROTATION))
+          {
             return true;
           }
         }
diff --git a/source/blender/editors/transform/transform_convert_action.cc b/source/blender/editors/transform/transform_convert_action.cc
index 87693a0ffb3..c2f390693eb 100644
--- a/source/blender/editors/transform/transform_convert_action.cc
+++ b/source/blender/editors/transform/transform_convert_action.cc
@@ -795,7 +795,8 @@ static void createTransActionData(bContext *C, TransInfo *t)
         if (use_duplicated) {
           /* Also count for duplicated frames. */
           for (const auto [frame_number, frame] :
-               layer->runtime->trans_data_.temp_frames_buffer.items()) {
+               layer->runtime->trans_data_.temp_frames_buffer.items())
+          {
             grease_pencil_closest_selected_frame(frame_number, frame.is_selected());
           }
         }
diff --git a/source/blender/editors/transform/transform_convert_armature.cc b/source/blender/editors/transform/transform_convert_armature.cc
index 4d51932bce1..64264d82018 100644
--- a/source/blender/editors/transform/transform_convert_armature.cc
+++ b/source/blender/editors/transform/transform_convert_armature.cc
@@ -632,7 +632,8 @@ static void createTransPose(bContext * /*C*/, TransInfo *t)
         pchan->bone->flag &= ~BONE_TRANSFORM_MIRROR;
 
         if ((pchan->bone->flag & BONE_TRANSFORM) &&
-            BKE_pose_channel_get_mirrored(ob->pose, pchan->name)) {
+            BKE_pose_channel_get_mirrored(ob->pose, pchan->name))
+        {
           total_mirrored++;
         }
       }
diff --git a/source/blender/editors/transform/transform_convert_curve.cc b/source/blender/editors/transform/transform_convert_curve.cc
index 9676be064d7..096ae8560cb 100644
--- a/source/blender/editors/transform/transform_convert_curve.cc
+++ b/source/blender/editors/transform/transform_convert_curve.cc
@@ -400,7 +400,8 @@ static void createTransCurveVerts(bContext * /*C*/, TransInfo *t)
       /* TODO: in the case of tilt and radius we can also avoid allocating the
        * initTransDataCurveHandles but for now just don't change handle types */
       if ((nu->type == CU_BEZIER) &&
-          ELEM(t->mode, TFM_CURVE_SHRINKFATTEN, TFM_TILT, TFM_DUMMY) == 0) {
+          ELEM(t->mode, TFM_CURVE_SHRINKFATTEN, TFM_TILT, TFM_DUMMY) == 0)
+      {
         /* sets the handles based on their selection,
          * do this after the data is copied to the TransData */
         BKE_nurb_handles_test(nu, handle_mode, use_around_origins_for_handles_test);
diff --git a/source/blender/editors/transform/transform_convert_gpencil_legacy.cc b/source/blender/editors/transform/transform_convert_gpencil_legacy.cc
index 4af1707ab3e..fbdba9124ec 100644
--- a/source/blender/editors/transform/transform_convert_gpencil_legacy.cc
+++ b/source/blender/editors/transform/transform_convert_gpencil_legacy.cc
@@ -609,7 +609,8 @@ static void createTransGPencil_strokes(bContext *C,
                    * This allows get interesting effects also when move
                    * using proportional editing. */
                   if ((gps->flag & GP_STROKE_SELECT) &&
-                      (ts->transform_pivot_point == V3D_AROUND_LOCAL_ORIGINS)) {
+                      (ts->transform_pivot_point == V3D_AROUND_LOCAL_ORIGINS))
+                  {
                     copy_v3_v3(td->center, center);
                   }
                   else {
@@ -642,7 +643,8 @@ static void createTransGPencil_strokes(bContext *C,
 
                   /* Screen-space needs special matrices. */
                   if ((gps->flag & (GP_STROKE_3DSPACE | GP_STROKE_2DSPACE | GP_STROKE_2DIMAGE)) ==
-                      0) {
+                      0)
+                  {
                     /* Screen-space. */
                     td->protectflag = OB_LOCK_LOCZ | OB_LOCK_ROTZ | OB_LOCK_SCALEZ;
                   }
diff --git a/source/blender/editors/transform/transform_convert_node.cc b/source/blender/editors/transform/transform_convert_node.cc
index 4e7656bbfdd..9caf9b04505 100644
--- a/source/blender/editors/transform/transform_convert_node.cc
+++ b/source/blender/editors/transform/transform_convert_node.cc
@@ -155,7 +155,8 @@ static void node_snap_grid_apply(TransInfo *t)
   using namespace blender;
 
   if (!(transform_snap_is_active(t) &&
-        (t->tsnap.mode & (SCE_SNAP_TO_INCREMENT | SCE_SNAP_TO_GRID)))) {
+        (t->tsnap.mode & (SCE_SNAP_TO_INCREMENT | SCE_SNAP_TO_GRID))))
+  {
     return;
   }
 
diff --git a/source/blender/editors/transform/transform_convert_object.cc b/source/blender/editors/transform/transform_convert_object.cc
index 9761d7a3334..0935c311f1f 100644
--- a/source/blender/editors/transform/transform_convert_object.cc
+++ b/source/blender/editors/transform/transform_convert_object.cc
@@ -705,7 +705,8 @@ static void createTransObject(bContext *C, TransInfo *t)
         Base *base_parent = BKE_view_layer_base_find(view_layer, ob->parent);
         if (base_parent) {
           if (BASE_XFORM_INDIRECT(base_parent) ||
-              BLI_gset_haskey(objects_in_transdata, ob->parent)) {
+              BLI_gset_haskey(objects_in_transdata, ob->parent))
+          {
             ED_object_xform_skip_child_container_item_ensure(
                 tdo->xcs, ob, nullptr, XFORM_OB_SKIP_CHILD_PARENT_IS_XFORM);
             base->flag_legacy |= BA_TRANSFORM_LOCKED_IN_PLACE;
diff --git a/source/blender/editors/transform/transform_mode_translate.cc b/source/blender/editors/transform/transform_mode_translate.cc
index b18e04805b0..2316c33fb33 100644
--- a/source/blender/editors/transform/transform_mode_translate.cc
+++ b/source/blender/editors/transform/transform_mode_translate.cc
@@ -459,7 +459,8 @@ static void ApplySnapTranslation(TransInfo *t, float vec[3])
     if (t->spacetype == SPACE_VIEW3D) {
       if (t->options & CTX_PAINT_CURVE) {
         if (ED_view3d_project_float_global(t->region, point, point, V3D_PROJ_TEST_NOP) !=
-            V3D_PROJ_RET_OK) {
+            V3D_PROJ_RET_OK)
+        {
           zero_v3(point); /* no good answer here... */
         }
       }
diff --git a/source/blender/editors/transform/transform_ops.cc b/source/blender/editors/transform/transform_ops.cc
index a9ddc2ed4bf..84f48eeec2b 100644
--- a/source/blender/editors/transform/transform_ops.cc
+++ b/source/blender/editors/transform/transform_ops.cc
@@ -568,7 +568,8 @@ static bool transform_poll_property(const bContext *C, wmOperator *op, const Pro
         /* Special case: show constraint axis if we don't have values,
          * needed for mirror operator. */
         if (STREQ(prop_id, "constraint_axis") &&
-            (RNA_struct_find_property(op->ptr, "value") == nullptr)) {
+            (RNA_struct_find_property(op->ptr, "value") == nullptr))
+        {
           return true;
         }
 
diff --git a/source/blender/editors/transform/transform_orientations.cc b/source/blender/editors/transform/transform_orientations.cc
index fbdc257dff9..f25474205a6 100644
--- a/source/blender/editors/transform/transform_orientations.cc
+++ b/source/blender/editors/transform/transform_orientations.cc
@@ -1094,7 +1094,8 @@ int getTransformOrientation_ex(const Scene *scene,
               }
               else {
                 if (BM_edge_calc_length_squared(e_pair[0]) <
-                    BM_edge_calc_length_squared(e_pair[1])) {
+                    BM_edge_calc_length_squared(e_pair[1]))
+                {
                   v_pair_swap = true;
                 }
               }
diff --git a/source/blender/editors/transform/transform_snap.cc b/source/blender/editors/transform/transform_snap.cc
index 01464b3a933..fd64b11cd43 100644
--- a/source/blender/editors/transform/transform_snap.cc
+++ b/source/blender/editors/transform/transform_snap.cc
@@ -396,7 +396,8 @@ static bool applyFaceProject(TransInfo *t, TransDataContainer *tc, TransData *td
   }
 
   if (ED_view3d_project_float_global(t->region, iloc, mval_fl, V3D_PROJ_TEST_NOP) !=
-      V3D_PROJ_RET_OK) {
+      V3D_PROJ_RET_OK)
+  {
     return false;
   }
 
@@ -836,7 +837,8 @@ void initSnapping(TransInfo *t, wmOperator *op)
   /* if snap property exists */
   PropertyRNA *prop;
   if (op && (prop = RNA_struct_find_property(op->ptr, "snap")) &&
-      RNA_property_is_set(op->ptr, prop)) {
+      RNA_property_is_set(op->ptr, prop))
+  {
     if (RNA_property_boolean_get(op->ptr, prop)) {
       t->modifiers |= MOD_SNAP;
 
@@ -856,7 +858,8 @@ void initSnapping(TransInfo *t, wmOperator *op)
       }
 
       if ((prop = RNA_struct_find_property(op->ptr, "snap_point")) &&
-          RNA_property_is_set(op->ptr, prop)) {
+          RNA_property_is_set(op->ptr, prop))
+      {
         RNA_property_float_get_array(op->ptr, prop, t->tsnap.snap_target);
         t->modifiers |= MOD_SNAP_FORCED;
         t->tsnap.status |= SNAP_TARGET_FOUND;
@@ -864,7 +867,8 @@ void initSnapping(TransInfo *t, wmOperator *op)
 
       /* snap align only defined in specific cases */
       if ((prop = RNA_struct_find_property(op->ptr, "snap_align")) &&
-          RNA_property_is_set(op->ptr, prop)) {
+          RNA_property_is_set(op->ptr, prop))
+      {
         SET_FLAG_FROM_TEST(
             t->tsnap.flag, RNA_property_boolean_get(op->ptr, prop), SCE_SNAP_ROTATE);
 
@@ -1373,7 +1377,8 @@ static void snap_source_closest_fn(TransInfo *t)
               dist = t->mode_info->snap_distance_fn(t, loc, t->tsnap.snap_target);
 
               if ((dist != TRANSFORM_DIST_INVALID) &&
-                  (closest == nullptr || fabsf(dist) < fabsf(dist_closest))) {
+                  (closest == nullptr || fabsf(dist) < fabsf(dist_closest)))
+              {
                 copy_v3_v3(t->tsnap.snap_source, loc);
                 closest = td;
                 dist_closest = dist;
@@ -1390,7 +1395,8 @@ static void snap_source_closest_fn(TransInfo *t)
             dist = t->mode_info->snap_distance_fn(t, loc, t->tsnap.snap_target);
 
             if ((dist != TRANSFORM_DIST_INVALID) &&
-                (closest == nullptr || fabsf(dist) < fabsf(dist_closest))) {
+                (closest == nullptr || fabsf(dist) < fabsf(dist_closest)))
+            {
               copy_v3_v3(t->tsnap.snap_source, loc);
               closest = td;
             }
@@ -1415,7 +1421,8 @@ static void snap_source_closest_fn(TransInfo *t)
           dist = t->mode_info->snap_distance_fn(t, loc, t->tsnap.snap_target);
 
           if ((dist != TRANSFORM_DIST_INVALID) &&
-              (closest == nullptr || fabsf(dist) < fabsf(dist_closest))) {
+              (closest == nullptr || fabsf(dist) < fabsf(dist_closest)))
+          {
             copy_v3_v3(t->tsnap.snap_source, loc);
             closest = td;
             dist_closest = dist;
diff --git a/source/blender/editors/transform/transform_snap_object.cc b/source/blender/editors/transform/transform_snap_object.cc
index 6844f228750..1e663807ebd 100644
--- a/source/blender/editors/transform/transform_snap_object.cc
+++ b/source/blender/editors/transform/transform_snap_object.cc
@@ -497,7 +497,8 @@ static eSnapMode iter_snap_objects(SnapObjectContext *sctx, IterSnapObjsCallback
     const bool is_object_active = (base == base_act);
     Object *obj_eval = DEG_get_evaluated_object(sctx->runtime.depsgraph, base->object);
     if (obj_eval->transflag & OB_DUPLI ||
-        blender::bke::object_has_geometry_set_instances(*obj_eval)) {
+        blender::bke::object_has_geometry_set_instances(*obj_eval))
+    {
       ListBase *lb = object_duplilist(sctx->runtime.depsgraph, sctx->scene, obj_eval);
       LISTBASE_FOREACH (DupliObject *, dupli_ob, lb) {
         BLI_assert(DEG_is_evaluated_object(dupli_ob->ob));
diff --git a/source/blender/editors/transform/transform_snap_object_mesh.cc b/source/blender/editors/transform/transform_snap_object_mesh.cc
index 8e6cad9b8f2..f5d7e59d98d 100644
--- a/source/blender/editors/transform/transform_snap_object_mesh.cc
+++ b/source/blender/editors/transform/transform_snap_object_mesh.cc
@@ -207,7 +207,8 @@ static bool nearest_world_mesh(SnapObjectContext *sctx,
   BVHTreeNearest nearest{};
   nearest.dist_sq = sctx->ret.dist_nearest_sq;
   if (nearest_world_tree(
-          sctx, treedata.tree, treedata.nearest_callback, obmat, &treedata, &nearest)) {
+          sctx, treedata.tree, treedata.nearest_callback, obmat, &treedata, &nearest))
+  {
     SnapData::register_result(sctx, ob_eval, &me_eval->id, obmat, &nearest);
     return true;
   }
diff --git a/source/blender/editors/undo/ed_undo.cc b/source/blender/editors/undo/ed_undo.cc
index 2b760d9b89c..5006ef7d4ef 100644
--- a/source/blender/editors/undo/ed_undo.cc
+++ b/source/blender/editors/undo/ed_undo.cc
@@ -462,7 +462,8 @@ bool ED_undo_is_legacy_compatible_for_property(bContext *C, ID *id)
       }
       if (obact->mode & OB_MODE_EDIT) {
         if ((id == nullptr) || (obact->data == nullptr) ||
-            (GS(id->name) != GS(((ID *)obact->data)->name))) {
+            (GS(id->name) != GS(((ID *)obact->data)->name)))
+        {
           /* No undo push on id type mismatch in edit-mode. */
           CLOG_INFO(&LOG, 1, "skipping undo for edit-mode");
           return false;
diff --git a/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc b/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc
index 93f6bb35152..a2227a7c73d 100644
--- a/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc
+++ b/source/blender/editors/uvedit/uvedit_clipboard_graph_iso.cc
@@ -346,7 +346,8 @@ static void maximum_common_subgraph_internal(int incumbent[][2],
     }
     bd = &domains[bd_pos - 1][L];
     if (calc_bound(domains, bd_pos, bd[P]) + bd[P] <= *inc_pos ||
-        (bd[LL] == 0 && bd[RL] == bd[IRL])) {
+        (bd[LL] == 0 && bd[RL] == bd[IRL]))
+    {
       bd_pos--;
     }
     else {
diff --git a/source/blender/editors/uvedit/uvedit_rip.cc b/source/blender/editors/uvedit/uvedit_rip.cc
index 200cd52fe74..ba686a577a9 100644
--- a/source/blender/editors/uvedit/uvedit_rip.cc
+++ b/source/blender/editors/uvedit/uvedit_rip.cc
@@ -641,7 +641,8 @@ static UVRipPairs *uv_rip_pairs_from_loop(BMLoop *l_init,
         do {
           /* Not a boundary and visible. */
           if (!UL(l_radial_iter)->is_select_edge &&
-              BM_elem_flag_test(l_radial_iter->f, BM_ELEM_TAG)) {
+              BM_elem_flag_test(l_radial_iter->f, BM_ELEM_TAG))
+          {
             BMLoop *l_other = (l_radial_iter->v == l_step->v) ? l_radial_iter :
                                                                 l_radial_iter->next;
             BLI_assert(l_other->v == l_step->v);
diff --git a/source/blender/editors/uvedit/uvedit_select.cc b/source/blender/editors/uvedit/uvedit_select.cc
index 94af21b03a0..fae17734c22 100644
--- a/source/blender/editors/uvedit/uvedit_select.cc
+++ b/source/blender/editors/uvedit/uvedit_select.cc
@@ -3162,11 +3162,13 @@ static int uv_select_split_exec(bContext *C, wmOperator *op)
       BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
 
         if (BM_ELEM_CD_GET_BOOL(l, offsets.select_vert) ||
-            BM_ELEM_CD_GET_BOOL(l, offsets.select_edge)) {
+            BM_ELEM_CD_GET_BOOL(l, offsets.select_edge))
+        {
           is_sel = true;
         }
         if (!BM_ELEM_CD_GET_BOOL(l, offsets.select_vert) ||
-            !BM_ELEM_CD_GET_BOOL(l, offsets.select_edge)) {
+            !BM_ELEM_CD_GET_BOOL(l, offsets.select_edge))
+        {
           is_unsel = true;
         }
 
@@ -3314,7 +3316,8 @@ static void uv_select_flush_from_tag_face(const Scene *scene, Object *obedit, co
   const BMUVOffsets offsets = BM_uv_map_get_offsets(em->bm);
 
   if ((ts->uv_flag & UV_SYNC_SELECTION) == 0 &&
-      ELEM(ts->uv_sticky, SI_STICKY_VERTEX, SI_STICKY_LOC)) {
+      ELEM(ts->uv_sticky, SI_STICKY_VERTEX, SI_STICKY_LOC))
+  {
 
     uint efa_index;
 
@@ -3457,7 +3460,8 @@ static void uv_select_flush_from_loop_edge_flag(const Scene *scene, BMEditMesh *
   const BMUVOffsets offsets = BM_uv_map_get_offsets(em->bm);
 
   if ((ts->uv_flag & UV_SYNC_SELECTION) == 0 &&
-      ELEM(ts->uv_sticky, SI_STICKY_LOC, SI_STICKY_VERTEX)) {
+      ELEM(ts->uv_sticky, SI_STICKY_LOC, SI_STICKY_VERTEX))
+  {
     /* Use UV edge selection to identify which verts must to be selected */
     uint efa_index;
     /* Clear UV vert flags */
@@ -4077,7 +4081,8 @@ static bool do_lasso_select_mesh_uv(bContext *C,
           BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
             float *luv = BM_ELEM_CD_GET_FLOAT_P(l, offsets.uv);
             if (do_lasso_select_mesh_uv_is_edge_inside(
-                    region, &rect, mcoords, mcoords_len, luv, luv_prev)) {
+                    region, &rect, mcoords, mcoords_len, luv, luv_prev))
+            {
               uvedit_edge_select_set_with_sticky(scene, em, l_prev, select, false, offsets);
               changed = true;
             }
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.cc b/source/blender/editors/uvedit/uvedit_smart_stitch.cc
index 28b16e103b3..0a0772c3514 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.cc
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.cc
@@ -830,7 +830,8 @@ static void stitch_validate_uv_stitchability(const int cd_loop_uv_offset,
       }
       if (stitch_check_uvs_state_stitchable(cd_loop_uv_offset, element, element_iter, ssc)) {
         if ((element_iter->island == ssc->static_island) ||
-            (element->island == ssc->static_island)) {
+            (element->island == ssc->static_island))
+        {
           element->flag |= STITCH_STITCHABLE;
           preview->num_stitchable++;
           stitch_setup_face_preview_for_uv_group(
@@ -931,7 +932,8 @@ static void stitch_propagate_uv_final_position(Scene *scene,
 
       /* end of calculations, keep only the selection flag */
       if ((!ssc->snap_islands) ||
-          ((!ssc->midpoints) && (element_iter->island == ssc->static_island))) {
+          ((!ssc->midpoints) && (element_iter->island == ssc->static_island)))
+      {
         element_iter->flag &= STITCH_SELECTED;
       }
 
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.cc b/source/blender/editors/uvedit/uvedit_unwrap_ops.cc
index a2b3046e2dc..20665109e13 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.cc
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.cc
@@ -2675,7 +2675,8 @@ static int smart_uv_project_thickface_area_cmp_fn(const void *tf_a_p, const void
   /* Ignore the area of small faces.
    * Also, order checks so `!isfinite(...)` values are counted as zero area. */
   if (!((tf_a->area > smart_uv_project_area_ignore) ||
-        (tf_b->area > smart_uv_project_area_ignore))) {
+        (tf_b->area > smart_uv_project_area_ignore)))
+  {
     return 0;
   }
 
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
index e156437f98a..7b71d720e98 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
@@ -84,7 +84,8 @@ NodeGroup *BlenderFileLoader::Load()
     }
 
     if ((ob->base_flag & (BASE_HOLDOUT | BASE_INDIRECT_ONLY)) ||
-        (ob->visibility_flag & OB_HOLDOUT)) {
+        (ob->visibility_flag & OB_HOLDOUT))
+    {
       continue;
     }
 
diff --git a/source/blender/freestyle/intern/geometry/Grid.cpp b/source/blender/freestyle/intern/geometry/Grid.cpp
index cac8553005e..d7f7a091c15 100644
--- a/source/blender/freestyle/intern/geometry/Grid.cpp
+++ b/source/blender/freestyle/intern/geometry/Grid.cpp
@@ -58,17 +58,17 @@ void firstIntersectionGridVisitor::examineOccluder(Polygon3r *occ)
 #else
         if (tmp_t < t_) {
 #endif
-        occluder_ = occ;
-        u_ = tmp_u;
-        v_ = tmp_v;
-        t_ = tmp_t;
+          occluder_ = occ;
+          u_ = tmp_u;
+          v_ = tmp_v;
+          t_ = tmp_t;
+        }
+      }
+      else {
+        occ->userdata2 = nullptr;
       }
     }
-    else {
-      occ->userdata2 = nullptr;
-    }
   }
-}
 }  // namespace Freestyle
 
 bool firstIntersectionGridVisitor::stop()
diff --git a/source/blender/freestyle/intern/geometry/Noise.cpp b/source/blender/freestyle/intern/geometry/Noise.cpp
index 6a4683bb7fa..1d5f56ac5d0 100644
--- a/source/blender/freestyle/intern/geometry/Noise.cpp
+++ b/source/blender/freestyle/intern/geometry/Noise.cpp
@@ -26,8 +26,9 @@ namespace Freestyle {
 #  define REALSCALE (2.0 / 65536.0)
 #  define NREALSCALE (2.0 / 4096.0)
 
-#  define HASH3D(a, b, c) hashTable[hashTable[hashTable[(a)&0xfff] ^ ((b)&0xfff)] ^ ((c)&0xfff)]
-#  define HASH(a, b, c) (xtab[(xtab[(xtab[(a)&0xff] ^ (b)) & 0xff] ^ (c)) & 0xff] & 0xff)
+#  define HASH3D(a, b, c) \
+    hashTable[hashTable[hashTable[(a) & 0xfff] ^ ((b) & 0xfff)] ^ ((c) & 0xfff)]
+#  define HASH(a, b, c) (xtab[(xtab[(xtab[(a) & 0xff] ^ (b)) & 0xff] ^ (c)) & 0xff] & 0xff)
 #  define INCRSUM(m, s, x, y, z) \
     ((s) * (RTable[m] * 0.5 + RTable[m + 1] * (x) + RTable[m + 2] * (y) + RTable[m + 3] * (z)))
 
@@ -148,7 +149,7 @@ float Noise::smoothNoise2(Vec2f &vec)
   sx = SCURVE(rx0);
   sy = SCURVE(ry0);
 
-#define AT2(rx, ry) ((rx)*q[0] + (ry)*q[1])
+#define AT2(rx, ry) ((rx) * q[0] + (ry) * q[1])
 
   q = g2[b00];
   u = AT2(rx0, ry0);
@@ -189,7 +190,7 @@ float Noise::smoothNoise3(Vec3f &vec)
   sy = SCURVE(ry0);
   sz = SCURVE(rz0);
 
-#define AT3(rx, ry, rz) ((rx)*q[0] + (ry)*q[1] + (rz)*q[2])
+#define AT3(rx, ry, rz) ((rx) * q[0] + (ry) * q[1] + (rz) * q[2])
 
   q = g3[b00 + bz0];
   u = AT3(rx0, ry0, rz0);
diff --git a/source/blender/freestyle/intern/geometry/VecMat.h b/source/blender/freestyle/intern/geometry/VecMat.h
index bb7f104b11a..ba5ad84a156 100644
--- a/source/blender/freestyle/intern/geometry/VecMat.h
+++ b/source/blender/freestyle/intern/geometry/VecMat.h
@@ -22,8 +22,7 @@ namespace Freestyle {
 namespace VecMat {
 
 namespace Internal {
-template struct is_false {
-};
+template struct is_false {};
 
 template<> struct is_false {
   static inline void ensure() {}
diff --git a/source/blender/freestyle/intern/image/ImagePyramid.cpp b/source/blender/freestyle/intern/image/ImagePyramid.cpp
index 7933dbff37f..079c8df1f79 100644
--- a/source/blender/freestyle/intern/image/ImagePyramid.cpp
+++ b/source/blender/freestyle/intern/image/ImagePyramid.cpp
@@ -30,7 +30,8 @@ ImagePyramid::ImagePyramid(const ImagePyramid & /*iBrother*/)
 {
   if (!_levels.empty()) {
     for (vector::iterator im = _levels.begin(), imend = _levels.end(); im != imend;
-         ++im) {
+         ++im)
+    {
       _levels.push_back(new GrayImage(**im));
     }
   }
@@ -40,7 +41,8 @@ ImagePyramid::~ImagePyramid()
 {
   if (!_levels.empty()) {
     for (vector::iterator im = _levels.begin(), imend = _levels.end(); im != imend;
-         ++im) {
+         ++im)
+    {
       delete (*im);
     }
     _levels.clear();
diff --git a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
index 783d5345aef..60e19313db9 100644
--- a/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
+++ b/source/blender/freestyle/intern/python/BPy_FrsMaterial.cpp
@@ -80,7 +80,8 @@ static int FrsMaterial_init(BPy_FrsMaterial *self, PyObject *args, PyObject *kwd
   int priority;
 
   if (PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist_1, &FrsMaterial_Type, &brother)) {
+          args, kwds, "|O!", (char **)kwlist_1, &FrsMaterial_Type, &brother))
+  {
     if (!brother) {
       self->m = new FrsMaterial();
     }
diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp
index b017b4cfac4..41f9354dc91 100644
--- a/source/blender/freestyle/intern/python/BPy_Operators.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp
@@ -74,7 +74,8 @@ static PyObject *Operators_select(BPy_Operators * /*self*/, PyObject *args, PyOb
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "O!", (char **)kwlist, &UnaryPredicate1D_Type, &obj)) {
+          args, kwds, "O!", (char **)kwlist, &UnaryPredicate1D_Type, &obj))
+  {
     return nullptr;
   }
   if (!((BPy_UnaryPredicate1D *)obj)->up1D) {
@@ -484,7 +485,8 @@ static PyObject *Operators_sort(BPy_Operators * /*self*/, PyObject *args, PyObje
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "O!", (char **)kwlist, &BinaryPredicate1D_Type, &obj)) {
+          args, kwds, "O!", (char **)kwlist, &BinaryPredicate1D_Type, &obj))
+  {
     return nullptr;
   }
   if (!((BPy_BinaryPredicate1D *)obj)->bp1D) {
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
index fec45267fd6..521ee70805e 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
@@ -144,7 +144,8 @@ static PyObject *Stroke_resample(BPy_Stroke *self, PyObject *args, PyObject *kwd
     }
   }
   else if ((void)PyErr_Clear(),
-           PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist_2, &f)) {
+           PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist_2, &f))
+  {
     if (self->s->Resample(f) < 0) {
       PyErr_SetString(PyExc_RuntimeError, "Stroke resampling (by vertex interval) failed");
       return nullptr;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp
index 2113cf3bd3a..772afa61e1c 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DDouble.cpp
@@ -166,7 +166,8 @@ static int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble *self,
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
 
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp
index de60876626e..045f13b6ad2 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DEdgeNature.cpp
@@ -71,7 +71,8 @@ static int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature *sel
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
 
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp
index f4bc322edf8..5340b3c04d5 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DFloat.cpp
@@ -62,7 +62,8 @@ static int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat *self,
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
 
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp
index b2a5981ddde..fd06d271975 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DUnsigned.cpp
@@ -73,7 +73,8 @@ static int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned *self,
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
 
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp
index 133d2589ecf..c7ece4e9180 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec2f.cpp
@@ -77,7 +77,8 @@ static int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f *self,
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
 
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
index 1095b008d13..6f0d1aa3604 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
@@ -70,7 +70,8 @@ static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f *self,
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
 
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
index b885d0bcf6b..dc2268f4d3a 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVectorViewShape.cpp
@@ -88,7 +88,8 @@ static int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorView
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
 
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp
index 08acc54519f..776acbc724f 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVoid.cpp
@@ -85,7 +85,8 @@ static int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid *self,
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
 
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp
index d21691b7c9b..fb294861a0a 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Nature_EdgeNature/BPy_CurveNatureF1D.cpp
@@ -55,7 +55,8 @@ static int CurveNatureF1D___init__(BPy_CurveNatureF1D *self, PyObject *args, PyO
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
   IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp
index ddf9070d80f..f0ccc22623d 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Normal2DF1D.cpp
@@ -49,7 +49,8 @@ static int Normal2DF1D___init__(BPy_Normal2DF1D *self, PyObject *args, PyObject
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
   IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp
index fa3123c2609..762f8b96dd9 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec2f/BPy_Orientation2DF1D.cpp
@@ -49,7 +49,8 @@ static int Orientation2DF1D___init__(BPy_Orientation2DF1D *self, PyObject *args,
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
   IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp
index ff75751d8a4..8d4f974fbf7 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_Vec3f/BPy_Orientation3DF1D.cpp
@@ -49,7 +49,8 @@ static int Orientation3DF1D___init__(BPy_Orientation3DF1D *self, PyObject *args,
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
   IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp
index 004bd6ee1aa..56113c83dc0 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp
@@ -51,7 +51,8 @@ static int Curvature2DAngleF1D___init__(BPy_Curvature2DAngleF1D *self,
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
   IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp
index 7842e721c51..8209a3cb794 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp
@@ -49,7 +49,8 @@ static int GetProjectedXF1D___init__(BPy_GetProjectedXF1D *self, PyObject *args,
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
   IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp
index 2cd80e05914..3c199448ee4 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp
@@ -49,7 +49,8 @@ static int GetProjectedYF1D___init__(BPy_GetProjectedYF1D *self, PyObject *args,
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
   IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp
index 7473e10e0db..d6ab5c80867 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp
@@ -49,7 +49,8 @@ static int GetProjectedZF1D___init__(BPy_GetProjectedZF1D *self, PyObject *args,
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
   IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp
index d700ba18542..ff215d0829e 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp
@@ -49,7 +49,8 @@ static int GetXF1D___init__(BPy_GetXF1D *self, PyObject *args, PyObject *kwds)
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
   IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp
index 1d3233e41d3..dba0dc924eb 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp
@@ -49,7 +49,8 @@ static int GetYF1D___init__(BPy_GetYF1D *self, PyObject *args, PyObject *kwds)
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
   IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp
index 2005f6a08be..8eb424315bf 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp
@@ -49,7 +49,8 @@ static int GetZF1D___init__(BPy_GetZF1D *self, PyObject *args, PyObject *kwds)
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
   IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp
index 83b9f5724e1..b8164504a1e 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp
@@ -53,7 +53,8 @@ static int ZDiscontinuityF1D___init__(BPy_ZDiscontinuityF1D *self, PyObject *arg
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
   IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp
index ca18511a26a..aa4a8231dc2 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_unsigned_int/BPy_QuantitativeInvisibilityF1D.cpp
@@ -55,7 +55,8 @@ static int QuantitativeInvisibilityF1D___init__(BPy_QuantitativeInvisibilityF1D
   PyObject *obj = nullptr;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj)) {
+          args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
+  {
     return -1;
   }
   IntegrationType t = (obj) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
diff --git a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp
index e200f43a74a..27e54f8d2d1 100644
--- a/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp
+++ b/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_WithinImageBoundaryUP1D.cpp
@@ -47,7 +47,8 @@ static int WithinImageBoundaryUP1D___init__(BPy_WithinImageBoundaryUP1D *self,
   double xmin, ymin, xmax, ymax;
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwds, "dddd", (char **)kwlist, &xmin, &ymin, &xmax, &ymax)) {
+          args, kwds, "dddd", (char **)kwlist, &xmin, &ymin, &xmax, &ymax))
+  {
     return -1;
   }
   self->py_up1D.up1D = new Predicates1D::WithinImageBoundaryUP1D(xmin, ymin, xmax, ymax);
diff --git a/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.cpp b/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.cpp
index ec65d1bdc2d..35f52495a17 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.cpp
@@ -19,7 +19,8 @@ void NodeDrawingStyle::accept(SceneVisitor &v)
   v.visitNodeDrawingStyleBefore(*this);
   v.visitDrawingStyle(_DrawingStyle);
   for (vector::iterator node = _Children.begin(), end = _Children.end(); node != end;
-       ++node) {
+       ++node)
+  {
     (*node)->accept(v);
   }
   v.visitNodeDrawingStyleAfter(*this);
diff --git a/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp b/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp
index ec5a896416e..fe3a04da57e 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeGroup.cpp
@@ -59,7 +59,8 @@ void NodeGroup::accept(SceneVisitor &v)
 
   v.visitNodeGroupBefore(*this);
   for (vector::iterator node = _Children.begin(), end = _Children.end(); node != end;
-       ++node) {
+       ++node)
+  {
     (*node)->accept(v);
   }
   v.visitNodeGroupAfter(*this);
diff --git a/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp b/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp
index aa6d8043faf..c87a35411d6 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp
@@ -101,7 +101,8 @@ void NodeTransform::accept(SceneVisitor &v)
 
   v.visitNodeTransformBefore(*this);
   for (vector::iterator node = _Children.begin(), end = _Children.end(); node != end;
-       ++node) {
+       ++node)
+  {
     (*node)->accept(v);
   }
   v.visitNodeTransformAfter(*this);
diff --git a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp
index 2d573977061..1c86f097d07 100644
--- a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp
+++ b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp
@@ -198,7 +198,8 @@ Smoother::Smoother(Stroke &ioStroke)
   StrokeInternal::StrokeVertexIterator v, vend;
   int i = 0;
   for (v = ioStroke.strokeVerticesBegin(), vend = ioStroke.strokeVerticesEnd(); v != vend;
-       ++v, ++i) {
+       ++v, ++i)
+  {
     _vertex[i] = (v)->getPoint();
   }
   Vec2r vec_tmp(_vertex[0] - _vertex[_nbVertices - 1]);
diff --git a/source/blender/freestyle/intern/stroke/Canvas.cpp b/source/blender/freestyle/intern/stroke/Canvas.cpp
index 8a4d86b917c..f2954528a50 100644
--- a/source/blender/freestyle/intern/stroke/Canvas.cpp
+++ b/source/blender/freestyle/intern/stroke/Canvas.cpp
@@ -121,7 +121,8 @@ void Canvas::Clear()
 {
   if (!_Layers.empty()) {
     for (deque::iterator sl = _Layers.begin(), slend = _Layers.end(); sl != slend;
-         ++sl) {
+         ++sl)
+    {
       if (*sl) {
         delete (*sl);
       }
@@ -151,7 +152,8 @@ void Canvas::Erase()
 {
   if (!_Layers.empty()) {
     for (deque::iterator sl = _Layers.begin(), slend = _Layers.end(); sl != slend;
-         ++sl) {
+         ++sl)
+    {
       if (*sl) {
         (*sl)->clear();
       }
diff --git a/source/blender/freestyle/intern/stroke/Curve.cpp b/source/blender/freestyle/intern/stroke/Curve.cpp
index bd7a0073229..1d7c6cc7417 100644
--- a/source/blender/freestyle/intern/stroke/Curve.cpp
+++ b/source/blender/freestyle/intern/stroke/Curve.cpp
@@ -559,7 +559,8 @@ Curve::~Curve()
 {
   if (!_Vertices.empty()) {
     for (vertex_container::iterator it = _Vertices.begin(), itend = _Vertices.end(); it != itend;
-         ++it) {
+         ++it)
+    {
       delete (*it);
     }
     _Vertices.clear();
diff --git a/source/blender/freestyle/intern/stroke/Curve.h b/source/blender/freestyle/intern/stroke/Curve.h
index c10934adb68..ab691e02fba 100644
--- a/source/blender/freestyle/intern/stroke/Curve.h
+++ b/source/blender/freestyle/intern/stroke/Curve.h
@@ -13,7 +13,7 @@
 
 #include "../geometry/Geom.h"
 
-//#include "../scene_graph/FrsMaterial.h"
+// #include "../scene_graph/FrsMaterial.h"
 
 #include "../view_map/Interface0D.h"
 #include "../view_map/Interface1D.h"
diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp
index b71125112fb..5d6ddc2b19f 100644
--- a/source/blender/freestyle/intern/stroke/Operators.cpp
+++ b/source/blender/freestyle/intern/stroke/Operators.cpp
@@ -1277,7 +1277,8 @@ int Operators::create(UnaryPredicate1D &pred, vector shaders)
   }
   StrokesContainer new_strokes_set;
   for (Operators::I1DContainer::iterator it = _current_set->begin(); it != _current_set->end();
-       ++it) {
+       ++it)
+  {
     if (pred(**it) < 0) {
       goto error;
     }
diff --git a/source/blender/freestyle/intern/stroke/Predicates1D.h b/source/blender/freestyle/intern/stroke/Predicates1D.h
index 18bff0c60c5..99e7e8ed702 100644
--- a/source/blender/freestyle/intern/stroke/Predicates1D.h
+++ b/source/blender/freestyle/intern/stroke/Predicates1D.h
@@ -254,7 +254,8 @@ class ExternalContourUP1D : public UnaryPredicate1D {
       set occluded;
       Functions1D::getOccludeeF1D(inter, occluded);
       for (set::iterator os = occluded.begin(), osend = occluded.end(); os != osend;
-           ++os) {
+           ++os)
+      {
         if ((*os) == 0) {
           result = true;
           return 0;
@@ -507,7 +508,8 @@ class SameShapeIdBP1D : public BinaryPredicate1D {
     for (set::iterator s = shapes1.begin(), send = shapes1.end(); s != send; ++s) {
       Id current = (*s)->getId();
       for (set::iterator s2 = shapes2.begin(), s2end = shapes2.end(); s2 != s2end;
-           ++s2) {
+           ++s2)
+      {
         if ((*s2)->getId() == current) {
           result = true;
           return 0;
diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp
index 9293b8a72fd..ca628f5888f 100644
--- a/source/blender/freestyle/intern/stroke/Stroke.cpp
+++ b/source/blender/freestyle/intern/stroke/Stroke.cpp
@@ -795,7 +795,8 @@ Interface0DIterator Stroke::pointsEnd(float /*t*/)
 void Stroke::ScaleThickness(float iFactor)
 {
   for (vertex_container::iterator it = _Vertices.begin(), itend = _Vertices.end(); it != itend;
-       ++it) {
+       ++it)
+  {
     StrokeAttribute &attr = (*it)->attribute();
     attr.setThickness(iFactor * attr.getThicknessR(), iFactor * attr.getThicknessL());
   }
diff --git a/source/blender/freestyle/intern/view_map/BoxGrid.h b/source/blender/freestyle/intern/view_map/BoxGrid.h
index 221a97cb830..69a57861522 100644
--- a/source/blender/freestyle/intern/view_map/BoxGrid.h
+++ b/source/blender/freestyle/intern/view_map/BoxGrid.h
@@ -14,8 +14,8 @@
 // I would like to avoid using deque because including ViewMap.h and  or 
 // separately results in redefinitions of identifiers. ViewMap.h already includes 
 // so it should be a safe fall-back.
-//#include 
-//#include 
+// #include 
+// #include 
 
 #include "GridDensityProvider.h"
 #include "OccluderSource.h"
diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
index 7c9ddb44d9c..9426815e396 100644
--- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
+++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
@@ -651,7 +651,8 @@ void FEdgeXDetector::postProcessSuggestiveContourFace(WXFace *iFace)
 
     // For each vertex, iterate on its adjacent faces.
     for (WVertex::face_iterator fit = v->faces_begin(), fitend = v->faces_end(); fit != fitend;
-         ++fit) {
+         ++fit)
+    {
       wxf = dynamic_cast(*fit);
       if (!wxf->getOppositeEdge(v, opposite_edge)) {
         continue;
diff --git a/source/blender/freestyle/intern/view_map/Functions0D.cpp b/source/blender/freestyle/intern/view_map/Functions0D.cpp
index 1c3f4447caa..f89edd0c4a3 100644
--- a/source/blender/freestyle/intern/view_map/Functions0D.cpp
+++ b/source/blender/freestyle/intern/view_map/Functions0D.cpp
@@ -358,7 +358,8 @@ int GetOccludersF0D::operator()(Interface0DIterator &iter)
   result.clear();
   // vsOccluders.insert(vsOccluders.begin(), occluders.begin(), occluders.end());
   for (set::iterator it = occluders.begin(), itend = occluders.end(); it != itend;
-       ++it) {
+       ++it)
+  {
     result.push_back(*it);
   }
   return 0;
diff --git a/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h b/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h
index 3fe51d437c9..78e8fb82239 100644
--- a/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h
+++ b/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h
@@ -9,10 +9,10 @@
  * \brief Class to define a cell grid surrounding the projected image of a scene
  */
 
-//#include  // provided by GridDensityProvider.h
+// #include  // provided by GridDensityProvider.h
 
 #include "AverageAreaGridDensityProvider.h"
-//#include "GridDensityProvider.h" // provided by *GridDensityProvider.h below
+// #include "GridDensityProvider.h" // provided by *GridDensityProvider.h below
 #include "Pow23GridDensityProvider.h"
 
 namespace Freestyle {
diff --git a/source/blender/freestyle/intern/view_map/SphericalGrid.h b/source/blender/freestyle/intern/view_map/SphericalGrid.h
index 07b164891fa..5ab4dd85f80 100644
--- a/source/blender/freestyle/intern/view_map/SphericalGrid.h
+++ b/source/blender/freestyle/intern/view_map/SphericalGrid.h
@@ -14,8 +14,8 @@
 // I would like to avoid using deque because including ViewMap.h and  or  separately
 // results in redefinitions of identifiers. ViewMap.h already includes  so it should be a
 // safe fall-back.
-//#include 
-//#include 
+// #include 
+// #include 
 
 #include "GridDensityProvider.h"
 #include "OccluderSource.h"
diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
index 29c3bdda1a7..97573da77cb 100644
--- a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
+++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
@@ -83,7 +83,7 @@ void SteerableViewMap::Clear()
   if (!_mapping.empty()) {
     for (map::iterator m = _mapping.begin(), mend = _mapping.end(); m != mend; ++m)
     {
-      delete[](*m).second;
+      delete[] (*m).second;
     }
     _mapping.clear();
   }
diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
index 580e17c67ba..74169e5077f 100644
--- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
@@ -259,7 +259,8 @@ ViewEdge *ViewEdgeXBuilder::BuildSharpViewEdge(const OWXEdge &iWEdge)
   FEdge *fefirst = nullptr;
   FEdge *fe = nullptr;
   for (list::iterator we = edgesChain.begin(), weend = edgesChain.end(); we != weend;
-       ++we) {
+       ++we)
+  {
     fe = BuildSharpFEdge(feprevious, (*we));
     fe->setViewEdge(newVEdge);
     if (!fefirst) {
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.cpp b/source/blender/freestyle/intern/view_map/ViewMap.cpp
index 204aa706335..8bca2cf6309 100644
--- a/source/blender/freestyle/intern/view_map/ViewMap.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMap.cpp
@@ -194,7 +194,8 @@ ViewVertex *ViewMap::InsertViewVertex(SVertex *iVertex, vector &newV
   }
   FEdge *fend(nullptr), *fbegin(nullptr);
   for (vector::const_iterator fe = fedges.begin(), feend = fedges.end(); fe != feend;
-       ++fe) {
+       ++fe)
+  {
     if ((*fe)->vertexB() == iVertex) {
       fend = (*fe);
     }
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h
index d6c108007a7..d492073b95e 100644
--- a/source/blender/freestyle/intern/view_map/ViewMap.h
+++ b/source/blender/freestyle/intern/view_map/ViewMap.h
@@ -821,7 +821,8 @@ class NonTVertex : public ViewVertex {
   {
     edges_container::iterator insertedve;
     for (edges_container::iterator ve = _ViewEdges.begin(), vend = _ViewEdges.end(); ve != vend;
-         ve++) {
+         ve++)
+    {
       if ((ve)->first == iOld) {
         insertedve = _ViewEdges.insert(
             ve, directedViewEdge(iNew, ve->second));  // inserts e2 before ve.
diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
index c83ef2cd43e..1b09fe95a3d 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
@@ -1125,7 +1125,8 @@ void ViewMapBuilder::CullViewEdges(ViewMap *ioViewMap,
   ViewMap::viewedges_container::iterator ve, veend;
 
   for (ve = ioViewMap->ViewEdges().begin(), veend = ioViewMap->ViewEdges().end(); ve != veend;
-       ve++) {
+       ve++)
+  {
     // Overview:
     //    Search for a visible feature edge
     //    If none: mark view edge as non-displayable
@@ -1229,7 +1230,8 @@ void ViewMapBuilder::CullViewEdges(ViewMap *ioViewMap,
   if (extensiveFEdgeSearch) {
     // For each view edge,
     for (ve = ioViewMap->ViewEdges().begin(), veend = ioViewMap->ViewEdges().end(); ve != veend;
-         ve++) {
+         ve++)
+    {
       if (!(*ve)->isInImage()) {
         continue;
       }
@@ -1974,7 +1976,8 @@ void ViewMapBuilder::FindOccludee(FEdge *fe,
       }
       else {
         if (GeomUtils::COINCIDENT ==
-            GeomUtils::intersectRayPlane(origin, edgeDir, normal, d, t, epsilon)) {
+            GeomUtils::intersectRayPlane(origin, edgeDir, normal, d, t, epsilon))
+        {
           continue;
         }
       }
@@ -2201,7 +2204,8 @@ int ViewMapBuilder::ComputeRayCastingVisibility(FEdge *fe,
       // first let us compute the plane equation.
 
       if (GeomUtils::COINCIDENT ==
-          GeomUtils::intersectRayPlane(origin, edgeDir, normal, d, t, epsilon)) {
+          GeomUtils::intersectRayPlane(origin, edgeDir, normal, d, t, epsilon))
+      {
 #if LOGGING
         if (_global.debug & G_DEBUG_FREESTYLE) {
           cout << "\t\tRejecting occluder for target coincidence." << endl;
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h
index 9f4449cbe18..9b15e3cd4ab 100644
--- a/source/blender/freestyle/intern/winged_edge/WEdge.h
+++ b/source/blender/freestyle/intern/winged_edge/WEdge.h
@@ -1209,7 +1209,8 @@ class WShape {
   inline void ResetUserData()
   {
     for (vector::iterator v = _VertexList.begin(), vend = _VertexList.end(); v != vend;
-         v++) {
+         v++)
+    {
       (*v)->ResetUserData();
     }
 
diff --git a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h
index 5b6c4b62013..75901c41ac0 100644
--- a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h
+++ b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h
@@ -35,7 +35,8 @@ class WingedEdgeBuilder : public SceneVisitor {
   virtual ~WingedEdgeBuilder()
   {
     for (vector::iterator it = _matrices_stack.begin(); it != _matrices_stack.end();
-         ++it) {
+         ++it)
+    {
       delete *it;
     }
     _matrices_stack.clear();
diff --git a/source/blender/functions/FN_field.hh b/source/blender/functions/FN_field.hh
index 0748213b5df..813fe26e6ef 100644
--- a/source/blender/functions/FN_field.hh
+++ b/source/blender/functions/FN_field.hh
@@ -179,8 +179,7 @@ class GFieldRef : public GFieldBase {
 
 namespace detail {
 /* Utility class to make #is_field_v work. */
-struct TypedFieldBase {
-};
+struct TypedFieldBase {};
 }  // namespace detail
 
 /**
diff --git a/source/blender/functions/FN_multi_function_builder.hh b/source/blender/functions/FN_multi_function_builder.hh
index 3b3183394f9..e94e5ca09aa 100644
--- a/source/blender/functions/FN_multi_function_builder.hh
+++ b/source/blender/functions/FN_multi_function_builder.hh
@@ -334,7 +334,8 @@ inline void execute_materialized(TypeSequence /*param_tags*/,
             typedef typename ParamTag::base_type T;
             if constexpr (ELEM(ParamTag::category,
                                ParamCategory::SingleOutput,
-                               ParamCategory::SingleMutable)) {
+                               ParamCategory::SingleMutable))
+            {
               T *tmp_buffer = std::get(temporary_buffers).ptr();
               T *param_buffer = std::get(loaded_params);
               for (int64_t i = 0; i < chunk_size; i++) {
diff --git a/source/blender/functions/FN_multi_function_context.hh b/source/blender/functions/FN_multi_function_context.hh
index f311e32ddf4..a726b2a514a 100644
--- a/source/blender/functions/FN_multi_function_context.hh
+++ b/source/blender/functions/FN_multi_function_context.hh
@@ -22,8 +22,7 @@ namespace blender::fn::multi_function {
 
 class Context;
 
-class ContextBuilder {
-};
+class ContextBuilder {};
 
 class Context {
  public:
diff --git a/source/blender/functions/FN_multi_function_procedure.hh b/source/blender/functions/FN_multi_function_procedure.hh
index ea410aae83a..68a3b8e19b1 100644
--- a/source/blender/functions/FN_multi_function_procedure.hh
+++ b/source/blender/functions/FN_multi_function_procedure.hh
@@ -213,8 +213,7 @@ class DummyInstruction : public Instruction {
 /**
  * This instruction ends the procedure.
  */
-class ReturnInstruction : public Instruction {
-};
+class ReturnInstruction : public Instruction {};
 
 /**
  * Inputs and outputs of the entire procedure network.
diff --git a/source/blender/geometry/intern/add_curves_on_mesh.cc b/source/blender/geometry/intern/add_curves_on_mesh.cc
index 10aa63c4812..35c711a9c73 100644
--- a/source/blender/geometry/intern/add_curves_on_mesh.cc
+++ b/source/blender/geometry/intern/add_curves_on_mesh.cc
@@ -383,7 +383,8 @@ AddCurvesOnMeshOutputs add_curves_on_mesh(CurvesGeometry &curves,
   bke::MutableAttributeAccessor attributes = curves.attributes_for_write();
 
   if (bke::SpanAttributeWriter resolution = attributes.lookup_for_write_span(
-          "resolution")) {
+          "resolution"))
+  {
     if (inputs.interpolate_resolution) {
       interpolate_from_neighbors(
           neighbors_per_curve,
diff --git a/source/blender/geometry/intern/mesh_merge_by_distance.cc b/source/blender/geometry/intern/mesh_merge_by_distance.cc
index 87e72c05837..bb581b50f04 100644
--- a/source/blender/geometry/intern/mesh_merge_by_distance.cc
+++ b/source/blender/geometry/intern/mesh_merge_by_distance.cc
@@ -260,7 +260,8 @@ static void weld_assert_poly_no_vert_repetition(const WeldPoly *wp,
   Array verts(wp->loop_len);
   WeldLoopOfPolyIter iter;
   if (!weld_iter_loop_of_poly_begin(
-          iter, *wp, wloop, corner_verts, corner_edges, loop_map, nullptr)) {
+          iter, *wp, wloop, corner_verts, corner_edges, loop_map, nullptr))
+  {
     return;
   }
   else {
@@ -1169,7 +1170,8 @@ static void weld_poly_find_doubles(const Span corner_verts,
 
     WeldLoopOfPolyIter iter;
     if (!weld_iter_loop_of_poly_begin(
-            iter, wp, wloop, corner_verts, corner_edges, loop_map, nullptr)) {
+            iter, wp, wloop, corner_verts, corner_edges, loop_map, nullptr))
+    {
       continue;
     }
 
diff --git a/source/blender/geometry/intern/uv_parametrizer.cc b/source/blender/geometry/intern/uv_parametrizer.cc
index 70efafdd145..dd2af9f9e53 100644
--- a/source/blender/geometry/intern/uv_parametrizer.cc
+++ b/source/blender/geometry/intern/uv_parametrizer.cc
@@ -164,7 +164,7 @@ static int PHashSizes[] = {
 };
 
 #define PHASH_hash(ph, item) (uintptr_t(item) % uint((ph)->cursize))
-#define PHASH_edge(v1, v2) (((v1) < (v2)) ? ((v1)*39) ^ ((v2)*31) : ((v1)*31) ^ ((v2)*39))
+#define PHASH_edge(v1, v2) (((v1) < (v2)) ? ((v1) * 39) ^ ((v2) * 31) : ((v1) * 31) ^ ((v2) * 39))
 
 static PHash *phash_new(PHashLink **list, int sizehint)
 {
@@ -789,11 +789,13 @@ static bool p_edge_has_pair(ParamHandle *handle, PEdge *e, bool topology_from_uv
       v2 = pe->next->vert;
 
       if (((v1->u.key == key1) && (v2->u.key == key2)) ||
-          ((v1->u.key == key2) && (v2->u.key == key1))) {
+          ((v1->u.key == key2) && (v2->u.key == key1)))
+      {
 
         /* don't connect seams and t-junctions */
         if ((pe->flag & PEDGE_SEAM) || *r_pair ||
-            (topology_from_uvs && p_edge_implicit_seam(e, pe))) {
+            (topology_from_uvs && p_edge_implicit_seam(e, pe)))
+        {
           *r_pair = nullptr;
           return false;
         }
diff --git a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_build.cc b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_build.cc
index 17fd852e938..6b50cd2249b 100644
--- a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_build.cc
+++ b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_build.cc
@@ -538,7 +538,8 @@ static void build_sequential(Object *ob,
     }
     else {
       if (fade_start != fade_end && int(cell->start_idx) < fade_end &&
-          int(cell->end_idx) > fade_start) {
+          int(cell->end_idx) > fade_start)
+      {
         int start_index = fade_start - cell->start_idx;
         int end_index = cell->totpoints + fade_end - cell->end_idx - 1;
         CLAMP(start_index, 0, cell->totpoints - 1);
diff --git a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_color.cc b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_color.cc
index 8c58ea959fb..2bcde946159 100644
--- a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_color.cc
+++ b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_color.cc
@@ -105,7 +105,8 @@ static void deform_stroke(GpencilModifierData *md,
   if (mmd->modify_color != GP_MODIFY_COLOR_STROKE) {
     /* If not using Vertex Color, use the material color. */
     if ((gp_style != nullptr) && (gps->vert_color_fill[3] == 0.0f) &&
-        (gp_style->fill_rgba[3] > 0.0f)) {
+        (gp_style->fill_rgba[3] > 0.0f))
+    {
       copy_v4_v4(gps->vert_color_fill, gp_style->fill_rgba);
       gps->vert_color_fill[3] = 1.0f;
     }
@@ -124,7 +125,8 @@ static void deform_stroke(GpencilModifierData *md,
       bGPDspoint *pt = &gps->points[i];
       /* If not using Vertex Color, use the material color. */
       if ((gp_style != nullptr) && (pt->vert_color[3] == 0.0f) &&
-          (gp_style->stroke_rgba[3] > 0.0f)) {
+          (gp_style->stroke_rgba[3] > 0.0f))
+      {
         copy_v4_v4(pt->vert_color, gp_style->stroke_rgba);
         pt->vert_color[3] = 1.0f;
       }
diff --git a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_shrinkwrap.cc b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_shrinkwrap.cc
index d98e88dfc5e..e6a674c4f95 100644
--- a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_shrinkwrap.cc
+++ b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_shrinkwrap.cc
@@ -151,7 +151,8 @@ static void bake_modifier(Main * /*bmain*/,
       mmd->cache_data = static_cast(
           MEM_callocN(sizeof(ShrinkwrapTreeData), __func__));
       if (BKE_shrinkwrap_init_tree(
-              mmd->cache_data, target, mmd->shrink_type, mmd->shrink_mode, false)) {
+              mmd->cache_data, target, mmd->shrink_type, mmd->shrink_mode, false))
+      {
 
         /* Compute shrinkwrap effects on this frame. */
         LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
diff --git a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_tint.cc b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_tint.cc
index 508d9e3ffd6..df5f84f0d41 100644
--- a/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_tint.cc
+++ b/source/blender/gpencil_modifiers_legacy/intern/MOD_gpencil_legacy_tint.cc
@@ -173,7 +173,8 @@ static void deform_stroke(GpencilModifierData *md,
 
         /* If not using Vertex Color, use the material color. */
         if ((gp_style != nullptr) && (gps->vert_color_fill[3] == 0.0f) &&
-            (gp_style->fill_rgba[3] > 0.0f)) {
+            (gp_style->fill_rgba[3] > 0.0f))
+        {
           copy_v4_v4(gps->vert_color_fill, gp_style->fill_rgba);
           gps->vert_color_fill[3] = 1.0f;
         }
@@ -223,7 +224,8 @@ static void deform_stroke(GpencilModifierData *md,
 
       /* If not using Vertex Color, use the material color. */
       if ((gp_style != nullptr) && (pt->vert_color[3] == 0.0f) &&
-          (gp_style->stroke_rgba[3] > 0.0f)) {
+          (gp_style->stroke_rgba[3] > 0.0f))
+      {
         copy_v4_v4(pt->vert_color, gp_style->stroke_rgba);
         pt->vert_color[3] = 1.0f;
       }
diff --git a/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_chain.cc b/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_chain.cc
index a631e2b03f5..3e1e72aa9da 100644
--- a/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_chain.cc
+++ b/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_chain.cc
@@ -834,7 +834,8 @@ static LineartChainRegisterEntry *lineart_chain_get_closest_cre(LineartData *ld,
         if (ld->conf.fuzzy_intersections) {
           /* If none of those are intersection lines... */
           if (!(cre->ec->type & LRT_EDGE_FLAG_INTERSECTION) &&
-              !(ec->type & LRT_EDGE_FLAG_INTERSECTION)) {
+              !(ec->type & LRT_EDGE_FLAG_INTERSECTION))
+          {
             continue; /* We don't want to chain along different objects at the moment. */
           }
         }
@@ -856,7 +857,8 @@ static LineartChainRegisterEntry *lineart_chain_get_closest_cre(LineartData *ld,
       if (cre->ec->type != ec->type) {
         if (ld->conf.fuzzy_intersections) {
           if (!(cre->ec->type == LRT_EDGE_FLAG_INTERSECTION ||
-                ec->type == LRT_EDGE_FLAG_INTERSECTION)) {
+                ec->type == LRT_EDGE_FLAG_INTERSECTION))
+          {
             continue; /* Fuzzy intersections but no intersection line found. */
           }
         }
@@ -1157,7 +1159,8 @@ void MOD_lineart_smooth_chains(LineartData *ld, float tolerance)
           if (ratio < len2 && ratio > -len2 * 10) {
             /* We only remove p3 if p4 is on the extension of p1->p2. */
             if ((eci4 = eci3->next) &&
-                (dist_to_line_v2(eci4->pos, eci->pos, eci2->pos) < tolerance)) {
+                (dist_to_line_v2(eci4->pos, eci->pos, eci2->pos) < tolerance))
+            {
               BLI_remlink(&ec->chain, eci3);
               next_eci = eci;
               continue;
@@ -1392,7 +1395,8 @@ void MOD_lineart_chain_find_silhouette_backdrop_objects(LineartData *ld)
 {
   LISTBASE_FOREACH (LineartEdgeChain *, ec, &ld->chains) {
     if (ec->type == LRT_EDGE_FLAG_CONTOUR &&
-        ec->shadow_mask_bits & LRT_SHADOW_SILHOUETTE_ERASED_GROUP) {
+        ec->shadow_mask_bits & LRT_SHADOW_SILHOUETTE_ERASED_GROUP)
+    {
       uint32_t target = ec->shadow_mask_bits & LRT_OBINDEX_HIGHER;
       LineartElementLinkNode *eln = lineart_find_matching_eln(&ld->geom.line_buffer_pointers,
                                                               target);
diff --git a/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_cpu.cc b/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_cpu.cc
index a820a8a242c..82fc4090857 100644
--- a/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_cpu.cc
+++ b/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_cpu.cc
@@ -316,7 +316,8 @@ void lineart_edge_cut(LineartData *ld,
      * flags. See LineartEdgeSegment::shadow_mask_bits for details. */
     if (shadow_bits == LRT_SHADOW_MASK_ENCLOSED_SHAPE) {
       if (seg->shadow_mask_bits & LRT_SHADOW_MASK_ILLUMINATED ||
-          e->flags & LRT_EDGE_FLAG_LIGHT_CONTOUR) {
+          e->flags & LRT_EDGE_FLAG_LIGHT_CONTOUR)
+      {
         seg->shadow_mask_bits |= LRT_SHADOW_MASK_INHIBITED;
       }
       else if (seg->shadow_mask_bits & LRT_SHADOW_MASK_SHADED) {
@@ -1691,7 +1692,8 @@ static void lineart_identify_corner_tri_feature_edges(void *__restrict userdata,
 
   if (real_edges[i % 3] >= 0) {
     if (ld->conf.use_crease && ld->conf.sharp_as_crease &&
-        e_feat_data->sharp_edges[real_edges[i % 3]]) {
+        e_feat_data->sharp_edges[real_edges[i % 3]])
+    {
       edge_flag_result |= LRT_EDGE_FLAG_CREASE;
     }
 
@@ -2878,7 +2880,8 @@ static bool lineart_triangle_edge_image_space_occlusion(const LineartTriangle *t
   dot_f = dot_v3v3_db(dir_cam, tri->gn);
 
   if ((e->flags & LRT_EDGE_FLAG_PROJECTED_SHADOW) &&
-      (e->target_reference == tri->target_reference)) {
+      (e->target_reference == tri->target_reference))
+  {
     if (((dot_f > 0) && (e->flags & LRT_EDGE_FLAG_SHADOW_FACING_LIGHT)) ||
         ((dot_f < 0) && !(e->flags & LRT_EDGE_FLAG_SHADOW_FACING_LIGHT)))
     {
@@ -4277,19 +4280,23 @@ static void lineart_bounding_area_link_edge(LineartData *ld,
   }
   else {
     if (lineart_bounding_area_edge_intersect(
-            ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[0])) {
+            ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[0]))
+    {
       lineart_bounding_area_link_edge(ld, &root_ba->child[0], e);
     }
     if (lineart_bounding_area_edge_intersect(
-            ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[1])) {
+            ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[1]))
+    {
       lineart_bounding_area_link_edge(ld, &root_ba->child[1], e);
     }
     if (lineart_bounding_area_edge_intersect(
-            ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[2])) {
+            ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[2]))
+    {
       lineart_bounding_area_link_edge(ld, &root_ba->child[2], e);
     }
     if (lineart_bounding_area_edge_intersect(
-            ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[3])) {
+            ld, e->v1->fbcoord, e->v2->fbcoord, &root_ba->child[3]))
+    {
       lineart_bounding_area_link_edge(ld, &root_ba->child[3], e);
     }
   }
@@ -4562,7 +4569,8 @@ static void lineart_add_triangles_worker(TaskPool *__restrict /*pool*/, LineartI
   // int _dir_control = 0; /* UNUSED */
   while (lineart_schedule_new_triangle_task(th)) {
     for (LineartElementLinkNode *eln = th->pending_from; eln != th->pending_to->next;
-         eln = eln->next) {
+         eln = eln->next)
+    {
       int index_start = eln == th->pending_from ? th->index_from : 0;
       int index_end = eln == th->pending_to ? th->index_to : eln->element_count;
       LineartTriangle *tri = static_cast(
diff --git a/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_shadow.cc b/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_shadow.cc
index 6473afd6690..85fd7a32daa 100644
--- a/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_shadow.cc
+++ b/source/blender/gpencil_modifiers_legacy/intern/lineart/lineart_shadow.cc
@@ -759,7 +759,8 @@ static bool lineart_shadow_cast_onto_triangle(LineartData *ld,
      * the edge
      */
     if (!(pi && LRT_DOUBLE_CLOSE_ENOUGH(ratio[0], 1.0f) &&
-          LRT_DOUBLE_CLOSE_ENOUGH(ratio[1], 0.0f))) {
+          LRT_DOUBLE_CLOSE_ENOUGH(ratio[1], 0.0f)))
+    {
       trie[pi] = 1;
       pi++;
     }
diff --git a/source/blender/gpu/GPU_common.h b/source/blender/gpu/GPU_common.h
index e96cf794807..0b1591d8deb 100644
--- a/source/blender/gpu/GPU_common.h
+++ b/source/blender/gpu/GPU_common.h
@@ -9,7 +9,7 @@
 #pragma once
 
 #define PROGRAM_NO_OPTI 0
-//#define GPU_NO_USE_PY_REFERENCES
+// #define GPU_NO_USE_PY_REFERENCES
 
 #if defined(NDEBUG)
 #  define TRUST_NO_ONE 0
diff --git a/source/blender/gpu/GPU_matrix.h b/source/blender/gpu/GPU_matrix.h
index 6245b02fed3..005d17b7d2a 100644
--- a/source/blender/gpu/GPU_matrix.h
+++ b/source/blender/gpu/GPU_matrix.h
@@ -173,13 +173,31 @@ int GPU_matrix_stack_level_get_projection(void);
 
 #  if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
 #    define _GPU_MAT3_CONST_CAST(x) \
-      (_Generic((x), void * : (const float(*)[3])(x), float * : (const float(*)[3])(x), float(*)[4] : (const float(*)[3])(x), const void * : (const float(*)[3])(x), const float * : (const float(*)[3])(x), const float(*)[3] : (const float(*)[3])(x)))
+      (_Generic((x), \
+          void *: (const float(*)[3])(x), \
+          float *: (const float(*)[3])(x), \
+          float(*)[4]: (const float(*)[3])(x), \
+          const void *: (const float(*)[3])(x), \
+          const float *: (const float(*)[3])(x), \
+          const float(*)[3]: (const float(*)[3])(x)))
 #    define _GPU_MAT3_CAST(x) \
-      (_Generic((x), void * : (float(*)[3])(x), float * : (float(*)[3])(x), float(*)[3] : (float(*)[3])(x)))
+      (_Generic((x), \
+          void *: (float(*)[3])(x), \
+          float *: (float(*)[3])(x), \
+          float(*)[3]: (float(*)[3])(x)))
 #    define _GPU_MAT4_CONST_CAST(x) \
-      (_Generic((x), void * : (const float(*)[4])(x), float * : (const float(*)[4])(x), float(*)[4] : (const float(*)[4])(x), const void * : (const float(*)[4])(x), const float * : (const float(*)[4])(x), const float(*)[4] : (const float(*)[4])(x)))
+      (_Generic((x), \
+          void *: (const float(*)[4])(x), \
+          float *: (const float(*)[4])(x), \
+          float(*)[4]: (const float(*)[4])(x), \
+          const void *: (const float(*)[4])(x), \
+          const float *: (const float(*)[4])(x), \
+          const float(*)[4]: (const float(*)[4])(x)))
 #    define _GPU_MAT4_CAST(x) \
-      (_Generic((x), void * : (float(*)[4])(x), float * : (float(*)[4])(x), float(*)[4] : (float(*)[4])(x)))
+      (_Generic((x), \
+          void *: (float(*)[4])(x), \
+          float *: (float(*)[4])(x), \
+          float(*)[4]: (float(*)[4])(x)))
 #  else
 #    define _GPU_MAT3_CONST_CAST(x) (const float(*)[3])(x)
 #    define _GPU_MAT3_CAST(x) (float(*)[3])(x)
diff --git a/source/blender/gpu/dummy/dummy_framebuffer.hh b/source/blender/gpu/dummy/dummy_framebuffer.hh
index a9d7dbeccd3..eb07f20d188 100644
--- a/source/blender/gpu/dummy/dummy_framebuffer.hh
+++ b/source/blender/gpu/dummy/dummy_framebuffer.hh
@@ -26,7 +26,7 @@ class DummyFrameBuffer : public FrameBuffer {
              uint /*clear_stencil*/) override
   {
   }
-  void clear_multi(const float (*/*clear_color*/)[4]) override {}
+  void clear_multi(const float (* /*clear_color*/)[4]) override {}
   void clear_attachment(GPUAttachmentType /*type*/,
                         eGPUDataFormat /*data_format*/,
                         const void * /*clear_value*/) override
diff --git a/source/blender/gpu/intern/gpu_codegen.cc b/source/blender/gpu/intern/gpu_codegen.cc
index 2793611d4db..2e813fc3174 100644
--- a/source/blender/gpu/intern/gpu_codegen.cc
+++ b/source/blender/gpu/intern/gpu_codegen.cc
@@ -228,8 +228,7 @@ static std::ostream &operator<<(std::ostream &stream, const GPUOutput *output)
 }
 
 /* Trick type to change overload and keep a somewhat nice syntax. */
-struct GPUConstant : public GPUInput {
-};
+struct GPUConstant : public GPUInput {};
 
 /* Print data constructor (i.e: vec2(1.0f, 1.0f)). */
 static std::ostream &operator<<(std::ostream &stream, const GPUConstant *input)
diff --git a/source/blender/gpu/intern/gpu_immediate_util.cc b/source/blender/gpu/intern/gpu_immediate_util.cc
index 0458ebc9278..11851d28728 100644
--- a/source/blender/gpu/intern/gpu_immediate_util.cc
+++ b/source/blender/gpu/intern/gpu_immediate_util.cc
@@ -132,7 +132,7 @@ void immRecti_complete(int x1, int y1, int x2, int y2, const float color[4])
 
 void imm_cpack(uint x)
 {
-  immUniformColor3ub(((x)&0xFF), (((x) >> 8) & 0xFF), (((x) >> 16) & 0xFF));
+  immUniformColor3ub(((x) & 0xFF), (((x) >> 8) & 0xFF), (((x) >> 16) & 0xFF));
 }
 
 static void imm_draw_circle(GPUPrimType prim_type,
diff --git a/source/blender/gpu/intern/gpu_shader_log.cc b/source/blender/gpu/intern/gpu_shader_log.cc
index 5f78fb33251..2ae385c108f 100644
--- a/source/blender/gpu/intern/gpu_shader_log.cc
+++ b/source/blender/gpu/intern/gpu_shader_log.cc
@@ -251,7 +251,8 @@ void Shader::print_log(Span sources,
   CLG_Severity severity = error ? CLG_SEVERITY_ERROR : CLG_SEVERITY_WARN;
 
   if (((LOG.type->flag & CLG_FLAG_USE) && (LOG.type->level >= 0)) ||
-      (severity >= CLG_SEVERITY_WARN)) {
+      (severity >= CLG_SEVERITY_WARN))
+  {
     const char *_str = BLI_dynstr_get_cstring(dynstr);
     CLG_log_str(LOG.type, severity, this->name, stage, _str);
     MEM_freeN((void *)_str);
diff --git a/source/blender/gpu/metal/kernels/depth_2d_update_int24_frag.glsl b/source/blender/gpu/metal/kernels/depth_2d_update_int24_frag.glsl
index af1ee08584c..1674b90c5e8 100644
--- a/source/blender/gpu/metal/kernels/depth_2d_update_int24_frag.glsl
+++ b/source/blender/gpu/metal/kernels/depth_2d_update_int24_frag.glsl
@@ -6,6 +6,6 @@ void main()
 {
   uint val = textureLod(source_data, texCoord_interp, mip).r;
   uint stencil = (val >> 24) & 0xFFu;
-  uint depth = (val)&0xFFFFFFu;
+  uint depth = (val) & 0xFFFFFFu;
   gl_FragDepth = float(depth) / float(0xFFFFFFu);
 }
diff --git a/source/blender/gpu/metal/mtl_backend.mm b/source/blender/gpu/metal/mtl_backend.mm
index 6263b2f1237..93783095721 100644
--- a/source/blender/gpu/metal/mtl_backend.mm
+++ b/source/blender/gpu/metal/mtl_backend.mm
@@ -510,4 +510,4 @@ void MTLBackend::compute_dispatch_indirect(StorageBuf *indirect_buf)
 
 /** \} */
 
-}  // blender::gpu
+}  // namespace blender::gpu
diff --git a/source/blender/gpu/metal/mtl_command_buffer.mm b/source/blender/gpu/metal/mtl_command_buffer.mm
index 1755793aa2b..752f1f02abb 100644
--- a/source/blender/gpu/metal/mtl_command_buffer.mm
+++ b/source/blender/gpu/metal/mtl_command_buffer.mm
@@ -629,7 +629,8 @@ bool MTLCommandBufferManager::insert_memory_barrier(eGPUBarrier barrier_bits,
           MTLRenderStages before_stage_flags = 0;
           MTLRenderStages after_stage_flags = 0;
           if (before_stages & GPU_BARRIER_STAGE_VERTEX &&
-              !(before_stages & GPU_BARRIER_STAGE_FRAGMENT)) {
+              !(before_stages & GPU_BARRIER_STAGE_FRAGMENT))
+          {
             before_stage_flags = before_stage_flags | MTLRenderStageVertex;
           }
           if (before_stages & GPU_BARRIER_STAGE_FRAGMENT) {
@@ -1093,4 +1094,4 @@ void MTLComputeState::bind_pso(id pso)
 
 /** \} */
 
-}  // blender::gpu
+}  // namespace blender::gpu
diff --git a/source/blender/gpu/metal/mtl_context.mm b/source/blender/gpu/metal/mtl_context.mm
index 6d31941534f..e2a3b79fa12 100644
--- a/source/blender/gpu/metal/mtl_context.mm
+++ b/source/blender/gpu/metal/mtl_context.mm
@@ -2612,7 +2612,8 @@ id MTLContextComputeUtils::get_buffer_clear_pso()
     if (error) {
       /* Only exit out if genuine error and not warning. */
       if ([[error localizedDescription] rangeOfString:@"Compilation succeeded"].location ==
-          NSNotFound) {
+          NSNotFound)
+      {
         NSLog(@"Compile Error - Metal Shader Library error %@ ", error);
         BLI_assert(false);
         return nil;
diff --git a/source/blender/gpu/metal/mtl_immediate.mm b/source/blender/gpu/metal/mtl_immediate.mm
index cddab532469..c6558920e0a 100644
--- a/source/blender/gpu/metal/mtl_immediate.mm
+++ b/source/blender/gpu/metal/mtl_immediate.mm
@@ -384,7 +384,8 @@ void MTLImmediate::end()
 
           /* SSBO vertex fetch - Nullify elements buffer. */
           if (rps.cached_vertex_buffer_bindings[MTL_SSBO_VERTEX_FETCH_IBO_INDEX].metal_buffer ==
-              nil) {
+              nil)
+          {
             rps.bind_vertex_buffer(null_buffer, 0, MTL_SSBO_VERTEX_FETCH_IBO_INDEX);
           }
 
diff --git a/source/blender/gpu/metal/mtl_memory.mm b/source/blender/gpu/metal/mtl_memory.mm
index c95c6a6f113..6bd5d57a9cd 100644
--- a/source/blender/gpu/metal/mtl_memory.mm
+++ b/source/blender/gpu/metal/mtl_memory.mm
@@ -329,19 +329,18 @@ void MTLBufferPool::update_memory_pools()
         deletion_time_threshold_s = 2;
       }
       else
-          /* Spare pool memory >= 1GB. */
-          if (allocations_in_pool_ >= MEMORY_SIZE_1GB)
-      {
-        deletion_time_threshold_s = 4;
-      }
-      /* Spare pool memory >= 512MB. */
-      else if (allocations_in_pool_ >= MEMORY_SIZE_512MB) {
-        deletion_time_threshold_s = 15;
-      }
-      /* Spare pool memory >= 256MB. */
-      else if (allocations_in_pool_ >= MEMORY_SIZE_256MB) {
-        deletion_time_threshold_s = 60;
-      }
+        /* Spare pool memory >= 1GB. */
+        if (allocations_in_pool_ >= MEMORY_SIZE_1GB) {
+          deletion_time_threshold_s = 4;
+        }
+        /* Spare pool memory >= 512MB. */
+        else if (allocations_in_pool_ >= MEMORY_SIZE_512MB) {
+          deletion_time_threshold_s = 15;
+        }
+        /* Spare pool memory >= 256MB. */
+        else if (allocations_in_pool_ >= MEMORY_SIZE_256MB) {
+          deletion_time_threshold_s = 60;
+        }
 
       if (time_passed > deletion_time_threshold_s) {
 
diff --git a/source/blender/gpu/metal/mtl_shader.mm b/source/blender/gpu/metal/mtl_shader.mm
index f77d119f509..e8fe73315f2 100644
--- a/source/blender/gpu/metal/mtl_shader.mm
+++ b/source/blender/gpu/metal/mtl_shader.mm
@@ -371,7 +371,8 @@ bool MTLShader::finalize(const shader::ShaderCreateInfo *info)
       if (error) {
         /* Only exit out if genuine error and not warning. */
         if ([[error localizedDescription] rangeOfString:@"Compilation succeeded"].location ==
-            NSNotFound) {
+            NSNotFound)
+        {
           const char *errors_c_str = [[error localizedDescription] UTF8String];
           const char *sources_c_str = shd_builder_->glsl_fragment_source_.c_str();
 
@@ -957,7 +958,8 @@ MTLRenderPipelineStateInstance *MTLShader::bake_pipeline_state(
     }
     else {
       for (const uint i :
-           IndexRange(pipeline_descriptor.vertex_descriptor.max_attribute_value + 1)) {
+           IndexRange(pipeline_descriptor.vertex_descriptor.max_attribute_value + 1))
+      {
 
         /* Metal back-end attribute descriptor state. */
         const MTLVertexAttributeDescriptorPSO &attribute_desc =
@@ -1150,7 +1152,8 @@ MTLRenderPipelineStateInstance *MTLShader::bake_pipeline_state(
     bool null_pointsize = true;
     float MTL_pointsize = pipeline_descriptor.point_size;
     if (pipeline_descriptor.vertex_descriptor.prim_topology_class ==
-        MTLPrimitiveTopologyClassPoint) {
+        MTLPrimitiveTopologyClassPoint)
+    {
       /* `if pointsize is > 0.0`, PROGRAM_POINT_SIZE is enabled, and `gl_PointSize` shader keyword
        * overrides the value. Otherwise, if < 0.0, use global constant point size. */
       if (MTL_pointsize < 0.0) {
@@ -1222,7 +1225,8 @@ MTLRenderPipelineStateInstance *MTLShader::bake_pipeline_state(
 
     /* Setup pixel format state */
     for (int color_attachment = 0; color_attachment < GPU_FB_MAX_COLOR_ATTACHMENT;
-         color_attachment++) {
+         color_attachment++)
+    {
       /* Fetch color attachment pixel format in back-end pipeline state. */
       MTLPixelFormat pixel_format = pipeline_descriptor.color_attachment_format[color_attachment];
       /* Populate MTL API PSO attachment descriptor. */
@@ -1488,7 +1492,8 @@ MTLComputePipelineStateInstance *MTLShader::bake_compute_pipeline_state(MTLConte
 
       /* Only exit out if genuine error and not warning */
       if ([[error localizedDescription] rangeOfString:@"Compilation succeeded"].location ==
-          NSNotFound) {
+          NSNotFound)
+      {
         BLI_assert(false);
         return nullptr;
       }
diff --git a/source/blender/gpu/metal/mtl_texture.mm b/source/blender/gpu/metal/mtl_texture.mm
index fe20598412a..f9e69b69f30 100644
--- a/source/blender/gpu/metal/mtl_texture.mm
+++ b/source/blender/gpu/metal/mtl_texture.mm
@@ -620,7 +620,8 @@ void gpu::MTLTexture::update_sub(
 
     /* Safety Checks. */
     if (type == GPU_DATA_UINT_24_8 || type == GPU_DATA_10_11_11_REV ||
-        type == GPU_DATA_2_10_10_10_REV) {
+        type == GPU_DATA_2_10_10_10_REV)
+    {
       BLI_assert(can_use_direct_blit &&
                  "Special input data type must be a 1-1 mapping with destination texture as it "
                  "cannot easily be split");
diff --git a/source/blender/gpu/metal/mtl_texture_util.mm b/source/blender/gpu/metal/mtl_texture_util.mm
index 858a46b98a6..bcdbb6d9914 100644
--- a/source/blender/gpu/metal/mtl_texture_util.mm
+++ b/source/blender/gpu/metal/mtl_texture_util.mm
@@ -426,7 +426,8 @@ id gpu::MTLTexture::mtl_texture_update_impl(
     if (error) {
       /* Only exit out if genuine error and not warning. */
       if ([[error localizedDescription] rangeOfString:@"Compilation succeeded"].location ==
-          NSNotFound) {
+          NSNotFound)
+      {
         NSLog(@"Compile Error - Metal Shader Library error %@ ", error);
         BLI_assert(false);
         return nil;
@@ -746,7 +747,8 @@ id gpu::MTLTexture::mtl_texture_read_impl(
     if (error) {
       /* Only exit out if genuine error and not warning. */
       if ([[error localizedDescription] rangeOfString:@"Compilation succeeded"].location ==
-          NSNotFound) {
+          NSNotFound)
+      {
         NSLog(@"Compile Error - Metal Shader Library error %@ ", error);
         BLI_assert(false);
         return nil;
diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc
index 3e621fd82c0..3da2d234346 100644
--- a/source/blender/gpu/opengl/gl_backend.cc
+++ b/source/blender/gpu/opengl/gl_backend.cc
@@ -453,7 +453,8 @@ static void detect_workarounds()
   /* There is a bug on older Nvidia GPU where GL_ARB_texture_gather
    * is reported to be supported but yield a compile error (see #55802). */
   if (GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_ANY, GPU_DRIVER_ANY) &&
-      !(epoxy_gl_version() >= 40)) {
+      !(epoxy_gl_version() >= 40))
+  {
     GLContext::texture_gather_support = false;
   }
 
diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc
index f067606f06c..aef1e040580 100644
--- a/source/blender/gpu/opengl/gl_texture.cc
+++ b/source/blender/gpu/opengl/gl_texture.cc
@@ -648,7 +648,8 @@ void GLTexture::samplers_update()
         const GPUSamplerFiltering filtering = GPUSamplerFiltering(filtering_i);
 
         if ((filtering & GPU_SAMPLER_FILTERING_ANISOTROPIC) &&
-            (filtering & GPU_SAMPLER_FILTERING_MIPMAP)) {
+            (filtering & GPU_SAMPLER_FILTERING_MIPMAP))
+        {
           glSamplerParameterf(samplers_state_cache_[extend_yz_i][extend_x_i][filtering_i],
                               GL_TEXTURE_MAX_ANISOTROPY_EXT,
                               anisotropic_filter);
@@ -801,7 +802,8 @@ void GLTexture::check_feedback_loop()
       /* Check for when texture is used with texture barrier. */
       GPUAttachment attachment_read = fb->tmp_detached_[type];
       if (attachment.mip <= mip_max_ && attachment.mip >= mip_min_ &&
-          attachment_read.tex == nullptr) {
+          attachment_read.tex == nullptr)
+      {
         char msg[256];
         SNPRINTF(msg,
                  "Feedback loop: Trying to bind a texture (%s) with mip range %d-%d but mip %d is "
diff --git a/source/blender/gpu/shaders/gpu_shader_text_frag.glsl b/source/blender/gpu/shaders/gpu_shader_text_frag.glsl
index f8d7a3ac490..216abbcad93 100644
--- a/source/blender/gpu/shaders/gpu_shader_text_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_text_frag.glsl
@@ -4,7 +4,7 @@
 
 #pragma BLENDER_REQUIRE(gpu_shader_colorspace_lib.glsl)
 
-//#define GPU_NEAREST
+// #define GPU_NEAREST
 #define sample_glyph_offset(texel, ofs) \
   texture_1D_custom_bilinear_filter(texCoord_interp + ofs * texel)
 
diff --git a/source/blender/gpu/vulkan/vk_data_conversion.cc b/source/blender/gpu/vulkan/vk_data_conversion.cc
index fdc2d57e967..cde2400636c 100644
--- a/source/blender/gpu/vulkan/vk_data_conversion.cc
+++ b/source/blender/gpu/vulkan/vk_data_conversion.cc
@@ -621,8 +621,7 @@ using SRGBA8 = PixelValue>;
 using FLOAT3 = PixelValue;
 using FLOAT4 = PixelValue>;
 /* NOTE: Vulkan stores R11_G11_B10 in reverse component order. */
-class B10F_G11G_R11F : public PixelValue {
-};
+class B10F_G11G_R11F : public PixelValue {};
 
 class HALF4 : public PixelValue {
  public:
diff --git a/source/blender/gpu/vulkan/vk_shader.cc b/source/blender/gpu/vulkan/vk_shader.cc
index 773c222ac8b..e2fea688c7f 100644
--- a/source/blender/gpu/vulkan/vk_shader.cc
+++ b/source/blender/gpu/vulkan/vk_shader.cc
@@ -1086,7 +1086,8 @@ std::string VKShader::vertex_interface_declare(const shader::ShaderCreateInfo &i
     ss << "layout(location=" << (location++) << ") out int gpu_Layer;\n ";
   }
   if (workarounds.shader_output_viewport_index &&
-      bool(info.builtins_ & BuiltinBits::VIEWPORT_INDEX)) {
+      bool(info.builtins_ & BuiltinBits::VIEWPORT_INDEX))
+  {
     ss << "layout(location=" << (location++) << ") out int gpu_ViewportIndex;\n";
   }
   if (bool(info.builtins_ & BuiltinBits::BARYCENTRIC_COORD)) {
@@ -1132,7 +1133,8 @@ std::string VKShader::fragment_interface_declare(const shader::ShaderCreateInfo
     ss << "#define gpu_Layer gl_Layer\n";
   }
   if (workarounds.shader_output_viewport_index &&
-      bool(info.builtins_ & BuiltinBits::VIEWPORT_INDEX)) {
+      bool(info.builtins_ & BuiltinBits::VIEWPORT_INDEX))
+  {
     ss << "#define gpu_ViewportIndex gl_ViewportIndex\n";
   }
 
diff --git a/source/blender/ikplugin/intern/iksolver_plugin.cc b/source/blender/ikplugin/intern/iksolver_plugin.cc
index 3f612170c44..c8fc7823e6d 100644
--- a/source/blender/ikplugin/intern/iksolver_plugin.cc
+++ b/source/blender/ikplugin/intern/iksolver_plugin.cc
@@ -158,7 +158,8 @@ static void initialize_posetree(Object * /*ob*/, bPoseChannel *pchan_tip)
           break;
         }
         for (; a < size && t < tree->totchannel && tree->pchan[t] == chanlist[segcount - a - 1];
-             a++, t++) {
+             a++, t++)
+        {
           /* pass */
         }
       }
diff --git a/source/blender/ikplugin/intern/itasc_plugin.cc b/source/blender/ikplugin/intern/itasc_plugin.cc
index 6055a073fca..5ec04ac7fd4 100644
--- a/source/blender/ikplugin/intern/itasc_plugin.cc
+++ b/source/blender/ikplugin/intern/itasc_plugin.cc
@@ -314,7 +314,8 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co
         break;
       }
       for (; a < size && t < tree->totchannel && tree->pchan[t] == chanlist[segcount - a - 1];
-           a++, t++) {
+           a++, t++)
+      {
         /* pass */
       }
     }
diff --git a/source/blender/imbuf/intern/colormanagement.cc b/source/blender/imbuf/intern/colormanagement.cc
index 11a09ed944d..6a2c5527425 100644
--- a/source/blender/imbuf/intern/colormanagement.cc
+++ b/source/blender/imbuf/intern/colormanagement.cc
@@ -1572,7 +1572,8 @@ static void display_buffer_apply_get_linear_buffer(DisplayBufferThread *handle,
 
     /* first convert byte buffer to float, keep in image space */
     for (i = 0, fp = linear_buffer, cp = byte_buffer; i != i_last;
-         i++, fp += channels, cp += channels) {
+         i++, fp += channels, cp += channels)
+    {
       if (channels == 3) {
         rgb_uchar_to_float(fp, cp);
       }
diff --git a/source/blender/imbuf/intern/imbuf.h b/source/blender/imbuf/intern/imbuf.h
index c5fe353c118..ea81c9743db 100644
--- a/source/blender/imbuf/intern/imbuf.h
+++ b/source/blender/imbuf/intern/imbuf.h
@@ -28,7 +28,7 @@
 
 #define SWAP_SHORT(x) (((x & 0xff) << 8) | ((x >> 8) & 0xff))
 #define SWAP_LONG(x) \
-  (((x) << 24) | (((x)&0xff00) << 8) | (((x) >> 8) & 0xff00) | (((x) >> 24) & 0xff))
+  (((x) << 24) | (((x) & 0xff00) << 8) | (((x) >> 8) & 0xff00) | (((x) >> 24) & 0xff))
 
 #define ENDIAN_NOP(x) (x)
 
diff --git a/source/blender/imbuf/intern/iris.cc b/source/blender/imbuf/intern/iris.cc
index 1f16947db88..620dc62bb65 100644
--- a/source/blender/imbuf/intern/iris.cc
+++ b/source/blender/imbuf/intern/iris.cc
@@ -59,9 +59,9 @@ BLI_STATIC_ASSERT(sizeof(IMAGE) == HEADER_SIZE, "Invalid header size");
 #define BPPMASK 0x00ff
 // #define ITYPE_VERBATIM      0x0000 /* UNUSED */
 #define ITYPE_RLE 0x0100
-#define ISRLE(type) (((type)&0xff00) == ITYPE_RLE)
+#define ISRLE(type) (((type) & 0xff00) == ITYPE_RLE)
 // #define ISVERBATIM(type)    (((type) & 0xff00) == ITYPE_VERBATIM)
-#define BPP(type) ((type)&BPPMASK)
+#define BPP(type) ((type) & BPPMASK)
 #define RLE(bpp) (ITYPE_RLE | (bpp))
 // #define VERBATIM(bpp)       (ITYPE_VERBATIM | (bpp)) /* UNUSED */
 // #define IBUFSIZE(pixels)    ((pixels + (pixels >> 6)) << 2) /* UNUSED */
diff --git a/source/blender/imbuf/intern/openexr/openexr_stub.cpp b/source/blender/imbuf/intern/openexr/openexr_stub.cpp
index 412f796f9aa..b5d14a19f6f 100644
--- a/source/blender/imbuf/intern/openexr/openexr_stub.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_stub.cpp
@@ -87,15 +87,15 @@ void IMB_exr_clear_channels(void * /*handle*/) {}
 
 void IMB_exr_multilayer_convert(void * /*handle*/,
                                 void * /*base*/,
-                                void *(*/*addview*/)(void *base, const char *str),
-                                void *(*/*addlayer*/)(void *base, const char *str),
-                                void (*/*addpass*/)(void *base,
-                                                    void *lay,
-                                                    const char *str,
-                                                    float *rect,
-                                                    int totchan,
-                                                    const char *chan_id,
-                                                    const char *view))
+                                void *(* /*addview*/)(void *base, const char *str),
+                                void *(* /*addlayer*/)(void *base, const char *str),
+                                void (* /*addpass*/)(void *base,
+                                                     void *lay,
+                                                     const char *str,
+                                                     float *rect,
+                                                     int totchan,
+                                                     const char *chan_id,
+                                                     const char *view))
 {
 }
 
diff --git a/source/blender/io/alembic/intern/abc_util.cc b/source/blender/io/alembic/intern/abc_util.cc
index 74c557972fb..e3a16df29d8 100644
--- a/source/blender/io/alembic/intern/abc_util.cc
+++ b/source/blender/io/alembic/intern/abc_util.cc
@@ -147,7 +147,7 @@ std::optional get_sample_interpolation_settings(
   return SampleInterpolationSettings{i0, i1, bias};
 }
 
-//#define USE_NURBS
+// #define USE_NURBS
 
 AbcObjectReader *create_reader(const Alembic::AbcGeom::IObject &object, ImportSettings &settings)
 {
diff --git a/source/blender/io/avi/intern/avi.cc b/source/blender/io/avi/intern/avi.cc
index 94c00e1cab0..a4f4d21cd91 100644
--- a/source/blender/io/avi/intern/avi.cc
+++ b/source/blender/io/avi/intern/avi.cc
@@ -70,7 +70,7 @@ uint GET_TCC(FILE *fp)
 
 char *fcc_to_char(uint fcc)
 {
-  DEBUG_FCC[0] = (fcc)&127;
+  DEBUG_FCC[0] = (fcc) & 127;
   DEBUG_FCC[1] = (fcc >> 8) & 127;
   DEBUG_FCC[2] = (fcc >> 16) & 127;
   DEBUG_FCC[3] = (fcc >> 24) & 127;
@@ -80,7 +80,7 @@ char *fcc_to_char(uint fcc)
 
 char *tcc_to_char(uint tcc)
 {
-  DEBUG_FCC[0] = (tcc)&127;
+  DEBUG_FCC[0] = (tcc) & 127;
   DEBUG_FCC[1] = (tcc >> 8) & 127;
   DEBUG_FCC[2] = 0;
   DEBUG_FCC[3] = 0;
@@ -643,7 +643,8 @@ void *AVI_read_frame(AviMovie *movie, AviFormat format, int frame, int stream)
 
     while (cur_frame < frame && i < movie->index_entries) {
       if (fcc_is_data(movie->entries[i].ChunkId) &&
-          fcc_get_stream(movie->entries[i].ChunkId) == stream) {
+          fcc_get_stream(movie->entries[i].ChunkId) == stream)
+      {
         if ((cur_frame == frame - 1) && (movie->entries[i].Size == 0)) {
           rewind = 1;
           frame = frame - 1;
diff --git a/source/blender/io/avi/intern/avi_rgb.cc b/source/blender/io/avi/intern/avi_rgb.cc
index 118f3618c5c..c9dbf48e830 100644
--- a/source/blender/io/avi/intern/avi_rgb.cc
+++ b/source/blender/io/avi/intern/avi_rgb.cc
@@ -96,7 +96,8 @@ void *avi_converter_from_avi_rgb(AviMovie *movie, int stream, uchar *buffer, con
     }
 
     for (size_t y = 0; y < size_t(movie->header->Height) * size_t(movie->header->Width) * 3;
-         y += 3) {
+         y += 3)
+    {
       int i = buf[y];
       buf[y] = buf[y + 2];
       buf[y + 2] = i;
diff --git a/source/blender/io/collada/AnimationImporter.h b/source/blender/io/collada/AnimationImporter.h
index 5d2eb536cd7..1959bf9a5ea 100644
--- a/source/blender/io/collada/AnimationImporter.h
+++ b/source/blender/io/collada/AnimationImporter.h
@@ -31,7 +31,7 @@
 #include "DNA_object_types.h"
 #include "DNA_scene_types.h"
 
-//#include "ArmatureImporter.h"
+// #include "ArmatureImporter.h"
 #include "TransformReader.h"
 
 #include "collada_internal.h"
diff --git a/source/blender/io/collada/ArmatureImporter.cpp b/source/blender/io/collada/ArmatureImporter.cpp
index 3972c888081..51c2f4bb934 100644
--- a/source/blender/io/collada/ArmatureImporter.cpp
+++ b/source/blender/io/collada/ArmatureImporter.cpp
@@ -641,7 +641,8 @@ Object *ArmatureImporter::create_armature_bones(Main *bmain, SkinInfo &skin)
           &skin, node, nullptr, node->getChildNodes().getCount(), nullptr, armature, layer_labels);
 
       if (joint_parent_map.find(node->getUniqueId()) != joint_parent_map.end() &&
-          !skin.get_parent()) {
+          !skin.get_parent())
+      {
         skin.set_parent(joint_parent_map[node->getUniqueId()]);
       }
     }
@@ -799,7 +800,8 @@ void ArmatureImporter::make_armatures(bContext *C, std::vector &object
         }
 
         if (std::find(objects_to_scale.begin(), objects_to_scale.end(), ob_arm) ==
-            objects_to_scale.end()) {
+            objects_to_scale.end())
+        {
           objects_to_scale.push_back(ob_arm);
         }
 
diff --git a/source/blender/io/collada/ControllerExporter.h b/source/blender/io/collada/ControllerExporter.h
index c4e7e0ff0e4..1ae12c35602 100644
--- a/source/blender/io/collada/ControllerExporter.h
+++ b/source/blender/io/collada/ControllerExporter.h
@@ -10,7 +10,7 @@
 
 #include 
 #include 
-//#include 
+// #include 
 
 #include "COLLADASWExtraTechnique.h"
 #include "COLLADASWInputList.h"
diff --git a/source/blender/io/collada/ErrorHandler.cpp b/source/blender/io/collada/ErrorHandler.cpp
index e716c12bd49..536d1429fbf 100644
--- a/source/blender/io/collada/ErrorHandler.cpp
+++ b/source/blender/io/collada/ErrorHandler.cpp
@@ -58,7 +58,8 @@ bool ErrorHandler::handleError(const COLLADASaxFWL::IError *error)
     }
 
     else if (parserError.getErrorType() ==
-             GeneratedSaxParser::ParserError::ERROR_COULD_NOT_OPEN_FILE) {
+             GeneratedSaxParser::ParserError::ERROR_COULD_NOT_OPEN_FILE)
+    {
       isError = true;
       error_context = "File access";
     }
diff --git a/source/blender/io/collada/MeshImporter.cpp b/source/blender/io/collada/MeshImporter.cpp
index ce230fa409f..bf97197f855 100644
--- a/source/blender/io/collada/MeshImporter.cpp
+++ b/source/blender/io/collada/MeshImporter.cpp
@@ -328,7 +328,8 @@ bool MeshImporter::is_nice_mesh(COLLADAFW::Mesh *mesh)
 
     else if (!ELEM(type,
                    COLLADAFW::MeshPrimitive::TRIANGLES,
-                   COLLADAFW::MeshPrimitive::TRIANGLE_FANS)) {
+                   COLLADAFW::MeshPrimitive::TRIANGLE_FANS))
+    {
       fprintf(stderr, "ERROR: Primitive type %s is not supported.\n", type_str);
       return false;
     }
@@ -721,7 +722,8 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh,
         }
 
         for (uint uvset_index = 0; uvset_index < index_list_array_uvcoord.getCount();
-             uvset_index++) {
+             uvset_index++)
+        {
           COLLADAFW::IndexList &index_list = *index_list_array_uvcoord[uvset_index];
           blender::float2 *mloopuv = static_cast(
               CustomData_get_layer_named_for_write(&mesh->corner_data,
diff --git a/source/blender/io/common/intern/hierarchy_context_order_test.cc b/source/blender/io/common/intern/hierarchy_context_order_test.cc
index 53ba43c6ef2..2c781a15a17 100644
--- a/source/blender/io/common/intern/hierarchy_context_order_test.cc
+++ b/source/blender/io/common/intern/hierarchy_context_order_test.cc
@@ -18,8 +18,7 @@ Object *fake_pointer(int value)
 
 }  // namespace
 
-class HierarchyContextOrderTest : public testing::Test {
-};
+class HierarchyContextOrderTest : public testing::Test {};
 
 TEST_F(HierarchyContextOrderTest, ObjectPointerTest)
 {
diff --git a/source/blender/io/common/intern/object_identifier_test.cc b/source/blender/io/common/intern/object_identifier_test.cc
index 22e8f2ef570..01910ce943b 100644
--- a/source/blender/io/common/intern/object_identifier_test.cc
+++ b/source/blender/io/common/intern/object_identifier_test.cc
@@ -60,8 +60,7 @@ class TestObjectIdentifier : public ObjectIdentifier {
 
 }  // namespace
 
-class ObjectIdentifierOrderTest : public testing::Test {
-};
+class ObjectIdentifierOrderTest : public testing::Test {};
 
 TEST_F(ObjectIdentifierOrderTest, graph_root)
 {
@@ -171,8 +170,7 @@ TEST_F(ObjectIdentifierOrderTest, map_copy_and_update)
   EXPECT_EQ(5, graph.size());
 }
 
-class PersistentIDTest : public testing::Test {
-};
+class PersistentIDTest : public testing::Test {};
 
 TEST_F(PersistentIDTest, is_from_same_instancer)
 {
diff --git a/source/blender/io/gpencil/intern/gpencil_io_base.cc b/source/blender/io/gpencil/intern/gpencil_io_base.cc
index 3e49dd93535..77437c7372e 100644
--- a/source/blender/io/gpencil/intern/gpencil_io_base.cc
+++ b/source/blender/io/gpencil/intern/gpencil_io_base.cc
@@ -189,7 +189,8 @@ bool GpencilIO::gpencil_3D_point_to_screen_space(const float3 co, float2 &r_co)
   float2 screen_co;
   eV3DProjTest test = (eV3DProjTest)(V3D_PROJ_RET_OK);
   if (ED_view3d_project_float_global(params_.region, parent_co, screen_co, test) ==
-      V3D_PROJ_RET_OK) {
+      V3D_PROJ_RET_OK)
+  {
     if (!ELEM(V2D_IS_CLIPPED, screen_co[0], screen_co[1])) {
       r_co = screen_co;
       /* Invert X axis. */
diff --git a/source/blender/io/gpencil/intern/gpencil_io_capi.cc b/source/blender/io/gpencil/intern/gpencil_io_capi.cc
index 0997aac03be..fe73a5ba165 100644
--- a/source/blender/io/gpencil/intern/gpencil_io_capi.cc
+++ b/source/blender/io/gpencil/intern/gpencil_io_capi.cc
@@ -109,7 +109,8 @@ static bool gpencil_io_export_pdf(Depsgraph *depsgraph,
     case GP_EXPORT_FRAME_SCENE: {
       for (int32_t i = iparams->frame_start; i < iparams->frame_end + 1; i++) {
         if ((iparams->frame_mode == GP_EXPORT_FRAME_SELECTED) &&
-            !is_keyframe_included(gpd_eval, i, true)) {
+            !is_keyframe_included(gpd_eval, i, true))
+        {
           continue;
         }
 
diff --git a/source/blender/io/ply/importer/ply_import.cc b/source/blender/io/ply/importer/ply_import.cc
index bbb8c5380b7..1514eac0666 100644
--- a/source/blender/io/ply/importer/ply_import.cc
+++ b/source/blender/io/ply/importer/ply_import.cc
@@ -147,7 +147,8 @@ const char *read_header(PlyReadBuffer &file, PlyHeader &r_header)
       break;
     }
     else if (line.is_empty() || (line.first() >= '0' && line.first() <= '9') ||
-             line.first() == '-') {
+             line.first() == '-')
+    {
       /* A value was found before we broke out of the loop. No end_header. */
       return "No end_header.";
     }
diff --git a/source/blender/io/usd/intern/usd_hierarchy_iterator.cc b/source/blender/io/usd/intern/usd_hierarchy_iterator.cc
index ac44414eead..e85adbacafd 100644
--- a/source/blender/io/usd/intern/usd_hierarchy_iterator.cc
+++ b/source/blender/io/usd/intern/usd_hierarchy_iterator.cc
@@ -197,7 +197,8 @@ void USDHierarchyIterator::add_usd_skel_export_mapping(const Object *obj, const
   }
 
   if (params_.export_armatures && obj->type == OB_MESH &&
-      can_export_skinned_mesh(*obj, depsgraph_)) {
+      can_export_skinned_mesh(*obj, depsgraph_))
+  {
     skinned_mesh_export_map_.add(obj, path);
   }
 }
diff --git a/source/blender/io/usd/intern/usd_reader_light.cc b/source/blender/io/usd/intern/usd_reader_light.cc
index 7559f7eff3e..1f51392fe9a 100644
--- a/source/blender/io/usd/intern/usd_reader_light.cc
+++ b/source/blender/io/usd/intern/usd_reader_light.cc
@@ -104,7 +104,8 @@ void USDLightReader::read_object_data(Main *bmain, const double motionSampleTime
       pxr::UsdAttribute treatAsPoint_attr = sphere_light.GetTreatAsPointAttr();
       bool treatAsPoint;
       if (treatAsPoint_attr && treatAsPoint_attr.Get(&treatAsPoint, motionSampleTime) &&
-          treatAsPoint) {
+          treatAsPoint)
+      {
         blight->radius = 0.0f;
       }
       else if (pxr::UsdAttribute radius_attr = sphere_light.GetRadiusAttr()) {
diff --git a/source/blender/io/usd/intern/usd_reader_material.cc b/source/blender/io/usd/intern/usd_reader_material.cc
index 207e4cc71be..42412f2c7d6 100644
--- a/source/blender/io/usd/intern/usd_reader_material.cc
+++ b/source/blender/io/usd/intern/usd_reader_material.cc
@@ -556,7 +556,8 @@ void USDMaterialReader::set_principled_node_inputs(bNode *principled,
   float emission_strength = 0.0f;
   if (pxr::UsdShadeInput emissive_input = usd_shader.GetInput(usdtokens::emissiveColor)) {
     if (set_node_input(
-            emissive_input, principled, "Emission Color", ntree, column, &context, true)) {
+            emissive_input, principled, "Emission Color", ntree, column, &context, true))
+    {
       emission_strength = 1.0f;
     }
   }
@@ -1058,7 +1059,8 @@ void USDMaterialReader::convert_usd_primvar_reader_float2(const pxr::UsdShadeSha
      * and use that instead if so. */
     if (varname_input) {
       for (const pxr::UsdShadeConnectionSourceInfo &source_info :
-           varname_input.GetConnectedSources()) {
+           varname_input.GetConnectedSources())
+      {
         pxr::UsdShadeShader shader = pxr::UsdShadeShader(source_info.source.GetPrim());
         pxr::UsdShadeInput secondary_varname_input = shader.GetInput(source_info.sourceName);
         if (secondary_varname_input) {
diff --git a/source/blender/io/usd/intern/usd_reader_stage.cc b/source/blender/io/usd/intern/usd_reader_stage.cc
index 7f0d3dc4318..fc66c9de871 100644
--- a/source/blender/io/usd/intern/usd_reader_stage.cc
+++ b/source/blender/io/usd/intern/usd_reader_stage.cc
@@ -286,7 +286,8 @@ static bool merge_with_parent(USDPrimReader *reader)
 
   /* Don't merge Xform and Scope prims. */
   if (xform_reader->prim().IsA() ||
-      xform_reader->prim().IsA()) {
+      xform_reader->prim().IsA())
+  {
     return false;
   }
 
diff --git a/source/blender/io/usd/intern/usd_writer_mesh.cc b/source/blender/io/usd/intern/usd_writer_mesh.cc
index 727fa50c9a5..c6657f0d0ba 100644
--- a/source/blender/io/usd/intern/usd_writer_mesh.cc
+++ b/source/blender/io/usd/intern/usd_writer_mesh.cc
@@ -551,7 +551,8 @@ void USDGenericMeshWriter::write_mesh(HierarchyContext &context,
    * unless a subdiv modifier is used, in which case normals are computed,
    * not stored with the mesh. */
   if (usd_export_context_.export_params.export_normals &&
-      subdiv_scheme == pxr::UsdGeomTokens->none) {
+      subdiv_scheme == pxr::UsdGeomTokens->none)
+  {
     write_normals(mesh, usd_mesh);
   }
 
diff --git a/source/blender/io/usd/tests/usd_imaging_test.cc b/source/blender/io/usd/tests/usd_imaging_test.cc
index c7d79f3f268..28f9e7056f2 100644
--- a/source/blender/io/usd/tests/usd_imaging_test.cc
+++ b/source/blender/io/usd/tests/usd_imaging_test.cc
@@ -9,8 +9,7 @@
 
 namespace blender::io::usd {
 
-class USDImagingTest : public testing::Test {
-};
+class USDImagingTest : public testing::Test {};
 
 TEST_F(USDImagingTest, CapsuleAdapterTest)
 {
diff --git a/source/blender/io/usd/tests/usd_stage_creation_test.cc b/source/blender/io/usd/tests/usd_stage_creation_test.cc
index a029c4c01dd..531f2130d4d 100644
--- a/source/blender/io/usd/tests/usd_stage_creation_test.cc
+++ b/source/blender/io/usd/tests/usd_stage_creation_test.cc
@@ -15,8 +15,7 @@
 
 namespace blender::io::usd {
 
-class USDStageCreationTest : public testing::Test {
-};
+class USDStageCreationTest : public testing::Test {};
 
 TEST_F(USDStageCreationTest, JSONFileLoadingTest)
 {
diff --git a/source/blender/makesdna/DNA_boid_types.h b/source/blender/makesdna/DNA_boid_types.h
index a0b646674e0..a2f0388e064 100644
--- a/source/blender/makesdna/DNA_boid_types.h
+++ b/source/blender/makesdna/DNA_boid_types.h
@@ -210,9 +210,9 @@ enum {
 };
 
 /* boidrule->options */
-//#define BOID_RULE_FOLLOW_LINE     (1 << 0)        /* follow leader */
-//#define BOID_RULE_PREDICT         (1 << 1)        /* goal/avoid */
-//#define BOID_RULE_ARRIVAL         (1 << 2)        /* goal */
-//#define BOID_RULE_LAND            (1 << 3)        /* goal */
-//#define BOID_RULE_WITH_BOIDS      (1 << 4)        /* avoid collision */
-//#define BOID_RULE_WITH_DEFLECTORS (1 << 5)    /* avoid collision */
+// #define BOID_RULE_FOLLOW_LINE     (1 << 0)        /* follow leader */
+// #define BOID_RULE_PREDICT         (1 << 1)        /* goal/avoid */
+// #define BOID_RULE_ARRIVAL         (1 << 2)        /* goal */
+// #define BOID_RULE_LAND            (1 << 3)        /* goal */
+// #define BOID_RULE_WITH_BOIDS      (1 << 4)        /* avoid collision */
+// #define BOID_RULE_WITH_DEFLECTORS (1 << 5)    /* avoid collision */
diff --git a/source/blender/makesdna/DNA_defs.h b/source/blender/makesdna/DNA_defs.h
index 1217f055e1e..3d808c4e79d 100644
--- a/source/blender/makesdna/DNA_defs.h
+++ b/source/blender/makesdna/DNA_defs.h
@@ -87,8 +87,7 @@ template class ShallowDataConstRef {
   const T &ref_;
 };
 
-class ShallowZeroInitializeTag {
-};
+class ShallowZeroInitializeTag {};
 
 }  // namespace blender::dna::internal
 
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 6439ccb884e..e55911bd0bf 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -119,7 +119,7 @@ typedef struct ReportTimerInfo {
   float flash_progress;
 } ReportTimerInfo;
 
-//#ifdef WITH_XR_OPENXR
+// #ifdef WITH_XR_OPENXR
 typedef struct wmXrData {
   /** Runtime information for managing Blender specific behaviors. */
   struct wmXrRuntimeData *runtime;
@@ -127,7 +127,7 @@ typedef struct wmXrData {
    * even before the session runs. */
   XrSessionSettings session_settings;
 } wmXrData;
-//#endif
+// #endif
 
 /* reports need to be before wmWindowManager */
 
@@ -213,9 +213,9 @@ typedef struct wmWindowManager {
 
   struct wmMsgBus *message_bus;
 
-  //#ifdef WITH_XR_OPENXR
+  // #ifdef WITH_XR_OPENXR
   wmXrData xr;
-  //#endif
+  // #endif
 } wmWindowManager;
 
 #define WM_KEYCONFIG_ARRAY_P(wm) &(wm)->defaultconf, &(wm)->addonconf, &(wm)->userconf
diff --git a/source/blender/makesdna/intern/dna_defaults.c b/source/blender/makesdna/intern/dna_defaults.c
index 65a9230e238..82dfa47d76d 100644
--- a/source/blender/makesdna/intern/dna_defaults.c
+++ b/source/blender/makesdna/intern/dna_defaults.c
@@ -336,7 +336,7 @@ extern const bTheme U_theme_default;
  * Prevent assigning the wrong struct types since all elements in #DNA_default_table are `void *`.
  */
 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
-#  define SDNA_TYPE_CHECKED(v, t) (&(v) + (_Generic((v), t : 0)))
+#  define SDNA_TYPE_CHECKED(v, t) (&(v) + (_Generic((v), t: 0)))
 #else
 #  define SDNA_TYPE_CHECKED(v, t) (&(v))
 #endif
diff --git a/source/blender/makesdna/intern/makesdna.cc b/source/blender/makesdna/intern/makesdna.cc
index 6058dc98299..23abbed0c44 100644
--- a/source/blender/makesdna/intern/makesdna.cc
+++ b/source/blender/makesdna/intern/makesdna.cc
@@ -188,7 +188,8 @@ static bool match_identifier_with_len(const char *str,
   if (strncmp(str, identifier, identifier_len) == 0) {
     /* Check `str` isn't a prefix to a longer identifier. */
     if (isdigit(str[identifier_len]) || isalpha(str[identifier_len]) ||
-        (str[identifier_len] == '_')) {
+        (str[identifier_len] == '_'))
+    {
       return false;
     }
     return true;
diff --git a/source/blender/makesrna/RNA_types.hh b/source/blender/makesrna/RNA_types.hh
index 16d82e6cba0..2e4ad9da3fd 100644
--- a/source/blender/makesrna/RNA_types.hh
+++ b/source/blender/makesrna/RNA_types.hh
@@ -108,7 +108,7 @@ enum PropertyScaleType {
   PROP_SCALE_CUBIC = 2,
 };
 
-#define RNA_SUBTYPE_UNIT(subtype) ((subtype)&0x00FF0000)
+#define RNA_SUBTYPE_UNIT(subtype) ((subtype) & 0x00FF0000)
 #define RNA_SUBTYPE_VALUE(subtype) ((subtype) & ~0x00FF0000)
 #define RNA_SUBTYPE_UNIT_VALUE(subtype) ((subtype) >> 16)
 
diff --git a/source/blender/makesrna/intern/makesrna.cc b/source/blender/makesrna/intern/makesrna.cc
index 1c6e13dd7f3..5949b907cc2 100644
--- a/source/blender/makesrna/intern/makesrna.cc
+++ b/source/blender/makesrna/intern/makesrna.cc
@@ -1538,7 +1538,8 @@ static char *rna_def_property_length_func(
   else if (prop->type == PROP_COLLECTION) {
     if (!manualfunc) {
       if (prop->type == PROP_COLLECTION &&
-          (!(dp->dnalengthname || dp->dnalengthfixed) || !dp->dnaname)) {
+          (!(dp->dnalengthname || dp->dnalengthfixed) || !dp->dnaname))
+      {
         CLOG_ERROR(&LOG, "%s.%s has no valid dna info.", srna->identifier, prop->identifier);
         DefRNA.error = true;
         return nullptr;
@@ -4229,7 +4230,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
        * we'll probably have to revisit. :/ */
       StructRNA *type = rna_find_struct((const char *)pprop->type);
       if (type && (type->flag & STRUCT_ID) &&
-          !(prop->flag_internal & PROP_INTERN_PTR_OWNERSHIP_FORCED)) {
+          !(prop->flag_internal & PROP_INTERN_PTR_OWNERSHIP_FORCED))
+      {
         RNA_def_property_flag(prop, PROP_PTR_NO_OWNERSHIP);
       }
       break;
@@ -4241,7 +4243,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
        * we'll probably have to revisit. :/ */
       StructRNA *type = rna_find_struct((const char *)cprop->item_type);
       if (type && (type->flag & STRUCT_ID) &&
-          !(prop->flag_internal & PROP_INTERN_PTR_OWNERSHIP_FORCED)) {
+          !(prop->flag_internal & PROP_INTERN_PTR_OWNERSHIP_FORCED))
+      {
         RNA_def_property_flag(prop, PROP_PTR_NO_OWNERSHIP);
       }
       break;
diff --git a/source/blender/makesrna/intern/rna_access_compare_override.cc b/source/blender/makesrna/intern/rna_access_compare_override.cc
index 57d6c051932..3c601a2cfd7 100644
--- a/source/blender/makesrna/intern/rna_access_compare_override.cc
+++ b/source/blender/makesrna/intern/rna_access_compare_override.cc
@@ -26,7 +26,7 @@
 #include "BLI_string.h"
 #include "BLI_utildefines.h"
 
-//#define DEBUG_OVERRIDE_TIMEIT
+// #define DEBUG_OVERRIDE_TIMEIT
 
 #ifdef DEBUG_OVERRIDE_TIMEIT
 #  include "PIL_time_utildefines.h"
@@ -709,7 +709,8 @@ bool RNA_struct_override_matches(Main *bmain,
     }
 
     if (!prop_local.is_idprop &&
-        RNA_property_override_flag(prop_local.rnaprop) & PROPOVERRIDE_IGNORE) {
+        RNA_property_override_flag(prop_local.rnaprop) & PROPOVERRIDE_IGNORE)
+    {
       continue;
     }
 
@@ -835,7 +836,8 @@ bool RNA_struct_override_matches(Main *bmain,
       }
 
       if ((do_restore || do_tag_for_restore) &&
-          (report_flags & RNA_OVERRIDE_MATCH_RESULT_CREATED) == 0) {
+          (report_flags & RNA_OVERRIDE_MATCH_RESULT_CREATED) == 0)
+      {
         /* We are allowed to restore to reference's values. */
         if (ELEM(nullptr, op, opop) || opop->operation == LIBOVERRIDE_OP_NOOP) {
           if (RNA_property_editable(ptr_local, rawprop)) {
@@ -1600,7 +1602,8 @@ void RNA_struct_override_apply(Main *bmain,
         }
         else if (op->rna_prop_type == PROP_COLLECTION) {
           if (RNA_struct_is_ID(
-                  RNA_property_pointer_type(&rnaapply_ctx.ptr_src, rnaapply_ctx.prop_src))) {
+                  RNA_property_pointer_type(&rnaapply_ctx.ptr_src, rnaapply_ctx.prop_src)))
+          {
             BLI_assert(id_ptr_src->owner_id ==
                        rna_property_override_property_real_id_owner(
                            bmain, &rnaapply_ctx.ptr_src, nullptr, nullptr));
diff --git a/source/blender/makesrna/intern/rna_animation.cc b/source/blender/makesrna/intern/rna_animation.cc
index 2f3394986ad..8fb25ae3e07 100644
--- a/source/blender/makesrna/intern/rna_animation.cc
+++ b/source/blender/makesrna/intern/rna_animation.cc
@@ -452,7 +452,8 @@ static void rna_KeyingSet_name_set(PointerRNA *ptr, const char *value)
            * conflicts
            */
           for (agrp = static_cast(adt->action->groups.first); agrp;
-               agrp = agrp->next) {
+               agrp = agrp->next)
+          {
             if (STREQ(ks->name, agrp->name)) {
               /* there should only be one of these in the action, so can stop... */
               STRNCPY(agrp->name, value);
diff --git a/source/blender/makesrna/intern/rna_attribute.cc b/source/blender/makesrna/intern/rna_attribute.cc
index 64cfeeb4075..3901a121fb2 100644
--- a/source/blender/makesrna/intern/rna_attribute.cc
+++ b/source/blender/makesrna/intern/rna_attribute.cc
@@ -258,7 +258,8 @@ const EnumPropertyItem *rna_enum_attribute_domain_itemf(ID *id,
       continue;
     }
     if (id_type == ID_CV &&
-        !ELEM(domain_item->value, int(AttrDomain::Point), int(AttrDomain::Curve))) {
+        !ELEM(domain_item->value, int(AttrDomain::Point), int(AttrDomain::Curve)))
+    {
       continue;
     }
     if (id_type == ID_ME && ELEM(domain_item->value, int(AttrDomain::Curve))) {
diff --git a/source/blender/makesrna/intern/rna_curve.cc b/source/blender/makesrna/intern/rna_curve.cc
index fd8f337fc02..370da7f6d96 100644
--- a/source/blender/makesrna/intern/rna_curve.cc
+++ b/source/blender/makesrna/intern/rna_curve.cc
@@ -176,7 +176,8 @@ static Nurb *curve_nurb_from_point(Curve *cu, const void *point, int *nu_index,
   for (nu = static_cast(nurbs->first); nu; nu = nu->next, i++) {
     if (nu->type == CU_BEZIER) {
       if (point >= static_cast(nu->bezt) &&
-          point < static_cast(nu->bezt + nu->pntsu)) {
+          point < static_cast(nu->bezt + nu->pntsu))
+      {
         break;
       }
     }
diff --git a/source/blender/makesrna/intern/rna_fluid.cc b/source/blender/makesrna/intern/rna_fluid.cc
index 3c1bb273474..4d080d486a4 100644
--- a/source/blender/makesrna/intern/rna_fluid.cc
+++ b/source/blender/makesrna/intern/rna_fluid.cc
@@ -464,7 +464,8 @@ static void rna_Fluid_combined_export_update(Main *bmain, Scene *scene, PointerR
     }
   }
   else if (fmd->domain->sndparticle_combined_export ==
-           SNDPARTICLE_COMBINED_EXPORT_SPRAY_FOAM_BUBBLE) {
+           SNDPARTICLE_COMBINED_EXPORT_SPRAY_FOAM_BUBBLE)
+  {
     if (ob->type == OB_MESH && !rna_Fluid_parts_exists(ptr, PART_FLUID_SPRAYFOAMBUBBLE)) {
 
       rna_Fluid_parts_create(bmain,
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index cd6a1667f01..a711aab3c3f 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -657,25 +657,30 @@ void rna_RenderPass_rect_set(PointerRNA *ptr, const float *values);
 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
 #  define USE_RNA_RANGE_CHECK
 #  define TYPEOF_MAX(x) \
-    _Generic((x), bool : 1, char \
-             : CHAR_MAX, signed char \
-             : SCHAR_MAX, unsigned char \
-             : UCHAR_MAX, signed short \
-             : SHRT_MAX, unsigned short \
-             : USHRT_MAX, signed int \
-             : INT_MAX, unsigned int \
-             : UINT_MAX, float \
-             : FLT_MAX, double \
-             : DBL_MAX)
+    _Generic((x), \
+        bool: 1, \
+        char: CHAR_MAX, \
+        signed char: SCHAR_MAX, \
+        unsigned char: UCHAR_MAX, \
+        signed short: SHRT_MAX, \
+        unsigned short: USHRT_MAX, \
+        signed int: INT_MAX, \
+        unsigned int: UINT_MAX, \
+        float: FLT_MAX, \
+        double: DBL_MAX)
 
 #  define TYPEOF_MIN(x) \
-    _Generic((x), bool : 0, char \
-             : CHAR_MIN, signed char \
-             : SCHAR_MIN, unsigned char : 0, signed short \
-             : SHRT_MIN, unsigned short : 0, signed int \
-             : INT_MIN, unsigned int : 0, float \
-             : -FLT_MAX, double \
-             : -DBL_MAX)
+    _Generic((x), \
+        bool: 0, \
+        char: CHAR_MIN, \
+        signed char: SCHAR_MIN, \
+        unsigned char: 0, \
+        signed short: SHRT_MIN, \
+        unsigned short: 0, \
+        signed int: INT_MIN, \
+        unsigned int: 0, \
+        float: -FLT_MAX, \
+        double: -DBL_MAX)
 #endif
 
 #ifdef __cplusplus
diff --git a/source/blender/makesrna/intern/rna_key.cc b/source/blender/makesrna/intern/rna_key.cc
index d482931ee95..32cec593c60 100644
--- a/source/blender/makesrna/intern/rna_key.cc
+++ b/source/blender/makesrna/intern/rna_key.cc
@@ -689,7 +689,8 @@ static void rna_Key_update_data(Main *bmain, Scene * /*scene*/, PointerRNA *ptr)
   Object *ob;
 
   for (ob = static_cast(bmain->objects.first); ob;
-       ob = static_cast(ob->id.next)) {
+       ob = static_cast(ob->id.next))
+  {
     if (BKE_key_from_object(ob) == key) {
       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
       WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob);
diff --git a/source/blender/makesrna/intern/rna_lattice.cc b/source/blender/makesrna/intern/rna_lattice.cc
index 20ebfc0eb20..7b85a040d4a 100644
--- a/source/blender/makesrna/intern/rna_lattice.cc
+++ b/source/blender/makesrna/intern/rna_lattice.cc
@@ -126,7 +126,8 @@ static void rna_Lattice_update_size(Main *bmain, Scene *scene, PointerRNA *ptr)
 
   /* #BKE_lattice_resize needs an object, any object will have the same result */
   for (ob = static_cast(bmain->objects.first); ob;
-       ob = static_cast(ob->id.next)) {
+       ob = static_cast(ob->id.next))
+  {
     if (ob->data == lt) {
       BKE_lattice_resize(lt, newu, newv, neww, ob);
       if (lt->editlatt) {
diff --git a/source/blender/makesrna/intern/rna_mask.cc b/source/blender/makesrna/intern/rna_mask.cc
index 070e9c92d5d..3eb0ac8c73c 100644
--- a/source/blender/makesrna/intern/rna_mask.cc
+++ b/source/blender/makesrna/intern/rna_mask.cc
@@ -317,7 +317,8 @@ static MaskSpline *mask_spline_from_point(Mask *mask, MaskSplinePoint *point)
   {
     MaskSpline *spline;
     for (spline = static_cast(mask_layer->splines.first); spline;
-         spline = spline->next) {
+         spline = spline->next)
+    {
       if (point >= spline->points && point < spline->points + spline->tot_point) {
         return spline;
       }
diff --git a/source/blender/makesrna/intern/rna_mesh_utils.hh b/source/blender/makesrna/intern/rna_mesh_utils.hh
index 00329d2aa5d..e2b867d0035 100644
--- a/source/blender/makesrna/intern/rna_mesh_utils.hh
+++ b/source/blender/makesrna/intern/rna_mesh_utils.hh
@@ -86,7 +86,8 @@
       CustomDataLayer *layer; \
       int layer_index = CustomData_get_layer_index(data, layer_type); \
       for (layer = data->layers + layer_index, a = 0; layer_index + a < data->totlayer; \
-           layer++, a++) { \
+           layer++, a++) \
+      { \
         if (value.data == layer) { \
           CustomData_set_layer_##active_type(data, layer_type, a); \
           BKE_mesh_tessface_clear(mesh); \
diff --git a/source/blender/makesrna/intern/rna_node_socket.cc b/source/blender/makesrna/intern/rna_node_socket.cc
index f30d5b045f2..cbe25a863f2 100644
--- a/source/blender/makesrna/intern/rna_node_socket.cc
+++ b/source/blender/makesrna/intern/rna_node_socket.cc
@@ -178,7 +178,7 @@ static StructRNA *rna_NodeSocket_register(Main * /*bmain*/,
     nodeRegisterSocketType(st);
   }
 
-  st->free_self = (void (*)(bNodeSocketType * stype)) MEM_freeN;
+  st->free_self = (void (*)(bNodeSocketType *stype))MEM_freeN;
 
   /* if RNA type is already registered, unregister first */
   if (st->ext_socket.srna) {
diff --git a/source/blender/makesrna/intern/rna_node_tree_interface.cc b/source/blender/makesrna/intern/rna_node_tree_interface.cc
index a8eeccda92f..4ac8edfe4bc 100644
--- a/source/blender/makesrna/intern/rna_node_tree_interface.cc
+++ b/source/blender/makesrna/intern/rna_node_tree_interface.cc
@@ -275,7 +275,7 @@ static StructRNA *rna_NodeTreeInterfaceSocket_register(Main * /*bmain*/,
     nodeRegisterSocketType(st);
   }
 
-  st->free_self = (void (*)(bNodeSocketType * stype)) MEM_freeN;
+  st->free_self = (void (*)(bNodeSocketType *stype))MEM_freeN;
 
   /* if RNA type is already registered, unregister first */
   if (st->ext_interface.srna) {
@@ -689,7 +689,8 @@ static const EnumPropertyItem *rna_subtype_filter_itemf(const blender::Set
   EnumPropertyItem *items = nullptr;
   int items_count = 0;
   for (const EnumPropertyItem *item = rna_enum_property_subtype_items; item->name != nullptr;
-       item++) {
+       item++)
+  {
     if (subtypes.contains(item->value)) {
       RNA_enum_item_add(&items, &items_count, item);
     }
diff --git a/source/blender/makesrna/intern/rna_rna.cc b/source/blender/makesrna/intern/rna_rna.cc
index 4cc560904ab..46ccfeb4d08 100644
--- a/source/blender/makesrna/intern/rna_rna.cc
+++ b/source/blender/makesrna/intern/rna_rna.cc
@@ -305,7 +305,8 @@ static int rna_idproperty_known(CollectionPropertyIterator *iter, void *data)
     for (prop = static_cast(ptype->cont.properties.first); prop; prop = prop->next)
     {
       if ((prop->flag_internal & PROP_INTERN_BUILTIN) == 0 &&
-          STREQ(prop->identifier, idprop->name)) {
+          STREQ(prop->identifier, idprop->name))
+      {
         return 1;
       }
     }
@@ -1545,11 +1546,13 @@ static void rna_property_override_diff_propptr(Main *bmain,
                         id_a->name);
             }
             else if (id_a->override_library != nullptr &&
-                     id_a->override_library->reference == id_b) {
+                     id_a->override_library->reference == id_b)
+            {
               opop->flag |= LIBOVERRIDE_OP_FLAG_IDPOINTER_MATCH_REFERENCE;
             }
             else if (id_b->override_library != nullptr &&
-                     id_b->override_library->reference == id_a) {
+                     id_b->override_library->reference == id_a)
+            {
               opop->flag |= LIBOVERRIDE_OP_FLAG_IDPOINTER_MATCH_REFERENCE;
             }
             else {
@@ -1573,7 +1576,8 @@ static void rna_property_override_diff_propptr(Main *bmain,
        * Note that we do not need the RNA path for insertion operations. */
       if (rna_path) {
         if ((rna_itemname_a && !rna_itemname_a->empty()) &&
-            (rna_itemname_b && !rna_itemname_b->empty())) {
+            (rna_itemname_b && !rna_itemname_b->empty()))
+        {
           BLI_assert(*rna_itemname_a == *rna_itemname_b);
 
           char esc_item_name[RNA_PATH_BUFFSIZE];
diff --git a/source/blender/makesrna/intern/rna_space.cc b/source/blender/makesrna/intern/rna_space.cc
index e1171e281a8..0c02def8604 100644
--- a/source/blender/makesrna/intern/rna_space.cc
+++ b/source/blender/makesrna/intern/rna_space.cc
@@ -1527,7 +1527,8 @@ static void rna_3DViewShading_render_pass_set(PointerRNA *ptr, int value)
     STRNCPY(shading->aov_name, aov->name);
   }
   else if (value == EEVEE_RENDER_PASS_BLOOM &&
-           ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0)) {
+           ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0))
+  {
     shading->render_pass = EEVEE_RENDER_PASS_COMBINED;
   }
   else {
diff --git a/source/blender/makesrna/intern/rna_userdef.cc b/source/blender/makesrna/intern/rna_userdef.cc
index 21274e5be61..5daa118e21f 100644
--- a/source/blender/makesrna/intern/rna_userdef.cc
+++ b/source/blender/makesrna/intern/rna_userdef.cc
@@ -697,7 +697,8 @@ static void rna_UserDef_subdivision_update(Main *bmain, Scene *scene, PointerRNA
   Object *ob;
 
   for (ob = static_cast(bmain->objects.first); ob;
-       ob = static_cast(ob->id.next)) {
+       ob = static_cast(ob->id.next))
+  {
     if (BKE_object_get_last_subsurf_modifier(ob) != nullptr) {
       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
     }
@@ -736,7 +737,8 @@ static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRN
   Object *ob;
 
   for (ob = static_cast(bmain->objects.first); ob;
-       ob = static_cast(ob->id.next)) {
+       ob = static_cast(ob->id.next))
+  {
     if (ob->mode & OB_MODE_WEIGHT_PAINT) {
       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
     }
diff --git a/source/blender/modifiers/intern/MOD_array.cc b/source/blender/modifiers/intern/MOD_array.cc
index 558287f129e..11acf3a9110 100644
--- a/source/blender/modifiers/intern/MOD_array.cc
+++ b/source/blender/modifiers/intern/MOD_array.cc
@@ -249,7 +249,8 @@ static void dm_mvert_map_doubles(int *doubles_map,
          * But if other potential targets are farther,
          * then there will be no mapping at all for this source. */
         while (best_target_vertex != -1 &&
-               !ELEM(doubles_map[best_target_vertex], -1, best_target_vertex)) {
+               !ELEM(doubles_map[best_target_vertex], -1, best_target_vertex))
+        {
           if (compare_len_v3v3(vert_positions[sve_source->vertex_num],
                                vert_positions[doubles_map[best_target_vertex]],
                                dist))
diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.cc b/source/blender/modifiers/intern/MOD_correctivesmooth.cc
index 71f9980e196..bb1de164345 100644
--- a/source/blender/modifiers/intern/MOD_correctivesmooth.cc
+++ b/source/blender/modifiers/intern/MOD_correctivesmooth.cc
@@ -610,7 +610,8 @@ static void correctivesmooth_modifier_do(ModifierData *md,
   }
 
   if ((csmd->rest_source == MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND) &&
-      (csmd->bind_coords == nullptr)) {
+      (csmd->bind_coords == nullptr))
+  {
     BKE_modifier_set_error(ob, md, "Bind data required");
     goto error;
   }
diff --git a/source/blender/modifiers/intern/MOD_laplaciansmooth.cc b/source/blender/modifiers/intern/MOD_laplaciansmooth.cc
index dcbdd1e8268..e9aae4da3dc 100644
--- a/source/blender/modifiers/intern/MOD_laplaciansmooth.cc
+++ b/source/blender/modifiers/intern/MOD_laplaciansmooth.cc
@@ -234,7 +234,8 @@ static void init_laplacian_matrix(LaplacianSystem *sys)
     idv2 = sys->edges[i][1];
     /* if is boundary, apply scale-dependent umbrella operator only with neighbors in boundary */
     if (sys->ne_ed_num[idv1] != sys->ne_fa_num[idv1] &&
-        sys->ne_ed_num[idv2] != sys->ne_fa_num[idv2]) {
+        sys->ne_ed_num[idv2] != sys->ne_fa_num[idv2])
+    {
       sys->vlengths[idv1] += sys->eweights[i];
       sys->vlengths[idv2] += sys->eweights[i];
     }
diff --git a/source/blender/modifiers/intern/MOD_mask.cc b/source/blender/modifiers/intern/MOD_mask.cc
index 6a80ce0e62b..f607f86c642 100644
--- a/source/blender/modifiers/intern/MOD_mask.cc
+++ b/source/blender/modifiers/intern/MOD_mask.cc
@@ -498,7 +498,8 @@ static void add_interpolated_faces_to_new_mesh(const Mesh &src_mesh,
   int sub_face_index = 0;
   int last_i_src = -1;
   for (const int i_dst :
-       IndexRange(faces_masked_num, masked_face_indices.size() - faces_masked_num)) {
+       IndexRange(faces_masked_num, masked_face_indices.size() - faces_masked_num))
+  {
     const int i_src = masked_face_indices[i_dst];
     if (i_src == last_i_src) {
       sub_face_index++;
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc
index 2fbf121f71a..ddbbf0b4e95 100644
--- a/source/blender/modifiers/intern/MOD_nodes.cc
+++ b/source/blender/modifiers/intern/MOD_nodes.cc
@@ -1018,7 +1018,8 @@ class NodesModifierSimulationParams : public nodes::GeoNodesSimulationParams {
         node_cache.reset();
       }
       if (!node_cache.bake.frames.is_empty() &&
-          current_frame_ < node_cache.bake.frames.first()->frame) {
+          current_frame_ < node_cache.bake.frames.first()->frame)
+      {
         node_cache.reset();
       }
     }
diff --git a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.cc b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.cc
index 1ced78688ed..d1feced3176 100644
--- a/source/blender/modifiers/intern/MOD_solidify_nonmanifold.cc
+++ b/source/blender/modifiers/intern/MOD_solidify_nonmanifold.cc
@@ -668,7 +668,8 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md,
                         /* Find index of e in #adj_faces. */
                         for (face_index = 0;
                              face_index < faces_len && e_adj_faces_faces[face_index] != face;
-                             face_index++) {
+                             face_index++)
+                        {
                           /* Pass. */
                         }
                         /* If not found. */
@@ -1017,7 +1018,8 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md,
             else if (eg_index >= 0) {
               NewEdgeRef **edge_ptr = unassigned_edges;
               for (found_edge_index = 0; found_edge_index < unassigned_edges_len;
-                   found_edge_index++, edge_ptr++) {
+                   found_edge_index++, edge_ptr++)
+              {
                 if (*edge_ptr) {
                   NewEdgeRef *edge = *edge_ptr;
                   if (edge->faces[0] == eg_track_faces[1]) {
@@ -1087,7 +1089,8 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md,
                   found_edge;
               edge_groups[eg_index].edges_len++;
               if (edge_groups[eg_index].edges[edge_groups[eg_index].edges_len - 1]->faces[1] !=
-                  nullptr) {
+                  nullptr)
+              {
                 last_open_edge_track = nullptr;
               }
               if (edge_groups[eg_index].edges_len > 3) {
@@ -1688,14 +1691,16 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md,
                       }
 
                       if (smd->nonmanifold_offset_mode ==
-                          MOD_SOLIDIFY_NONMANIFOLD_OFFSET_MODE_EVEN) {
+                          MOD_SOLIDIFY_NONMANIFOLD_OFFSET_MODE_EVEN)
+                      {
                         int corner_next = face->face.start();
                         int corner = corner_next + (face->face.size() - 1);
                         int corner_prev = corner - 1;
 
                         for (int m = 0;
                              m < face->face.size() && vm[orig_corner_verts[corner]] != i;
-                             m++, corner_next++) {
+                             m++, corner_next++)
+                        {
                           corner_prev = corner;
                           corner = corner_next;
                         }
@@ -1953,7 +1958,8 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md,
       if (*new_edges && (do_shell || edge_adj_faces_len[i] == 1) && (**new_edges)->old_edge == i) {
         for (NewEdgeRef **l = *new_edges; *l; l++) {
           if ((*l)->link_edge_groups[0]->is_singularity &&
-              (*l)->link_edge_groups[1]->is_singularity) {
+              (*l)->link_edge_groups[1]->is_singularity)
+          {
             const uint v1 = (*l)->link_edge_groups[0]->new_vert;
             const uint v2 = (*l)->link_edge_groups[1]->new_vert;
             bool exists_already = false;
@@ -2302,7 +2308,8 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md,
                     /* Check both far ends in terms of faces of an edge group. */
                     if ((!src_material_index.is_empty() ?
                              src_material_index[g3->edges[0]->faces[0]->index] :
-                             0) == l) {
+                             0) == l)
+                    {
                       face = g3->edges[0]->faces[0]->index;
                       count++;
                     }
@@ -2395,7 +2402,8 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md,
   if (do_rim) {
     for (uint i = 0; i < edges_num; i++) {
       if (edge_adj_faces_len[i] == 1 && orig_edge_data_arr[i] &&
-          (*orig_edge_data_arr[i])->old_edge == i) {
+          (*orig_edge_data_arr[i])->old_edge == i)
+      {
         NewEdgeRef **new_edges = orig_edge_data_arr[i];
 
         NewEdgeRef *edge1 = new_edges[0];
diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc
index dc4e9f814aa..d1b98215bd5 100644
--- a/source/blender/modifiers/intern/MOD_volume_displace.cc
+++ b/source/blender/modifiers/intern/MOD_volume_displace.cc
@@ -192,7 +192,8 @@ struct DisplaceGridOp {
   template void operator()()
   {
     if constexpr (blender::
-                      is_same_any_v) {
+                      is_same_any_v)
+    {
       /* We don't support displacing these grid types yet. */
       return;
     }
diff --git a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc
index 0a81e15f067..1a1ee94965b 100644
--- a/source/blender/modifiers/intern/MOD_volume_to_mesh.cc
+++ b/source/blender/modifiers/intern/MOD_volume_to_mesh.cc
@@ -139,7 +139,8 @@ static Mesh *modify_mesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh
     return create_empty_mesh(input_mesh);
   }
   if (vmmd->resolution_mode == VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_SIZE &&
-      vmmd->voxel_size == 0.0f) {
+      vmmd->voxel_size == 0.0f)
+  {
     return create_empty_mesh(input_mesh);
   }
   if (vmmd->resolution_mode == VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_AMOUNT &&
diff --git a/source/blender/modifiers/intern/MOD_weighted_normal.cc b/source/blender/modifiers/intern/MOD_weighted_normal.cc
index 4be2e906b20..535ddc134cf 100644
--- a/source/blender/modifiers/intern/MOD_weighted_normal.cc
+++ b/source/blender/modifiers/intern/MOD_weighted_normal.cc
@@ -149,7 +149,8 @@ static void aggregate_item_normal(WeightedNormalModifierData *wnmd,
                              BKE_defvert_find_index(&dvert[mv_index], defgrp_index) != nullptr;
 
   if (has_vgroup &&
-      ((vert_of_group && use_invert_vgroup) || (!vert_of_group && !use_invert_vgroup))) {
+      ((vert_of_group && use_invert_vgroup) || (!vert_of_group && !use_invert_vgroup)))
+  {
     return;
   }
 
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.cc b/source/blender/modifiers/intern/MOD_weightvgproximity.cc
index e15cee767e4..bc78da65d32 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.cc
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.cc
@@ -57,7 +57,7 @@
 #include "MOD_util.hh"
 #include "MOD_weightvg_util.hh"
 
-//#define USE_TIMEIT
+// #define USE_TIMEIT
 
 #ifdef USE_TIMEIT
 #  include "PIL_time.h"
@@ -386,7 +386,8 @@ static void update_depsgraph(ModifierData *md, const ModifierUpdateDepsgraphCont
     DEG_add_object_relation(
         ctx->node, wmd->proximity_ob_target, DEG_OB_COMP_TRANSFORM, "WeightVGProximity Modifier");
     if (wmd->proximity_ob_target->data != nullptr &&
-        wmd->proximity_mode == MOD_WVG_PROXIMITY_GEOMETRY) {
+        wmd->proximity_mode == MOD_WVG_PROXIMITY_GEOMETRY)
+    {
       DEG_add_object_relation(
           ctx->node, wmd->proximity_ob_target, DEG_OB_COMP_GEOMETRY, "WeightVGProximity Modifier");
     }
diff --git a/source/blender/nodes/NOD_geometry_nodes_lazy_function.hh b/source/blender/nodes/NOD_geometry_nodes_lazy_function.hh
index e8c1eff5239..1a11cda6d97 100644
--- a/source/blender/nodes/NOD_geometry_nodes_lazy_function.hh
+++ b/source/blender/nodes/NOD_geometry_nodes_lazy_function.hh
@@ -49,8 +49,7 @@ namespace sim_input {
  * The data is just passed through the node. Data that is incompatible with simulations (like
  * anonymous attributes), is removed though.
  */
-struct PassThrough {
-};
+struct PassThrough {};
 
 /**
  * The input is not evaluated, instead the values provided here are output by the node.
@@ -80,8 +79,7 @@ namespace sim_output {
  * Output the data that comes from the corresponding simulation input node, ignoring the nodes in
  * the zone.
  */
-struct PassThrough {
-};
+struct PassThrough {};
 
 /**
  * Computes the simulation step and calls the given function to cache the new simulation state.
diff --git a/source/blender/nodes/NOD_socket_declarations.hh b/source/blender/nodes/NOD_socket_declarations.hh
index d618f8534d1..2ceeded54b8 100644
--- a/source/blender/nodes/NOD_socket_declarations.hh
+++ b/source/blender/nodes/NOD_socket_declarations.hh
@@ -246,8 +246,7 @@ class Shader : public SocketDeclaration {
   bool can_connect(const bNodeSocket &socket) const override;
 };
 
-class ShaderBuilder : public SocketDeclarationBuilder {
-};
+class ShaderBuilder : public SocketDeclarationBuilder {};
 
 class ExtendBuilder;
 
@@ -264,8 +263,7 @@ class Extend : public SocketDeclaration {
   bool can_connect(const bNodeSocket &socket) const override;
 };
 
-class ExtendBuilder : public SocketDeclarationBuilder {
-};
+class ExtendBuilder : public SocketDeclarationBuilder {};
 
 class Custom : public SocketDeclaration {
  public:
diff --git a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc
index db5342d239a..92b74f1edd9 100644
--- a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.cc
@@ -528,7 +528,8 @@ class CryptoMatteOperation : public NodeOperation {
          * unnamed, that is, in the case of mono rendering, in which case we just return the first
          * view. */
         if (!context().get_view_name().is_empty() &&
-            context().get_view_name() != render_pass->view) {
+            context().get_view_name() != render_pass->view)
+        {
           continue;
         }
 
diff --git a/source/blender/nodes/composite/nodes/node_composite_displace.cc b/source/blender/nodes/composite/nodes/node_composite_displace.cc
index 61a94f47b08..008d247f2ca 100644
--- a/source/blender/nodes/composite/nodes/node_composite_displace.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_displace.cc
@@ -97,7 +97,8 @@ class DisplaceOperation : public NodeOperation {
 
     const Result &input_displacement = get_input("Vector");
     if (input_displacement.is_single_value() &&
-        math::is_zero(input_displacement.get_vector_value())) {
+        math::is_zero(input_displacement.get_vector_value()))
+    {
       return true;
     }
 
diff --git a/source/blender/nodes/composite/nodes/node_composite_image.cc b/source/blender/nodes/composite/nodes/node_composite_image.cc
index 9a2bbabbda5..44b2d97f8b2 100644
--- a/source/blender/nodes/composite/nodes/node_composite_image.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_image.cc
@@ -565,7 +565,8 @@ static void node_composit_init_rlayers(const bContext *C, PointerRNA *ptr)
   id_us_plus(node->id);
 
   for (bNodeSocket *sock = (bNodeSocket *)node->outputs.first; sock;
-       sock = sock->next, sock_index++) {
+       sock = sock->next, sock_index++)
+  {
     NodeImageLayer *sockdata = MEM_cnew(__func__);
     sock->storage = sockdata;
 
diff --git a/source/blender/nodes/composite/nodes/node_composite_math.cc b/source/blender/nodes/composite/nodes/node_composite_math.cc
index c2ac7a3bcb0..7b9a0b805a6 100644
--- a/source/blender/nodes/composite/nodes/node_composite_math.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_math.cc
@@ -58,7 +58,8 @@ static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
   const int weight = ELEM(params.other_socket().type, SOCK_FLOAT) ? 0 : -1;
 
   for (const EnumPropertyItem *item = rna_enum_node_math_items; item->identifier != nullptr;
-       item++) {
+       item++)
+  {
     if (item->name != nullptr && item->identifier[0] != '\0') {
       params.add_item(CTX_IFACE_(BLT_I18NCONTEXT_ID_NODETREE, item->name),
                       SocketSearchOp{"Value", (NodeMathOperation)item->value},
diff --git a/source/blender/nodes/composite/nodes/node_composite_mixrgb.cc b/source/blender/nodes/composite/nodes/node_composite_mixrgb.cc
index 7bca008c950..71280f20735 100644
--- a/source/blender/nodes/composite/nodes/node_composite_mixrgb.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_mixrgb.cc
@@ -58,7 +58,8 @@ static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
   const int weight = ELEM(params.other_socket().type, SOCK_RGBA) ? 0 : -1;
 
   for (const EnumPropertyItem *item = rna_enum_ramp_blend_items; item->identifier != nullptr;
-       item++) {
+       item++)
+  {
     if (item->name != nullptr && item->identifier[0] != '\0') {
       params.add_item(IFACE_(item->name), SocketSearchOp{"Image", item->value}, weight);
     }
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc
index fcce7f433bb..b1937a43663 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc
@@ -132,7 +132,8 @@ static void node_geo_exec(GeoNodeExecParams params)
     }
     case GeometryComponent::Type::GreasePencil: {
       if (const GreasePencilComponent *component =
-              geometry_set.get_component()) {
+              geometry_set.get_component())
+      {
         const AttributeAccessor attributes = *component->attributes();
         params.set_output("Layer Count", attributes.domain_size(AttrDomain::Layer));
       }
diff --git a/source/blender/nodes/geometry/nodes/node_geo_bake.cc b/source/blender/nodes/geometry/nodes/node_geo_bake.cc
index 48a06dbddeb..d3cb87c5bbe 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_bake.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_bake.cc
@@ -210,7 +210,8 @@ class LazyFunctionForBakeNode final : public LazyFunction {
     }
     else if (auto *info = std::get_if(behavior)) {
       if (geo_eval_log::GeoTreeLogger *tree_logger = local_user_data.try_get_tree_logger(
-              user_data)) {
+              user_data))
+      {
         tree_logger->node_warnings.append(
             {node_.identifier, {NodeWarningType::Error, info->message}});
       }
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc
index f3121eb85e4..f177167f2c6 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc
@@ -95,7 +95,8 @@ class EndpointFieldInput final : public bke::CurvesFieldInput {
   bool is_equal_to(const fn::FieldNode &other) const override
   {
     if (const EndpointFieldInput *other_endpoint = dynamic_cast(
-            &other)) {
+            &other))
+    {
       return start_size_ == other_endpoint->start_size_ && end_size_ == other_endpoint->end_size_;
     }
     return false;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc b/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc
index 3896ccca986..a186cbf6baf 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc
@@ -167,7 +167,8 @@ static void add_instances_from_component(
 
     if (!dst_attributes.contains(id)) {
       if (src.varray.size() == dst_component.instances_num() && src.sharing_info &&
-          src.varray.is_span()) {
+          src.varray.is_span())
+      {
         const bke::AttributeInitShared init(src.varray.get_internal_span().data(),
                                             *src.sharing_info);
         dst_attributes.add(id, AttrDomain::Instance, data_type, init);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_interpolate_curves.cc b/source/blender/nodes/geometry/nodes/node_geo_interpolate_curves.cc
index 1b2269e1841..0db334ca56e 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_interpolate_curves.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_interpolate_curves.cc
@@ -867,7 +867,8 @@ static void node_geo_exec(GeoNodeExecParams params)
 
   GeometryComponentEditData::remember_deformed_positions_if_necessary(guide_curves_geometry);
   if (const auto *curve_edit_data =
-          guide_curves_geometry.get_component()) {
+          guide_curves_geometry.get_component())
+  {
     new_curves.add(*curve_edit_data);
   }
 
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_face_group_boundaries.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_face_group_boundaries.cc
index c69d3c29569..c20cdfbd0a4 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_face_group_boundaries.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_face_group_boundaries.cc
@@ -87,7 +87,8 @@ class BoundaryFieldInput final : public bke::MeshFieldInput {
                   break;
                 }
                 if (edge_state.compare_exchange_weak(
-                        edge_state_value, is_boundary, std::memory_order_release)) {
+                        edge_state_value, is_boundary, std::memory_order_release))
+                {
                   boundary[edge_i] = true;
                   break;
                 }
diff --git a/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc b/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc
index e085bfd5324..9457a591b20 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc
@@ -798,7 +798,8 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
     {
       const bke::bake::SimulationNodeCache &node_cache = **node_cache_ptr;
       if (node_cache.cache_status == bke::bake::CacheStatus::Baked &&
-          !node_cache.bake.frames.is_empty()) {
+          !node_cache.bake.frames.is_empty())
+      {
         const int first_frame = node_cache.bake.frames.first()->frame.frame();
         const int last_frame = node_cache.bake.frames.last()->frame.frame();
         baked_range = IndexRange(first_frame, last_frame - first_frame + 1);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_split_to_instances.cc b/source/blender/nodes/geometry/nodes/node_geo_split_to_instances.cc
index 7a4f6f389fa..ff060f6b8f5 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_split_to_instances.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_split_to_instances.cc
@@ -295,7 +295,8 @@ static void node_geo_exec(GeoNodeExecParams params)
   Map> geometry_by_group_id;
 
   if (src_geometry.has_mesh() &&
-      ELEM(domain, AttrDomain::Point, AttrDomain::Edge, AttrDomain::Face)) {
+      ELEM(domain, AttrDomain::Point, AttrDomain::Edge, AttrDomain::Face))
+  {
     const auto &component = *src_geometry.get_component();
     split_mesh_groups(component,
                       domain,
diff --git a/source/blender/nodes/geometry/nodes/node_geo_transform_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_transform_geometry.cc
index 33871ccf88f..7a9d353f600 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_transform_geometry.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_transform_geometry.cc
@@ -103,7 +103,8 @@ static void translate_greasepencil(GreasePencil &grease_pencil, const float3 tra
   using namespace blender::bke::greasepencil;
   for (const int layer_index : grease_pencil.layers().index_range()) {
     if (Drawing *drawing = get_eval_grease_pencil_layer_drawing_for_write(grease_pencil,
-                                                                          layer_index)) {
+                                                                          layer_index))
+    {
       drawing->strokes_for_write().translate(translation);
     }
   }
@@ -114,7 +115,8 @@ static void transform_greasepencil(GreasePencil &grease_pencil, const float4x4 &
   using namespace blender::bke::greasepencil;
   for (const int layer_index : grease_pencil.layers().index_range()) {
     if (Drawing *drawing = get_eval_grease_pencil_layer_drawing_for_write(grease_pencil,
-                                                                          layer_index)) {
+                                                                          layer_index))
+    {
       drawing->strokes_for_write().transform(transform);
     }
   }
diff --git a/source/blender/nodes/intern/geometry_nodes_lazy_function.cc b/source/blender/nodes/intern/geometry_nodes_lazy_function.cc
index bbc803e8c84..32a93b92b1e 100644
--- a/source/blender/nodes/intern/geometry_nodes_lazy_function.cc
+++ b/source/blender/nodes/intern/geometry_nodes_lazy_function.cc
@@ -775,7 +775,8 @@ class LazyFunctionForViewerNode : public LazyFunction {
       }
       const Span links = bsocket->directly_linked_links();
       if (links.is_empty() ||
-          bke::nodeIsDanglingReroute(&bnode.owner_tree(), links.first()->fromnode)) {
+          bke::nodeIsDanglingReroute(&bnode.owner_tree(), links.first()->fromnode))
+      {
         use_field_input_ = false;
         inputs_.pop_last();
         r_lf_index_by_bsocket[bsocket->index_in_tree()] = -1;
@@ -1605,7 +1606,8 @@ class LazyFunctionForRepeatZone : public LazyFunction {
     zone_info.indices.outputs.main = outputs_.index_range();
 
     for ([[maybe_unused]] const bNodeSocket *socket :
-         zone.input_node->input_sockets().drop_back(1)) {
+         zone.input_node->input_sockets().drop_back(1))
+    {
       outputs_.append_as("Usage", CPPType::get());
     }
     zone_info.indices.outputs.input_usages = outputs_.index_range().take_back(
@@ -1700,7 +1702,8 @@ class LazyFunctionForRepeatZone : public LazyFunction {
     if (node_storage.inspection_index > 0) {
       if (node_storage.inspection_index >= iterations) {
         if (geo_eval_log::GeoTreeLogger *tree_logger = local_user_data.try_get_tree_logger(
-                user_data)) {
+                user_data))
+        {
           tree_logger->node_warnings.append(
               {repeat_output_bnode_.identifier,
                {NodeWarningType::Info, N_("Inspection index is out of range")}});
@@ -1757,7 +1760,8 @@ class LazyFunctionForRepeatZone : public LazyFunction {
             lf_node.input(item.value));
       }
       for (const auto item :
-           body_fn_.indices.inputs.attributes_by_caller_propagation_index.items()) {
+           body_fn_.indices.inputs.attributes_by_caller_propagation_index.items())
+      {
         lf_graph.add_link(
             *lf_inputs[zone_info_.indices.inputs.attributes_by_caller_propagation_index.lookup(
                 item.key)],
@@ -2796,7 +2800,8 @@ struct GeometryNodesLazyFunctionBuilder {
       bits::foreach_1_index(required_fields, [&](const int field_source_index) {
         const auto &field_source = attribute_inferencing_.all_field_sources[field_source_index];
         if (const auto *socket_field_source = std::get_if(
-                &field_source.data)) {
+                &field_source.data))
+        {
           if (&socket_field_source->socket->owner_node() == &geometry_output_bsocket.owner_node())
           {
             return;
@@ -2989,7 +2994,8 @@ struct GeometryNodesLazyFunctionBuilder {
       graph_params.lf_output_by_bsocket.add(&bsocket, &lf_output_socket);
       graph_params.socket_usage_inputs.add(&lf_usage_input);
       if (lf::OutputSocket *lf_usage = graph_params.usage_by_bsocket.lookup_default(&bsocket,
-                                                                                    nullptr)) {
+                                                                                    nullptr))
+      {
         graph_params.lf_graph.add_link(*lf_usage, lf_usage_input);
       }
       else {
@@ -3397,7 +3403,8 @@ struct GeometryNodesLazyFunctionBuilder {
         if (lf_input_index != -1) {
           lf::InputSocket &lf_input_socket = lf_node.input(lf_input_index);
           if (lf::OutputSocket *lf_usage = graph_params.usage_by_bsocket.lookup_default(bsocket,
-                                                                                        nullptr)) {
+                                                                                        nullptr))
+          {
             graph_params.lf_graph.add_link(*lf_usage, lf_input_socket);
           }
           else {
@@ -4129,7 +4136,8 @@ struct GeometryNodesLazyFunctionBuilder {
           bool broke_cycle = false;
           for (lf::Socket *lf_cycle_socket : cycle) {
             if (lf_cycle_socket->is_input() &&
-                socket_usage_inputs.contains(&lf_cycle_socket->as_input())) {
+                socket_usage_inputs.contains(&lf_cycle_socket->as_input()))
+            {
               lf::InputSocket &lf_cycle_input_socket = lf_cycle_socket->as_input();
               lf_graph.clear_origin(lf_cycle_input_socket);
               static const bool static_true = true;
diff --git a/source/blender/nodes/intern/node_common.cc b/source/blender/nodes/intern/node_common.cc
index 0652f8b8ba0..ed2db5c111f 100644
--- a/source/blender/nodes/intern/node_common.cc
+++ b/source/blender/nodes/intern/node_common.cc
@@ -624,7 +624,8 @@ bool blender::bke::node_is_connected_to_output(const bNodeTree *ntree, const bNo
     for (const bNodeSocket *socket : next_node->output_sockets()) {
       for (const bNodeLink *link : socket->directly_linked_links()) {
         if (link->tonode->typeinfo->nclass == NODE_CLASS_OUTPUT &&
-            link->tonode->flag & NODE_DO_OUTPUT) {
+            link->tonode->flag & NODE_DO_OUTPUT)
+        {
           return true;
         }
         nodes_to_check.push(link->tonode);
diff --git a/source/blender/nodes/intern/node_socket.cc b/source/blender/nodes/intern/node_socket.cc
index 1608b9999c4..996710a327d 100644
--- a/source/blender/nodes/intern/node_socket.cc
+++ b/source/blender/nodes/intern/node_socket.cc
@@ -856,7 +856,7 @@ static bNodeSocketType *make_standard_socket_type(int type, int subtype)
   StructRNA *srna;
 
   stype = MEM_cnew("node socket C type");
-  stype->free_self = (void (*)(bNodeSocketType * stype)) MEM_freeN;
+  stype->free_self = (void (*)(bNodeSocketType *stype))MEM_freeN;
   STRNCPY(stype->idname, socket_idname);
   STRNCPY(stype->label, socket_label);
   STRNCPY(stype->subtype_label, socket_subtype_label);
@@ -900,7 +900,7 @@ static bNodeSocketType *make_socket_type_virtual()
   StructRNA *srna;
 
   stype = MEM_cnew("node socket C type");
-  stype->free_self = (void (*)(bNodeSocketType * stype)) MEM_freeN;
+  stype->free_self = (void (*)(bNodeSocketType *stype))MEM_freeN;
   STRNCPY(stype->idname, socket_idname);
 
   /* set the RNA type
diff --git a/source/blender/nodes/shader/materialx/group_nodes.h b/source/blender/nodes/shader/materialx/group_nodes.h
index 56e747464b3..1277436a94a 100644
--- a/source/blender/nodes/shader/materialx/group_nodes.h
+++ b/source/blender/nodes/shader/materialx/group_nodes.h
@@ -8,7 +8,7 @@
 
 /* TODO: #pxr::UsdMtlxRead() doesn't perform node-graphs.
  * Uncomment USE_MATERIALX_NODEGRAPH after fixing it. */
-//#define USE_MATERIALX_NODEGRAPH
+// #define USE_MATERIALX_NODEGRAPH
 
 namespace blender::nodes::materialx {
 
diff --git a/source/blender/nodes/shader/node_shader_tree.cc b/source/blender/nodes/shader/node_shader_tree.cc
index 1c2c525169e..0205b0ce7df 100644
--- a/source/blender/nodes/shader/node_shader_tree.cc
+++ b/source/blender/nodes/shader/node_shader_tree.cc
@@ -567,7 +567,8 @@ static bool ntree_branch_count_and_tag_nodes(bNode *fromnode, bNode *tonode, voi
     iter->node_count++;
   }
   if (tonode->runtime->tmp_flag == -1 &&
-      (iter->node_filter == nullptr || iter->node_filter(tonode))) {
+      (iter->node_filter == nullptr || iter->node_filter(tonode)))
+  {
     tonode->runtime->tmp_flag = iter->node_count;
     iter->node_count++;
   }
diff --git a/source/blender/nodes/shader/nodes/node_shader_math.cc b/source/blender/nodes/shader/nodes/node_shader_math.cc
index 437b830d6a3..832304ace26 100644
--- a/source/blender/nodes/shader/nodes/node_shader_math.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_math.cc
@@ -52,7 +52,8 @@ static void sh_node_math_gather_link_searches(GatherLinkSearchOpParams ¶ms)
   const int weight = ELEM(params.other_socket().type, SOCK_FLOAT, SOCK_BOOLEAN, SOCK_INT) ? 0 : -1;
 
   for (const EnumPropertyItem *item = rna_enum_node_math_items; item->identifier != nullptr;
-       item++) {
+       item++)
+  {
     if (item->name != nullptr && item->identifier[0] != '\0') {
       const int gn_weight =
           (is_geometry_node_tree &&
diff --git a/source/blender/nodes/shader/nodes/node_shader_mix.cc b/source/blender/nodes/shader/nodes/node_shader_mix.cc
index 37d2a445302..6c56a82826e 100644
--- a/source/blender/nodes/shader/nodes/node_shader_mix.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_mix.cc
@@ -258,7 +258,8 @@ static void node_mix_gather_link_searches(GatherLinkSearchOpParams ¶ms)
   }
   const std::string socket_name = params.in_out() == SOCK_IN ? "A" : "Result";
   for (const EnumPropertyItem *item = rna_enum_ramp_blend_items; item->identifier != nullptr;
-       item++) {
+       item++)
+  {
     if (item->name != nullptr && item->identifier[0] != '\0') {
       params.add_item(IFACE_(item->name), SocketSearchOp{socket_name, item->value}, weight);
     }
diff --git a/source/blender/nodes/texture/nodes/node_texture_common.cc b/source/blender/nodes/texture/nodes/node_texture_common.cc
index d74caef9a96..31ac984d4bd 100644
--- a/source/blender/nodes/texture/nodes/node_texture_common.cc
+++ b/source/blender/nodes/texture/nodes/node_texture_common.cc
@@ -70,7 +70,8 @@ static void group_copy_inputs(bNode *gnode, bNodeStack **in, bNodeStack *gstack)
   LISTBASE_FOREACH (bNode *, node, &ngroup->nodes) {
     if (node->type == NODE_GROUP_INPUT) {
       for (sock = static_cast(node->outputs.first), a = 0; sock;
-           sock = sock->next, a++) {
+           sock = sock->next, a++)
+      {
         if (in[a]) { /* shouldn't need to check this #36694. */
           ns = node_get_socket_stack(gstack, sock);
           if (ns) {
diff --git a/source/blender/nodes/texture/nodes/node_texture_output.cc b/source/blender/nodes/texture/nodes/node_texture_output.cc
index acece4e18ee..3c4c4806ae2 100644
--- a/source/blender/nodes/texture/nodes/node_texture_output.cc
+++ b/source/blender/nodes/texture/nodes/node_texture_output.cc
@@ -65,7 +65,8 @@ static void unique_name(bNode *node)
   }
   for (; i; i = i->next) {
     if (i == node || i->type != TEX_NODE_OUTPUT ||
-        !STREQ(name, ((TexNodeOutput *)(i->storage))->name)) {
+        !STREQ(name, ((TexNodeOutput *)(i->storage))->name))
+    {
       continue;
     }
 
diff --git a/source/blender/python/generic/idprop_py_api.cc b/source/blender/python/generic/idprop_py_api.cc
index 01745568a46..db8c2c673fe 100644
--- a/source/blender/python/generic/idprop_py_api.cc
+++ b/source/blender/python/generic/idprop_py_api.cc
@@ -1418,7 +1418,8 @@ PyObject *BPy_Wrap_GetValues(ID *id, IDProperty *prop)
   int i;
 
   for (i = 0, loop = static_cast(prop->data.group.first); loop;
-       loop = loop->next, i++) {
+       loop = loop->next, i++)
+  {
     PyList_SET_ITEM(list, i, BPy_IDGroup_WrapData(id, loop, prop));
   }
 
@@ -1439,7 +1440,8 @@ PyObject *BPy_Wrap_GetItems(ID *id, IDProperty *prop)
   int i;
 
   for (i = 0, loop = static_cast(prop->data.group.first); loop;
-       loop = loop->next, i++) {
+       loop = loop->next, i++)
+  {
     PyObject *item = PyTuple_New(2);
     PyTuple_SET_ITEMS(
         item, PyUnicode_FromString(loop->name), BPy_IDGroup_WrapData(id, loop, prop));
diff --git a/source/blender/python/gpu/gpu_py_element.cc b/source/blender/python/gpu/gpu_py_element.cc
index 21c1e9eeb1a..67b10e030ef 100644
--- a/source/blender/python/gpu/gpu_py_element.cc
+++ b/source/blender/python/gpu/gpu_py_element.cc
@@ -48,7 +48,8 @@ static PyObject *pygpu_IndexBuf__tp_new(PyTypeObject * /*type*/, PyObject *args,
       nullptr,
   };
   if (!_PyArg_ParseTupleAndKeywordsFast(
-          args, kwds, &_parser, PyC_ParseStringEnum, &prim_type, &seq)) {
+          args, kwds, &_parser, PyC_ParseStringEnum, &prim_type, &seq))
+  {
     return nullptr;
   }
 
diff --git a/source/blender/python/gpu/gpu_py_framebuffer.cc b/source/blender/python/gpu/gpu_py_framebuffer.cc
index 1ea1748c26f..d224f79315b 100644
--- a/source/blender/python/gpu/gpu_py_framebuffer.cc
+++ b/source/blender/python/gpu/gpu_py_framebuffer.cc
@@ -446,7 +446,8 @@ static PyObject *pygpu_framebuffer_clear(BPyGPUFrameBuffer *self, PyObject *args
 
   if (py_col && py_col != Py_None) {
     if (mathutils_array_parse(col, 3, 4, py_col, "GPUFrameBuffer.clear(), invalid 'color' arg") ==
-        -1) {
+        -1)
+    {
       return nullptr;
     }
     buffers |= GPU_COLOR_BIT;
diff --git a/source/blender/python/gpu/gpu_py_shader.cc b/source/blender/python/gpu/gpu_py_shader.cc
index 43a5a006e69..43332424117 100644
--- a/source/blender/python/gpu/gpu_py_shader.cc
+++ b/source/blender/python/gpu/gpu_py_shader.cc
@@ -271,7 +271,8 @@ static PyObject *pygpu_shader_uniform_vector_float(BPyGPUShader *self, PyObject
   Py_buffer pybuffer;
 
   if (!pygpu_shader_uniform_vector_impl(
-          args, sizeof(float), &location, &length, &count, &pybuffer)) {
+          args, sizeof(float), &location, &length, &count, &pybuffer))
+  {
     return nullptr;
   }
 
@@ -594,7 +595,8 @@ static PyObject *pygpu_shader_uniform_block(BPyGPUShader *self, PyObject *args)
   const char *name;
   BPyGPUUniformBuf *py_ubo;
   if (!PyArg_ParseTuple(
-          args, "sO!:GPUShader.uniform_block", &name, &BPyGPUUniformBuf_Type, &py_ubo)) {
+          args, "sO!:GPUShader.uniform_block", &name, &BPyGPUUniformBuf_Type, &py_ubo))
+  {
     return nullptr;
   }
 
diff --git a/source/blender/python/gpu/gpu_py_shader_create_info.cc b/source/blender/python/gpu/gpu_py_shader_create_info.cc
index de424477e06..689542632ba 100644
--- a/source/blender/python/gpu/gpu_py_shader_create_info.cc
+++ b/source/blender/python/gpu/gpu_py_shader_create_info.cc
@@ -757,7 +757,8 @@ static PyObject *pygpu_shader_info_sampler(BPyGPUShaderCreateInfo *self, PyObjec
   const char *name;
 
   if (!PyArg_ParseTuple(
-          args, "iO&s:sampler", &slot, PyC_ParseStringEnum, &pygpu_samplertype, &name)) {
+          args, "iO&s:sampler", &slot, PyC_ParseStringEnum, &pygpu_samplertype, &name))
+  {
     return nullptr;
   }
 
diff --git a/source/blender/python/intern/bpy_app_timers.cc b/source/blender/python/intern/bpy_app_timers.cc
index 6fc2e8216ba..decd0a838ec 100644
--- a/source/blender/python/intern/bpy_app_timers.cc
+++ b/source/blender/python/intern/bpy_app_timers.cc
@@ -107,7 +107,8 @@ static PyObject *bpy_app_timers_register(PyObject * /*self*/, PyObject *args, Py
       nullptr,
   };
   if (!_PyArg_ParseTupleAndKeywordsFast(
-          args, kw, &_parser, &function, &first_interval, &persistent)) {
+          args, kw, &_parser, &function, &first_interval, &persistent))
+  {
     return nullptr;
   }
 
diff --git a/source/blender/python/intern/bpy_app_translations.cc b/source/blender/python/intern/bpy_app_translations.cc
index 6943f495594..eb74714d611 100644
--- a/source/blender/python/intern/bpy_app_translations.cc
+++ b/source/blender/python/intern/bpy_app_translations.cc
@@ -859,7 +859,8 @@ PyObject *BPY_app_translations_struct()
 
     /* We really populate the contexts' fields here! */
     for (ctxt = _contexts, desc = app_translations_contexts_desc.fields; ctxt->c_id;
-         ctxt++, desc++) {
+         ctxt++, desc++)
+    {
       desc->name = ctxt->py_id;
       desc->doc = nullptr;
     }
diff --git a/source/blender/python/intern/bpy_driver.cc b/source/blender/python/intern/bpy_driver.cc
index ad039a162bf..615f957893e 100644
--- a/source/blender/python/intern/bpy_driver.cc
+++ b/source/blender/python/intern/bpy_driver.cc
@@ -689,7 +689,8 @@ float BPY_driver_exec(PathResolvedRNA *anim_rna,
     PyTuple_SET_ITEM(((PyObject *)driver_orig->expr_comp), 1, expr_vars);
 
     for (dvar = static_cast(driver_orig->variables.first), i = 0; dvar;
-         dvar = dvar->next) {
+         dvar = dvar->next)
+    {
       PyTuple_SET_ITEM(expr_vars, i++, PyUnicode_FromString(dvar->name));
     }
 
diff --git a/source/blender/python/intern/bpy_library_write.cc b/source/blender/python/intern/bpy_library_write.cc
index 84e988f6ff0..3888432d07f 100644
--- a/source/blender/python/intern/bpy_library_write.cc
+++ b/source/blender/python/intern/bpy_library_write.cc
@@ -135,7 +135,7 @@ static PyObject *bpy_lib_write(BPy_PropertyRNA *self, PyObject *args, PyObject *
     /* original values */
     short id_flag;
     short id_us;
-  } * id_store_array, *id_store;
+  } *id_store_array, *id_store;
   int id_store_len = 0;
 
   PyObject *ret;
diff --git a/source/blender/python/intern/bpy_rna_gizmo.cc b/source/blender/python/intern/bpy_rna_gizmo.cc
index 4a737f21aaf..67fce3c6a18 100644
--- a/source/blender/python/intern/bpy_rna_gizmo.cc
+++ b/source/blender/python/intern/bpy_rna_gizmo.cc
@@ -276,7 +276,8 @@ static void py_rna_gizmo_handler_range_get_cb(const wmGizmo * /*gz*/,
     float range[2];
     for (int i = 0; i < 2; i++) {
       if (((range[i] = PyFloat_AsDouble(PyTuple_GET_ITEM(ret, i))) == -1.0f && PyErr_Occurred()) ==
-          0) {
+          0)
+      {
         /* pass */
       }
       else {
diff --git a/source/blender/python/mathutils/mathutils_bvhtree.cc b/source/blender/python/mathutils/mathutils_bvhtree.cc
index 48ad5f7fce6..6df910d31d0 100644
--- a/source/blender/python/mathutils/mathutils_bvhtree.cc
+++ b/source/blender/python/mathutils/mathutils_bvhtree.cc
@@ -359,7 +359,8 @@ static PyObject *py_bvhtree_ray_cast(PyBVHTree *self, PyObject *args)
   /* may fail if the mesh has no faces, in that case the ray-cast misses */
   if (self->tree) {
     if (BLI_bvhtree_ray_cast(self->tree, co, direction, 0.0f, &hit, py_bvhtree_raycast_cb, self) !=
-        -1) {
+        -1)
+    {
       return py_bvhtree_raycast_to_py(&hit);
     }
   }
@@ -403,7 +404,8 @@ static PyObject *py_bvhtree_find_nearest(PyBVHTree *self, PyObject *args)
   /* may fail if the mesh has no faces, in that case the ray-cast misses */
   if (self->tree) {
     if (BLI_bvhtree_find_nearest(self->tree, co, &nearest, py_bvhtree_nearest_point_cb, self) !=
-        -1) {
+        -1)
+    {
       return py_bvhtree_nearest_to_py(&nearest);
     }
   }
diff --git a/source/blender/python/mathutils/mathutils_kdtree.cc b/source/blender/python/mathutils/mathutils_kdtree.cc
index d1ff41a069a..24bd3a968b5 100644
--- a/source/blender/python/mathutils/mathutils_kdtree.cc
+++ b/source/blender/python/mathutils/mathutils_kdtree.cc
@@ -211,7 +211,8 @@ static PyObject *py_kdtree_find(PyKDTree *self, PyObject *args, PyObject *kwargs
   const char *keywords[] = {"co", "filter", nullptr};
 
   if (!PyArg_ParseTupleAndKeywords(
-          args, kwargs, "O|$O:find", (char **)keywords, &py_co, &py_filter)) {
+          args, kwargs, "O|$O:find", (char **)keywords, &py_co, &py_filter))
+  {
     return nullptr;
   }
 
diff --git a/source/blender/python/mathutils/mathutils_noise.cc b/source/blender/python/mathutils/mathutils_noise.cc
index f901d198403..395341f42ea 100644
--- a/source/blender/python/mathutils/mathutils_noise.cc
+++ b/source/blender/python/mathutils/mathutils_noise.cc
@@ -50,8 +50,8 @@
 #define MATRIX_A 0x9908b0dfUL /* constant vector a */
 #define UMASK 0x80000000UL    /* most significant w-r bits */
 #define LMASK 0x7fffffffUL    /* least significant r bits */
-#define MIXBITS(u, v) (((u)&UMASK) | ((v)&LMASK))
-#define TWIST(u, v) ((MIXBITS(u, v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL))
+#define MIXBITS(u, v) (((u) & UMASK) | ((v) & LMASK))
+#define TWIST(u, v) ((MIXBITS(u, v) >> 1) ^ ((v) & 1UL ? MATRIX_A : 0UL))
 
 static ulong state[N]; /* The array for the state vector. */
 static int left = 1;
@@ -869,7 +869,8 @@ static PyObject *M_Noise_hybrid_multi_fractal(PyObject * /*self*/, PyObject *arg
   }
 
   if (mathutils_array_parse(vec, 3, 3, value, "hybrid_multi_fractal: invalid 'position' arg") ==
-      -1) {
+      -1)
+  {
     return nullptr;
   }
 
@@ -932,7 +933,8 @@ static PyObject *M_Noise_ridged_multi_fractal(PyObject * /*self*/, PyObject *arg
   }
 
   if (mathutils_array_parse(vec, 3, 3, value, "ridged_multi_fractal: invalid 'position' arg") ==
-      -1) {
+      -1)
+  {
     return nullptr;
   }
 
diff --git a/source/blender/render/intern/engine.cc b/source/blender/render/intern/engine.cc
index ddb5c735653..272fd226579 100644
--- a/source/blender/render/intern/engine.cc
+++ b/source/blender/render/intern/engine.cc
@@ -649,7 +649,8 @@ static void engine_depsgraph_init(RenderEngine *engine, ViewLayer *view_layer)
   /* Reuse depsgraph from persistent data if possible. */
   if (engine->depsgraph) {
     if (DEG_get_bmain(engine->depsgraph) != bmain ||
-        DEG_get_input_scene(engine->depsgraph) != scene) {
+        DEG_get_input_scene(engine->depsgraph) != scene)
+    {
       /* If bmain or scene changes, we need a completely new graph. */
       engine_depsgraph_free(engine);
     }
diff --git a/source/blender/render/intern/pipeline.cc b/source/blender/render/intern/pipeline.cc
index 786e3e05b84..00511f90b56 100644
--- a/source/blender/render/intern/pipeline.cc
+++ b/source/blender/render/intern/pipeline.cc
@@ -660,7 +660,8 @@ void RE_FreeUnusedGPUResources()
        * race condition here because we are on the main thread and new jobs can only
        * be started from the main thread. */
       if (WM_jobs_test(wm, scene, WM_JOB_TYPE_RENDER) ||
-          WM_jobs_test(wm, scene, WM_JOB_TYPE_COMPOSITE)) {
+          WM_jobs_test(wm, scene, WM_JOB_TYPE_COMPOSITE))
+      {
         do_free = false;
         break;
       }
@@ -1175,7 +1176,8 @@ static void do_render_compositor_scenes(Render *re)
       if (node->id && node->id != (ID *)re->scene) {
         Scene *scene = (Scene *)node->id;
         if (!BLI_gset_haskey(scenes_rendered, scene) &&
-            render_scene_has_layers_to_render(scene, nullptr)) {
+            render_scene_has_layers_to_render(scene, nullptr))
+        {
           do_render_compositor_scene(re, scene, cfra);
           BLI_gset_add(scenes_rendered, scene);
           node->typeinfo->updatefunc(restore_scene->nodetree, node);
@@ -1674,7 +1676,8 @@ bool RE_is_rendering_allowed(Scene *scene,
 
   if (scene->r.mode & R_BORDER) {
     if (scene->r.border.xmax <= scene->r.border.xmin ||
-        scene->r.border.ymax <= scene->r.border.ymin) {
+        scene->r.border.ymax <= scene->r.border.ymin)
+    {
       BKE_report(reports, RPT_ERROR, "No border area selected");
       return false;
     }
diff --git a/source/blender/render/intern/render_result.cc b/source/blender/render/intern/render_result.cc
index be57c21cd00..5e70e2a4186 100644
--- a/source/blender/render/intern/render_result.cc
+++ b/source/blender/render/intern/render_result.cc
@@ -785,7 +785,8 @@ void render_result_merge(RenderResult *rr, RenderResult *rrpart)
           continue;
         }
         if (rpass->ibuf->float_buffer.data == nullptr ||
-            rpassp->ibuf->float_buffer.data == nullptr) {
+            rpassp->ibuf->float_buffer.data == nullptr)
+        {
           continue;
         }
         /* Render-result have all passes, render-part only the active view's passes. */
diff --git a/source/blender/render/intern/texture_margin.cc b/source/blender/render/intern/texture_margin.cc
index 3c7bcb543b5..1dc6605f305 100644
--- a/source/blender/render/intern/texture_margin.cc
+++ b/source/blender/render/intern/texture_margin.cc
@@ -147,8 +147,8 @@ class TextureMarginMap {
  */
 #define PackDijkstraPixel(dist, dir) (0x80000000 + ((dist) << 4) + (dir))
 #define DijkstraPixelGetDistance(dp) (((dp) ^ 0x80000000) >> 4)
-#define DijkstraPixelGetDirection(dp) ((dp)&0xF)
-#define IsDijkstraPixel(dp) ((dp)&0x80000000)
+#define DijkstraPixelGetDirection(dp) ((dp) & 0xF)
+#define IsDijkstraPixel(dp) ((dp) & 0x80000000)
 #define DijkstraPixelIsUnset(dp) ((dp) == 0xFFFFFFFF)
 
   /**
diff --git a/source/blender/render/intern/texture_pointdensity.cc b/source/blender/render/intern/texture_pointdensity.cc
index c992080e781..c62577713e6 100644
--- a/source/blender/render/intern/texture_pointdensity.cc
+++ b/source/blender/render/intern/texture_pointdensity.cc
@@ -74,7 +74,8 @@ static int point_data_used(PointDensity *pd)
     if (ELEM(pd->ob_color_source,
              TEX_PD_COLOR_VERTCOL,
              TEX_PD_COLOR_VERTWEIGHT,
-             TEX_PD_COLOR_VERTNOR)) {
+             TEX_PD_COLOR_VERTNOR))
+    {
       pd_bitflag |= POINT_DATA_COLOR;
     }
   }
diff --git a/source/blender/sequencer/intern/render.cc b/source/blender/sequencer/intern/render.cc
index 767e2a13c50..da392aec404 100644
--- a/source/blender/sequencer/intern/render.cc
+++ b/source/blender/sequencer/intern/render.cc
@@ -698,7 +698,8 @@ static ImBuf *seq_render_preprocess_ibuf(const SeqRenderData *context,
                                          const bool is_proxy_image)
 {
   if (context->is_proxy_render == false &&
-      (ibuf->x != context->rectx || ibuf->y != context->recty)) {
+      (ibuf->x != context->rectx || ibuf->y != context->recty))
+  {
     use_preprocess = true;
   }
 
diff --git a/source/blender/sequencer/intern/strip_retiming.cc b/source/blender/sequencer/intern/strip_retiming.cc
index 10efa10f934..dc7017619c3 100644
--- a/source/blender/sequencer/intern/strip_retiming.cc
+++ b/source/blender/sequencer/intern/strip_retiming.cc
@@ -530,7 +530,8 @@ SeqRetimingKey *SEQ_retiming_add_transition(const Scene *scene,
 
   SeqRetimingKey *prev_key = key - 1;
   if ((key->flag & SEQ_SPEED_TRANSITION_IN) != 0 ||
-      (prev_key->flag & SEQ_SPEED_TRANSITION_IN) != 0) {
+      (prev_key->flag & SEQ_SPEED_TRANSITION_IN) != 0)
+  {
     return nullptr;
   }
 
diff --git a/source/blender/simulation/intern/SIM_mass_spring.cc b/source/blender/simulation/intern/SIM_mass_spring.cc
index cfe68e5dc9c..06fe75ba111 100644
--- a/source/blender/simulation/intern/SIM_mass_spring.cc
+++ b/source/blender/simulation/intern/SIM_mass_spring.cc
@@ -1178,7 +1178,8 @@ static void cloth_solve_collisions(
   int i;
 
   if (!(clmd->coll_parms->flags &
-        (CLOTH_COLLSETTINGS_FLAG_ENABLED | CLOTH_COLLSETTINGS_FLAG_SELF))) {
+        (CLOTH_COLLSETTINGS_FLAG_ENABLED | CLOTH_COLLSETTINGS_FLAG_SELF)))
+  {
     return;
   }
 
diff --git a/source/blender/simulation/intern/implicit.h b/source/blender/simulation/intern/implicit.h
index 21d7cf1b61e..6b9b739a899 100644
--- a/source/blender/simulation/intern/implicit.h
+++ b/source/blender/simulation/intern/implicit.h
@@ -18,7 +18,7 @@
 extern "C" {
 #endif
 
-//#define IMPLICIT_SOLVER_EIGEN
+// #define IMPLICIT_SOLVER_EIGEN
 #define IMPLICIT_SOLVER_BLENDER
 
 #define CLOTH_ROOT_FRAME /* enable use of root frame coordinate transform */
@@ -31,9 +31,9 @@ extern "C" {
 // #define CLOTH_FORCE_SPRING_GOAL /* UNUSED. */
 // #define CLOTH_FORCE_EFFECTORS /* UNUSED. */
 
-//#define IMPLICIT_PRINT_SOLVER_INPUT_OUTPUT
+// #define IMPLICIT_PRINT_SOLVER_INPUT_OUTPUT
 
-//#define IMPLICIT_ENABLE_EIGEN_DEBUG
+// #define IMPLICIT_ENABLE_EIGEN_DEBUG
 
 struct Implicit_Data;
 
diff --git a/source/blender/simulation/intern/implicit_blender.cc b/source/blender/simulation/intern/implicit_blender.cc
index 769d96d2152..670d86a4470 100644
--- a/source/blender/simulation/intern/implicit_blender.cc
+++ b/source/blender/simulation/intern/implicit_blender.cc
@@ -36,7 +36,7 @@
 #    define CLOTH_OPENMP_LIMIT 512
 #  endif
 
-//#define DEBUG_TIME
+// #define DEBUG_TIME
 
 #  ifdef DEBUG_TIME
 #    include "PIL_time.h"
@@ -179,7 +179,7 @@ DO_INLINE float dot_lfvector(float (*fLongVectorA)[3], float (*fLongVectorB)[3],
    * due to non-commutative nature of floating point ops this makes the sim give
    * different results each time you run it!
    * schedule(guided, 2) */
-  //#pragma omp parallel for reduction(+: temp) if (verts > CLOTH_OPENMP_LIMIT)
+  // #pragma omp parallel for reduction(+: temp) if (verts > CLOTH_OPENMP_LIMIT)
   for (i = 0; i < long(verts); i++) {
     temp += dot_v3v3(fLongVectorA[i], fLongVectorB[i]);
   }
diff --git a/source/blender/simulation/intern/implicit_eigen.cc b/source/blender/simulation/intern/implicit_eigen.cc
index 04482c7688b..eb49a4eb16c 100644
--- a/source/blender/simulation/intern/implicit_eigen.cc
+++ b/source/blender/simulation/intern/implicit_eigen.cc
@@ -10,13 +10,13 @@
 
 #ifdef IMPLICIT_SOLVER_EIGEN
 
-//#define USE_EIGEN_CORE
+// #define USE_EIGEN_CORE
 #  define USE_EIGEN_CONSTRAINED_CG
 
 #  ifdef __GNUC__
 #    pragma GCC diagnostic push
 /* XXX suppress verbose warnings in eigen */
-//#  pragma GCC diagnostic ignored "-Wlogical-op"
+// #  pragma GCC diagnostic ignored "-Wlogical-op"
 #  endif
 
 #  ifndef IMPLICIT_ENABLE_EIGEN_DEBUG
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.cc b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.cc
index f1c3a3ee793..83e72e45a16 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.cc
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.cc
@@ -284,7 +284,8 @@ void WM_gizmo_group_remove_by_tool(bContext *C,
           if (gzmap && gzmap->type == gzmap_type) {
             wmGizmoGroup *gzgroup, *gzgroup_next;
             for (gzgroup = static_cast(gzmap->groups.first); gzgroup;
-                 gzgroup = gzgroup_next) {
+                 gzgroup = gzgroup_next)
+            {
               gzgroup_next = gzgroup->next;
               if (gzgroup->type == gzgt) {
                 BLI_assert(gzgroup->parent_gzmap == gzmap);
@@ -1046,7 +1047,8 @@ void WM_gizmomaptype_group_unlink(bContext *C,
           if (gzmap && gzmap->type == gzmap_type) {
             wmGizmoGroup *gzgroup, *gzgroup_next;
             for (gzgroup = static_cast(gzmap->groups.first); gzgroup;
-                 gzgroup = gzgroup_next) {
+                 gzgroup = gzgroup_next)
+            {
               gzgroup_next = gzgroup->next;
               if (gzgroup->type == gzgt) {
                 BLI_assert(gzgroup->parent_gzmap == gzmap);
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.cc b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.cc
index f56db7c17be..1d8985168aa 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.cc
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.cc
@@ -769,7 +769,8 @@ wmGizmo *wm_gizmomap_highlight_find(wmGizmoMap *gzmap,
         }
         else if (step == WM_GIZMOMAP_DRAWSTEP_2D) {
           if ((gz = wm_gizmogroup_find_intersected_gizmo(
-                   wm, gzgroup, C, event->modifier, mval, r_part))) {
+                   wm, gzgroup, C, event->modifier, mval, r_part)))
+          {
             break;
           }
         }
@@ -1229,7 +1230,8 @@ wmGizmoMapType *WM_gizmomaptype_find(const wmGizmoMapType_Params *gzmap_params)
 {
   LISTBASE_FOREACH (wmGizmoMapType *, gzmap_type, &gizmomaptypes) {
     if (gzmap_type->spaceid == gzmap_params->spaceid &&
-        gzmap_type->regionid == gzmap_params->regionid) {
+        gzmap_type->regionid == gzmap_params->regionid)
+    {
       return gzmap_type;
     }
   }
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.cc b/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.cc
index 1eb52210a4e..ecbd643c361 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.cc
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_type.cc
@@ -134,7 +134,8 @@ static void gizmotype_unlink(bContext *C, Main *bmain, wmGizmoType *gzt)
           if (gzmap) {
             LISTBASE_FOREACH (wmGizmoGroup *, gzgroup, &gzmap->groups) {
               for (wmGizmo *gz = static_cast(gzgroup->gizmos.first), *gz_next; gz;
-                   gz = gz_next) {
+                   gz = gz_next)
+              {
                 gz_next = gz->next;
                 BLI_assert(gzgroup->parent_gzmap == gzmap);
                 if (gz->type == gzt) {
diff --git a/source/blender/windowmanager/intern/wm_event_system.cc b/source/blender/windowmanager/intern/wm_event_system.cc
index 16b35b5ab3c..d7cb5a191c2 100644
--- a/source/blender/windowmanager/intern/wm_event_system.cc
+++ b/source/blender/windowmanager/intern/wm_event_system.cc
@@ -606,7 +606,8 @@ void wm_event_do_notifiers(bContext *C)
       }
 
       if (note->window == win ||
-          (note->window == nullptr && ELEM(note->reference, nullptr, scene))) {
+          (note->window == nullptr && ELEM(note->reference, nullptr, scene)))
+      {
         if (note->category == NC_SCENE) {
           if (note->data == ND_FRAME) {
             do_anim = true;
@@ -640,7 +641,8 @@ void wm_event_do_notifiers(bContext *C)
 
   /* The notifiers are sent without context, to keep it clean. */
   while (
-      const wmNotifier *note = static_cast(BLI_pophead(&wm->notifier_queue))) {
+      const wmNotifier *note = static_cast(BLI_pophead(&wm->notifier_queue)))
+  {
     if (wm_notifier_is_clear(note)) {
       MEM_freeN((void *)note);
       continue;
@@ -3193,7 +3195,8 @@ static eHandlerActionFlag wm_handlers_do_gizmo_handler(bContext *C,
           LISTBASE_FOREACH (wmKeyMapItem *, kmi, &keymap->items) {
             if ((kmi->flag & KMI_INACTIVE) == 0) {
               if (wm_eventmatch(&event_test_click, kmi) ||
-                  wm_eventmatch(&event_test_click_drag, kmi)) {
+                  wm_eventmatch(&event_test_click_drag, kmi))
+              {
                 wmOperatorType *ot = WM_operatortype_find(kmi->idname, false);
                 if (WM_operator_poll_context(C, ot, WM_OP_INVOKE_DEFAULT)) {
                   is_event_handle_all = true;
@@ -6233,7 +6236,8 @@ void WM_window_cursor_keymap_status_refresh(bContext *C, wmWindow *win)
   {
     bToolRef *tref = nullptr;
     if ((region->regiontype == RGN_TYPE_WINDOW) &&
-        ((1 << area->spacetype) & WM_TOOLSYSTEM_SPACE_MASK)) {
+        ((1 << area->spacetype) & WM_TOOLSYSTEM_SPACE_MASK))
+    {
       const Scene *scene = WM_window_get_active_scene(win);
       ViewLayer *view_layer = WM_window_get_active_view_layer(win);
       WorkSpace *workspace = WM_window_get_active_workspace(win);
@@ -6355,7 +6359,8 @@ bool WM_window_modal_keymap_status_draw(bContext *C, wmWindow *win, uiLayout *la
       continue;
     }
     if ((keymap->poll_modal_item != nullptr) &&
-        (keymap->poll_modal_item(op, items[i].value) == false)) {
+        (keymap->poll_modal_item(op, items[i].value) == false))
+    {
       continue;
     }
 
diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc
index 124bea5fc6e..cfd2041a066 100644
--- a/source/blender/windowmanager/intern/wm_files.cc
+++ b/source/blender/windowmanager/intern/wm_files.cc
@@ -3156,7 +3156,8 @@ static int wm_recover_last_session_invoke(bContext *C, wmOperator *op, const wmE
   wm_open_init_use_scripts(op, false);
 
   if (wm_operator_close_file_dialog_if_needed(
-          C, op, wm_recover_last_session_after_dialog_callback)) {
+          C, op, wm_recover_last_session_after_dialog_callback))
+  {
     return OPERATOR_INTERFACE;
   }
   return wm_recover_last_session_exec(C, op);
diff --git a/source/blender/windowmanager/intern/wm_files_link.cc b/source/blender/windowmanager/intern/wm_files_link.cc
index 1d7f7648f19..4dfdf31abac 100644
--- a/source/blender/windowmanager/intern/wm_files_link.cc
+++ b/source/blender/windowmanager/intern/wm_files_link.cc
@@ -765,7 +765,8 @@ static int wm_lib_relocate_exec_do(bContext *C, wmOperator *op, bool do_reload)
         BLI_path_join(filepath, sizeof(filepath), root, relname);
 
         if (BLI_path_cmp(filepath, lib->filepath_abs) == 0 ||
-            !BKE_blendfile_extension_check(relname)) {
+            !BKE_blendfile_extension_check(relname))
+        {
           continue;
         }
 
diff --git a/source/blender/windowmanager/intern/wm_gesture.cc b/source/blender/windowmanager/intern/wm_gesture.cc
index ff1b1042f17..e1c3005b2f2 100644
--- a/source/blender/windowmanager/intern/wm_gesture.cc
+++ b/source/blender/windowmanager/intern/wm_gesture.cc
@@ -56,7 +56,8 @@ wmGesture *WM_gesture_new(wmWindow *window, const ARegion *region, const wmEvent
            WM_GESTURE_RECT,
            WM_GESTURE_CROSS_RECT,
            WM_GESTURE_CIRCLE,
-           WM_GESTURE_STRAIGHTLINE)) {
+           WM_GESTURE_STRAIGHTLINE))
+  {
     rcti *rect = static_cast(MEM_callocN(sizeof(rcti), "gesture rect new"));
 
     gesture->customdata = rect;
diff --git a/source/blender/windowmanager/intern/wm_operator_type.cc b/source/blender/windowmanager/intern/wm_operator_type.cc
index 058de4e993b..c0bc64df23b 100644
--- a/source/blender/windowmanager/intern/wm_operator_type.cc
+++ b/source/blender/windowmanager/intern/wm_operator_type.cc
@@ -428,7 +428,8 @@ static int wm_macro_modal(bContext *C, wmOperator *op, const wmEvent *event)
           const rcti *wrap_region = nullptr;
 
           if ((op->opm->flag & OP_IS_MODAL_GRAB_CURSOR) ||
-              (op->opm->type->flag & OPTYPE_GRAB_CURSOR_XY)) {
+              (op->opm->type->flag & OPTYPE_GRAB_CURSOR_XY))
+          {
             wrap = WM_CURSOR_WRAP_XY;
           }
           else if (op->opm->type->flag & OPTYPE_GRAB_CURSOR_X) {
diff --git a/source/blender/windowmanager/intern/wm_playanim.cc b/source/blender/windowmanager/intern/wm_playanim.cc
index 0d9e664321a..e14e28046e2 100644
--- a/source/blender/windowmanager/intern/wm_playanim.cc
+++ b/source/blender/windowmanager/intern/wm_playanim.cc
@@ -920,7 +920,8 @@ static void build_pict_list_from_image_sequence(ListBase *picsbase,
     void *mem = nullptr;
     size_t size = -1;
     if (!buffer_from_filepath(
-            filepath, g_playanim.from_disk ? nullptr : &mem, &size, &error_message)) {
+            filepath, g_playanim.from_disk ? nullptr : &mem, &size, &error_message))
+    {
       has_error = true;
       size = 0;
     }
diff --git a/source/blender/windowmanager/xr/intern/wm_xr_session.cc b/source/blender/windowmanager/xr/intern/wm_xr_session.cc
index e50f24a380d..3e937a36e68 100644
--- a/source/blender/windowmanager/xr/intern/wm_xr_session.cc
+++ b/source/blender/windowmanager/xr/intern/wm_xr_session.cc
@@ -1158,7 +1158,8 @@ static void wm_xr_session_events_dispatch(wmXrData *xr,
                                                  action->active_modal_path));
 
         if ((val != KM_NOTHING) &&
-            (!modal || (is_active_modal_action && is_active_modal_subaction))) {
+            (!modal || (is_active_modal_action && is_active_modal_subaction)))
+        {
           const GHOST_XrPose *aim_pose = wm_xr_session_controller_aim_pose_find(
               session_state, action->subaction_paths[subaction_idx]);
           const GHOST_XrPose *aim_pose_other = nullptr;
diff --git a/source/creator/creator_args.cc b/source/creator/creator_args.cc
index f635dbb4649..de39b451ce4 100644
--- a/source/creator/creator_args.cc
+++ b/source/creator/creator_args.cc
@@ -250,7 +250,8 @@ static bool parse_int_range_relative_clamp(const char *str,
                                            const char **r_err_msg)
 {
   if (parse_int_range_relative(
-          str, str_end_range, str_end_test, pos, neg, r_value_range, r_err_msg)) {
+          str, str_end_range, str_end_test, pos, neg, r_value_range, r_err_msg))
+  {
     CLAMP(r_value_range[0], min, max);
     CLAMP(r_value_range[1], min, max);
     return true;
@@ -942,7 +943,7 @@ static const char arg_handle_log_show_backtrace_set_doc[] =
 static int arg_handle_log_show_backtrace_set(int /*argc*/, const char ** /*argv*/, void * /*data*/)
 {
   /* Ensure types don't become incompatible. */
-  void (*fn)(FILE * fp) = BLI_system_backtrace;
+  void (*fn)(FILE *fp) = BLI_system_backtrace;
   CLG_backtrace_fn_set((void (*)(void *))fn);
   return 0;
 }
diff --git a/tools/utils_maintenance/clang_format_paths.py b/tools/utils_maintenance/clang_format_paths.py
index 45300c91c40..14beb5fdd12 100755
--- a/tools/utils_maintenance/clang_format_paths.py
+++ b/tools/utils_maintenance/clang_format_paths.py
@@ -25,8 +25,8 @@ from typing import (
     Tuple,
 )
 
-VERSION_MIN = (8, 0, 0)
-VERSION_MAX_RECOMMENDED = (12, 0, 0)
+VERSION_MIN = (17, 0, 0)
+VERSION_MAX_RECOMMENDED = (17, 0, 0)
 CLANG_FORMAT_CMD = "clang-format"
 
 BASE_DIR = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))