From f1e49038543cf75766f4a220f62cdc6cdbc0e27d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 26 Jun 2021 21:35:18 +1000 Subject: Cleanup: full sentences in comments, improve comment formatting --- intern/cycles/app/cycles_xml.cpp | 14 +- intern/cycles/blender/blender_curves.cpp | 2 +- intern/cycles/bvh/bvh_split.cpp | 2 +- intern/cycles/device/opencl/opencl_util.cpp | 2 +- .../kernel/geom/geom_motion_triangle_shader.h | 2 +- intern/cycles/kernel/kernel_shader.h | 2 +- intern/cycles/kernel/kernel_subsurface.h | 2 +- intern/cycles/kernel/osl/osl_shader.cpp | 2 +- .../cycles/kernel/split/kernel_split_data_types.h | 2 +- intern/cycles/kernel/svm/svm_image.h | 2 +- intern/cycles/render/geometry.cpp | 4 +- intern/cycles/render/nodes.cpp | 2 +- intern/ghost/GHOST_ISystemPaths.h | 2 +- intern/ghost/intern/GHOST_System.h | 4 +- intern/ghost/intern/GHOST_SystemCocoa.mm | 43 +++--- intern/ghost/intern/GHOST_SystemWin32.cpp | 4 +- intern/ghost/intern/GHOST_Window.h | 2 +- intern/ghost/intern/GHOST_WindowWin32.cpp | 2 +- intern/ghost/intern/GHOST_WindowX11.cpp | 2 +- intern/guardedalloc/test/simpletest/memtest.c | 2 +- intern/openvdb/openvdb_capi.h | 2 +- source/blender/blenfont/intern/blf.c | 2 +- source/blender/blenkernel/BKE_DerivedMesh.h | 2 +- source/blender/blenkernel/BKE_armature.h | 18 ++- source/blender/blenkernel/BKE_cloth.h | 4 +- source/blender/blenkernel/BKE_collision.h | 2 +- source/blender/blenkernel/BKE_customdata.h | 14 +- source/blender/blenkernel/BKE_editmesh.h | 10 +- source/blender/blenkernel/BKE_effect.h | 2 +- source/blender/blenkernel/BKE_global.h | 2 +- source/blender/blenkernel/BKE_idprop.h | 2 +- source/blender/blenkernel/BKE_mesh_remap.h | 2 +- source/blender/blenkernel/BKE_object.h | 15 +- source/blender/blenkernel/BKE_particle.h | 4 +- source/blender/blenkernel/intern/action.c | 2 +- source/blender/blenkernel/intern/appdir.c | 2 +- source/blender/blenkernel/intern/armature.c | 2 +- source/blender/blenkernel/intern/blendfile.c | 2 +- source/blender/blenkernel/intern/bvhutils.c | 2 +- source/blender/blenkernel/intern/collection.c | 2 +- source/blender/blenkernel/intern/colortools.c | 6 +- source/blender/blenkernel/intern/constraint.c | 10 +- source/blender/blenkernel/intern/curve_decimate.c | 4 +- source/blender/blenkernel/intern/customdata.c | 16 +- source/blender/blenkernel/intern/data_transfer.c | 4 +- source/blender/blenkernel/intern/dynamicpaint.c | 4 +- source/blender/blenkernel/intern/editmesh.c | 2 +- source/blender/blenkernel/intern/effect.c | 2 +- source/blender/blenkernel/intern/fcurve.c | 4 +- source/blender/blenkernel/intern/fluid.c | 4 +- source/blender/blenkernel/intern/fmodifier.c | 2 +- source/blender/blenkernel/intern/font.c | 2 +- source/blender/blenkernel/intern/gpencil.c | 28 ++-- source/blender/blenkernel/intern/gpencil_curve.c | 4 +- source/blender/blenkernel/intern/gpencil_geom.c | 6 +- source/blender/blenkernel/intern/idprop.c | 34 ++-- source/blender/blenkernel/intern/image.c | 4 +- source/blender/blenkernel/intern/image_save.c | 2 +- source/blender/blenkernel/intern/layer.c | 2 +- source/blender/blenkernel/intern/mball.c | 2 +- source/blender/blenkernel/intern/mesh.c | 17 +- .../blenkernel/intern/mesh_boolean_convert.cc | 2 +- source/blender/blenkernel/intern/mesh_evaluate.c | 4 +- source/blender/blenkernel/intern/mesh_merge.c | 12 +- source/blender/blenkernel/intern/movieclip.c | 6 +- source/blender/blenkernel/intern/multires.c | 4 +- .../blender/blenkernel/intern/multires_reshape.c | 2 +- .../blenkernel/intern/multires_unsubdivide.c | 2 +- source/blender/blenkernel/intern/nla.c | 4 +- source/blender/blenkernel/intern/node.cc | 6 +- source/blender/blenkernel/intern/object.c | 2 +- source/blender/blenkernel/intern/ocean.c | 16 +- source/blender/blenkernel/intern/ocean_intern.h | 2 +- source/blender/blenkernel/intern/particle.c | 2 +- source/blender/blenkernel/intern/particle_system.c | 18 +-- source/blender/blenkernel/intern/pbvh_bmesh.c | 2 +- source/blender/blenkernel/intern/pointcache.c | 24 +-- source/blender/blenkernel/intern/scene.c | 2 +- source/blender/blenkernel/intern/screen.c | 4 +- source/blender/blenkernel/intern/softbody.c | 172 ++++++++++----------- source/blender/blenkernel/intern/subdiv_ccg.c | 2 +- source/blender/blenkernel/intern/subsurf_ccg.c | 32 ++-- source/blender/blenkernel/intern/workspace.c | 4 +- source/blender/blenlib/BLI_array.h | 5 +- source/blender/blenlib/BLI_buffer.h | 2 +- source/blender/blenlib/BLI_strict_flags.h | 2 +- source/blender/blenlib/BLI_threads.h | 2 +- source/blender/blenlib/intern/boxpack_2d.c | 4 +- source/blender/blenlib/intern/math_base_inline.c | 2 +- source/blender/blenlib/intern/math_color.c | 2 +- source/blender/blenlib/intern/math_geom.c | 24 +-- source/blender/blenlib/intern/math_matrix.c | 12 +- source/blender/blenlib/intern/winstuff.c | 2 +- source/blender/blenlib/tests/BLI_kdopbvh_test.cc | 2 +- source/blender/blenloader/intern/readfile.c | 4 +- source/blender/blenloader/intern/versioning_250.c | 2 +- source/blender/blenloader/intern/versioning_260.c | 2 +- source/blender/blenloader/intern/versioning_280.c | 8 +- source/blender/blenloader/intern/versioning_290.c | 2 +- .../blender/blenloader/intern/versioning_legacy.c | 8 +- source/blender/blentranslation/BLT_translation.h | 4 +- source/blender/bmesh/bmesh_class.h | 8 +- source/blender/bmesh/intern/bmesh_error.h | 23 ++- source/blender/bmesh/intern/bmesh_iterators.h | 4 +- source/blender/bmesh/intern/bmesh_marking.h | 4 +- source/blender/bmesh/intern/bmesh_mesh.c | 38 +++-- source/blender/bmesh/intern/bmesh_mesh_normals.c | 2 +- source/blender/bmesh/intern/bmesh_mods.c | 2 +- source/blender/bmesh/intern/bmesh_operator_api.h | 16 +- source/blender/bmesh/intern/bmesh_operators.h | 2 +- source/blender/bmesh/intern/bmesh_query.c | 2 +- source/blender/bmesh/intern/bmesh_walkers.h | 2 +- source/blender/bmesh/operators/bmo_inset.c | 2 +- .../blender/bmesh/operators/bmo_smooth_laplacian.c | 24 +-- source/blender/bmesh/tools/bmesh_beautify.c | 8 +- .../blender/bmesh/tools/bmesh_decimate_collapse.c | 4 +- source/blender/bmesh/tools/bmesh_intersect.c | 2 +- .../blender/compositor/intern/COM_MemoryBuffer.h | 2 +- source/blender/compositor/intern/COM_MetaData.cc | 2 +- .../blender/compositor/nodes/COM_OutputFileNode.cc | 2 +- .../operations/COM_ChannelMatteOperation.cc | 4 +- .../operations/COM_ChromaMatteOperation.cc | 10 +- .../operations/COM_ColorMatteOperation.cc | 4 +- .../operations/COM_DifferenceMatteOperation.cc | 4 +- .../operations/COM_DistanceRGBMatteOperation.cc | 6 +- .../operations/COM_LuminanceMatteOperation.cc | 2 +- source/blender/depsgraph/DEG_depsgraph_build.h | 2 +- .../draw/engines/eevee/eevee_depth_of_field.c | 2 +- .../blender/draw/engines/eevee/eevee_lightcache.c | 2 +- .../blender/draw/engines/eevee/eevee_subsurface.c | 2 +- source/blender/draw/engines/eevee/eevee_volumes.c | 2 +- .../engines/eevee/shaders/bsdf_common_lib.glsl | 2 +- .../engines/eevee/shaders/closure_type_lib.glsl | 4 +- .../engines/eevee/shaders/common_uniforms_lib.glsl | 2 +- .../eevee/shaders/effect_dof_scatter_vert.glsl | 3 +- .../eevee/shaders/effect_translucency_frag.glsl | 2 +- .../gpencil/shaders/gpencil_common_lib.glsl | 14 +- .../draw/engines/overlay/overlay_particle.c | 2 +- .../shaders/armature_shape_outline_geom.glsl | 2 +- .../draw/engines/workbench/workbench_private.h | 8 +- source/blender/draw/intern/DRW_render.h | 2 +- source/blender/draw/intern/draw_cache.c | 2 +- .../blender/draw/intern/draw_cache_impl_curve.cc | 2 +- .../blender/draw/intern/draw_cache_impl_lattice.c | 2 +- source/blender/draw/intern/draw_manager.c | 2 +- source/blender/editors/animation/anim_draw.c | 2 +- source/blender/editors/animation/anim_filter.c | 2 +- source/blender/editors/animation/drivers.c | 4 +- .../blender/editors/animation/keyframes_general.c | 2 +- source/blender/editors/animation/keyframing.c | 2 +- source/blender/editors/animation/keyingsets.c | 2 +- source/blender/editors/armature/armature_add.c | 2 +- source/blender/editors/armature/armature_edit.c | 6 +- source/blender/editors/armature/armature_utils.c | 2 +- source/blender/editors/armature/pose_lib.c | 4 +- source/blender/editors/armature/pose_slide.c | 4 +- source/blender/editors/gpencil/drawgpencil.c | 2 +- source/blender/editors/gpencil/gpencil_armature.c | 2 +- .../editors/gpencil/gpencil_bake_animation.c | 2 +- source/blender/editors/gpencil/gpencil_convert.c | 4 +- source/blender/editors/gpencil/gpencil_data.c | 14 +- source/blender/editors/gpencil/gpencil_edit.c | 16 +- source/blender/editors/gpencil/gpencil_fill.c | 10 +- source/blender/editors/gpencil/gpencil_mesh.c | 2 +- source/blender/editors/gpencil/gpencil_paint.c | 4 +- source/blender/editors/gpencil/gpencil_select.c | 6 +- source/blender/editors/gpencil/gpencil_utils.c | 10 +- .../blender/editors/gpencil/gpencil_vertex_ops.c | 14 +- .../blender/editors/gpencil/gpencil_vertex_paint.c | 2 +- .../blender/editors/gpencil/gpencil_weight_paint.c | 2 +- source/blender/editors/include/ED_mesh.h | 7 +- source/blender/editors/include/ED_undo.h | 2 +- source/blender/editors/include/UI_interface.h | 4 +- source/blender/editors/interface/interface.c | 10 +- .../interface/interface_eyedropper_gpencil_color.c | 2 +- .../blender/editors/interface/interface_handlers.c | 10 +- source/blender/editors/interface/interface_style.c | 2 +- .../editors/interface/interface_templates.c | 2 +- source/blender/editors/mesh/editmesh_extrude.c | 2 +- source/blender/editors/mesh/editmesh_knife.c | 4 +- source/blender/editors/mesh/editmesh_select.c | 2 +- source/blender/editors/mesh/editmesh_tools.c | 22 +-- source/blender/editors/mesh/editmesh_utils.c | 10 +- source/blender/editors/mesh/mesh_data.c | 2 +- source/blender/editors/mesh/mesh_intern.h | 2 +- source/blender/editors/object/object_bake_api.c | 2 +- .../blender/editors/object/object_data_transfer.c | 10 +- source/blender/editors/object/object_edit.c | 4 +- source/blender/editors/object/object_relations.c | 2 +- source/blender/editors/object/object_select.c | 2 +- source/blender/editors/object/object_transform.c | 6 +- source/blender/editors/object/object_vgroup.c | 10 +- source/blender/editors/physics/particle_edit.c | 8 +- source/blender/editors/physics/physics_intern.h | 2 +- source/blender/editors/render/render_opengl.c | 8 +- source/blender/editors/render/render_shading.c | 2 +- source/blender/editors/screen/area.c | 2 +- source/blender/editors/screen/screen_context.c | 2 +- source/blender/editors/screen/screen_draw.c | 2 +- source/blender/editors/screen/screen_ops.c | 16 +- .../editors/sculpt_paint/paint_image_proj.c | 26 ++-- source/blender/editors/sculpt_paint/paint_ops.c | 6 +- source/blender/editors/sculpt_paint/paint_vertex.c | 4 +- .../blender/editors/sculpt_paint/sculpt_intern.h | 2 +- source/blender/editors/sculpt_paint/sculpt_uv.c | 6 +- source/blender/editors/space_action/action_edit.c | 2 +- .../blender/editors/space_action/action_select.c | 2 +- .../editors/space_buttons/buttons_context.c | 4 +- source/blender/editors/space_console/console_ops.c | 2 +- source/blender/editors/space_file/file_panels.c | 4 +- source/blender/editors/space_graph/graph_draw.c | 2 +- source/blender/editors/space_graph/graph_edit.c | 2 +- .../blender/editors/space_graph/graph_slider_ops.c | 6 +- source/blender/editors/space_graph/graph_view.c | 4 +- source/blender/editors/space_graph/space_graph.c | 2 +- source/blender/editors/space_image/image_ops.c | 2 +- source/blender/editors/space_image/image_undo.c | 2 +- source/blender/editors/space_info/info_report.c | 4 +- source/blender/editors/space_node/drawnode.cc | 10 +- source/blender/editors/space_node/node_edit.cc | 4 +- source/blender/editors/space_node/node_group.cc | 2 +- .../space_outliner/tree/tree_display_libraries.cc | 4 +- source/blender/editors/space_script/space_script.c | 2 +- source/blender/editors/space_text/text_draw.c | 2 +- .../blender/editors/space_text/text_format_pov.c | 4 +- source/blender/editors/space_text/text_ops.c | 6 +- .../blender/editors/space_view3d/view3d_select.c | 2 +- source/blender/editors/space_view3d/view3d_snap.c | 2 +- source/blender/editors/space_view3d/view3d_view.c | 2 +- source/blender/editors/transform/transform.h | 2 +- .../editors/transform/transform_convert_action.c | 2 +- .../editors/transform/transform_convert_gpencil.c | 8 +- .../blender/editors/transform/transform_gizmo_3d.c | 2 +- .../editors/transform/transform_mode_edge_slide.c | 14 +- source/blender/editors/util/ed_transverts.c | 4 +- source/blender/editors/uvedit/uvedit_ops.c | 10 +- .../blender/editors/uvedit/uvedit_parametrizer.c | 24 +-- .../blender/editors/uvedit/uvedit_smart_stitch.c | 6 +- source/blender/editors/uvedit/uvedit_unwrap_ops.c | 8 +- .../blender/freestyle/intern/geometry/SweepLine.h | 2 +- .../freestyle/intern/scene_graph/IndexedFaceSet.h | 2 +- .../blender/freestyle/intern/scene_graph/LineRep.h | 2 +- .../freestyle/intern/scene_graph/TriangleRep.h | 2 +- .../freestyle/intern/stroke/AdvancedFunctions1D.h | 4 +- .../freestyle/intern/stroke/BasicStrokeShaders.h | 6 +- .../freestyle/intern/stroke/ChainingIterators.h | 2 +- source/blender/freestyle/intern/stroke/Curve.h | 2 +- .../blender/freestyle/intern/stroke/Predicates0D.h | 4 +- .../blender/freestyle/intern/stroke/Predicates1D.h | 12 +- source/blender/freestyle/intern/stroke/Stroke.cpp | 4 +- source/blender/freestyle/intern/stroke/Stroke.h | 10 +- .../freestyle/intern/view_map/Functions1D.h | 6 +- .../freestyle/intern/view_map/Interface1D.h | 10 +- .../blender/freestyle/intern/view_map/Silhouette.h | 16 +- .../freestyle/intern/view_map/ViewEdgeXBuilder.cpp | 2 +- source/blender/freestyle/intern/view_map/ViewMap.h | 12 +- .../freestyle/intern/view_map/ViewMapIterators.h | 2 +- .../blender/freestyle/intern/winged_edge/WEdge.h | 2 +- .../intern/lineart/lineart_chain.c | 2 +- .../gpencil_modifiers/intern/lineart/lineart_cpu.c | 8 +- source/blender/gpu/GPU_viewport.h | 14 +- source/blender/gpu/intern/gpu_select_pick.c | 4 +- .../blender/gpu/intern/gpu_select_sample_query.cc | 8 +- source/blender/gpu/intern/gpu_texture.cc | 2 +- source/blender/gpu/intern/gpu_vertex_format.cc | 2 +- source/blender/gpu/intern/gpu_viewport.c | 2 +- source/blender/gpu/opengl/gl_texture.hh | 2 +- .../shaders/gpu_shader_gpencil_stroke_geom.glsl | 4 +- source/blender/ikplugin/intern/iksolver_plugin.c | 2 +- source/blender/ikplugin/intern/itasc_plugin.cpp | 2 +- source/blender/imbuf/intern/dds/ColorBlock.cpp | 2 +- .../blender/imbuf/intern/dds/DirectDrawSurface.h | 2 +- source/blender/imbuf/intern/indexer.c | 2 +- source/blender/imbuf/intern/jp2.c | 30 ++-- source/blender/imbuf/intern/targa.c | 18 +-- source/blender/imbuf/intern/thumbs.c | 2 +- source/blender/io/collada/ArmatureImporter.cpp | 4 +- source/blender/io/collada/BCAnimationCurve.cpp | 2 +- source/blender/io/collada/BCAnimationSampler.cpp | 4 +- source/blender/io/collada/BCAnimationSampler.h | 2 +- source/blender/io/collada/DocumentImporter.h | 8 +- source/blender/io/collada/GeometryExporter.cpp | 2 +- source/blender/io/collada/collada_utils.cpp | 6 +- .../io/gpencil/intern/gpencil_io_export_svg.cc | 2 +- source/blender/io/usd/intern/usd_writer_mesh.cc | 2 +- source/blender/makesdna/DNA_anim_types.h | 2 +- source/blender/makesdna/DNA_armature_types.h | 2 +- source/blender/makesdna/DNA_boid_types.h | 2 +- source/blender/makesdna/DNA_brush_enums.h | 2 +- source/blender/makesdna/DNA_effect_types.h | 20 +-- source/blender/makesdna/DNA_genfile.h | 2 +- source/blender/makesdna/DNA_gpencil_types.h | 2 +- source/blender/makesdna/DNA_ipo_types.h | 4 +- source/blender/makesdna/DNA_lightprobe_types.h | 2 +- source/blender/makesdna/DNA_mesh_types.h | 2 +- source/blender/makesdna/DNA_meta_types.h | 2 +- source/blender/makesdna/DNA_modifier_types.h | 2 +- .../blender/makesdna/DNA_object_fluidsim_types.h | 2 +- source/blender/makesdna/DNA_object_force_types.h | 4 +- source/blender/makesdna/DNA_object_types.h | 8 +- source/blender/makesdna/DNA_particle_types.h | 10 +- source/blender/makesdna/DNA_scene_types.h | 2 +- source/blender/makesdna/DNA_screen_types.h | 4 +- source/blender/makesdna/DNA_sequence_types.h | 4 +- source/blender/makesdna/DNA_space_types.h | 4 +- source/blender/makesdna/DNA_userdef_types.h | 2 +- source/blender/makesdna/intern/makesdna.c | 6 +- source/blender/makesrna/RNA_types.h | 2 +- source/blender/makesrna/intern/rna_access.c | 8 +- source/blender/makesrna/intern/rna_animation_api.c | 2 +- source/blender/makesrna/intern/rna_armature.c | 2 +- source/blender/makesrna/intern/rna_boid.c | 10 +- source/blender/makesrna/intern/rna_curve.c | 10 +- source/blender/makesrna/intern/rna_define.c | 2 +- source/blender/makesrna/intern/rna_dynamicpaint.c | 2 +- source/blender/makesrna/intern/rna_fcurve.c | 6 +- source/blender/makesrna/intern/rna_mask.c | 2 +- source/blender/makesrna/intern/rna_mesh.c | 2 +- source/blender/makesrna/intern/rna_object_force.c | 10 +- source/blender/makesrna/intern/rna_particle.c | 32 ++-- source/blender/makesrna/intern/rna_rna.c | 4 +- source/blender/makesrna/intern/rna_scene.c | 2 +- source/blender/makesrna/intern/rna_sound.c | 2 +- source/blender/makesrna/intern/rna_userdef.c | 2 +- source/blender/makesrna/intern/rna_wm.c | 2 +- source/blender/modifiers/intern/MOD_edgesplit.c | 2 +- source/blender/modifiers/intern/MOD_explode.c | 2 +- .../blender/modifiers/intern/MOD_laplaciansmooth.c | 26 ++-- source/blender/modifiers/intern/MOD_meshcache.c | 6 +- .../modifiers/intern/MOD_particleinstance.c | 4 +- source/blender/modifiers/intern/MOD_screw.c | 48 +++--- source/blender/modifiers/intern/MOD_subsurf.c | 2 +- source/blender/modifiers/intern/MOD_wave.c | 4 +- .../composite/nodes/node_composite_channelMatte.c | 8 +- .../nodes/composite/nodes/node_composite_levels.c | 2 +- .../nodes/composite/nodes/node_composite_rotate.c | 2 +- .../nodes/shader/nodes/node_shader_hair_info.c | 2 +- source/blender/python/generic/bgl.c | 40 ++--- source/blender/python/generic/idprop_py_api.c | 20 +-- source/blender/python/gpu/gpu_py_buffer.c | 12 +- source/blender/python/intern/bpy_driver.c | 2 +- source/blender/python/intern/bpy_rna.c | 14 +- source/blender/python/intern/bpy_rna.h | 2 +- source/blender/python/intern/bpy_rna_array.c | 4 +- source/blender/python/mathutils/mathutils_Color.h | 2 +- source/blender/python/mathutils/mathutils_Matrix.c | 28 ++-- .../python/mathutils/mathutils_Quaternion.c | 2 +- source/blender/python/mathutils/mathutils_Vector.c | 8 +- .../blender/python/mathutils/mathutils_geometry.c | 4 +- source/blender/python/mathutils/mathutils_noise.c | 2 +- source/blender/render/intern/multires_bake.c | 2 +- source/blender/render/intern/pipeline.c | 2 +- source/blender/render/intern/render_result.c | 2 +- .../blender/render/intern/texture_pointdensity.c | 2 +- source/blender/sequencer/intern/effects.c | 2 +- source/blender/sequencer/intern/modifier.c | 2 +- source/blender/sequencer/intern/prefetch.c | 4 +- source/blender/sequencer/intern/strip_time.c | 2 +- .../blender/simulation/intern/SIM_mass_spring.cpp | 8 +- source/blender/simulation/intern/hair_volume.cpp | 4 +- .../blender/simulation/intern/implicit_blender.c | 8 +- source/blender/windowmanager/WM_types.h | 5 +- .../blender/windowmanager/intern/wm_keymap_utils.c | 2 +- source/blender/windowmanager/intern/wm_operators.c | 8 +- source/blender/windowmanager/intern/wm_window.c | 2 +- source/blender/windowmanager/wm_event_types.h | 2 +- 366 files changed, 1127 insertions(+), 1099 deletions(-) diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp index d2aecf75121..276d850f1b3 100644 --- a/intern/cycles/app/cycles_xml.cpp +++ b/intern/cycles/app/cycles_xml.cpp @@ -51,12 +51,12 @@ CCL_NAMESPACE_BEGIN /* XML reading state */ struct XMLReadState : public XMLReader { - Scene *scene; /* scene pointer */ - Transform tfm; /* current transform state */ - bool smooth; /* smooth normal state */ - Shader *shader; /* current shader */ - string base; /* base path to current file*/ - float dicing_rate; /* current dicing rate */ + Scene *scene; /* Scene pointer. */ + Transform tfm; /* Current transform state. */ + bool smooth; /* Smooth normal state. */ + Shader *shader; /* Current shader. */ + string base; /* Base path to current file. */ + float dicing_rate; /* Current dicing rate. */ XMLReadState() : scene(NULL), smooth(false), shader(NULL), dicing_rate(1.0f) { @@ -385,7 +385,7 @@ static Mesh *xml_add_mesh(Scene *scene, const Transform &tfm) Mesh *mesh = new Mesh(); scene->geometry.push_back(mesh); - /* create object*/ + /* Create object. */ Object *object = new Object(); object->set_geometry(mesh); object->set_tfm(tfm); diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp index 7fe49a6c63b..85d886fd850 100644 --- a/intern/cycles/blender/blender_curves.cpp +++ b/intern/cycles/blender/blender_curves.cpp @@ -533,7 +533,7 @@ void BlenderSync::sync_particle_hair( return; } - /* extract particle hair data - should be combined with connecting to mesh later*/ + /* Extract particle hair data - should be combined with connecting to mesh later. */ ParticleCurveData CData; diff --git a/intern/cycles/bvh/bvh_split.cpp b/intern/cycles/bvh/bvh_split.cpp index 834b07440d8..d4c79253834 100644 --- a/intern/cycles/bvh/bvh_split.cpp +++ b/intern/cycles/bvh/bvh_split.cpp @@ -388,7 +388,7 @@ void BVHSpatialSplit::split_curve_primitive(const Hair *hair, BoundBox &left_bounds, BoundBox &right_bounds) { - /* curve split: NOTE - Currently ignores curve width and needs to be fixed.*/ + /* curve split: NOTE - Currently ignores curve width and needs to be fixed. */ Hair::Curve curve = hair->get_curve(prim_index); const int k0 = curve.first_key + segment_index; const int k1 = k0 + 1; diff --git a/intern/cycles/device/opencl/opencl_util.cpp b/intern/cycles/device/opencl/opencl_util.cpp index be9efcd43ee..3929cf77f15 100644 --- a/intern/cycles/device/opencl/opencl_util.cpp +++ b/intern/cycles/device/opencl/opencl_util.cpp @@ -1186,7 +1186,7 @@ bool OpenCLInfo::get_device_extensions(cl_device_id device_id, { size_t extension_length = 0; cl_int err; - /* Determine the size of the extension string*/ + /* Determine the size of the extension string. */ if ((err = clGetDeviceInfo(device_id, CL_DEVICE_EXTENSIONS, 0, 0, &extension_length)) != CL_SUCCESS) { if (error != NULL) { diff --git a/intern/cycles/kernel/geom/geom_motion_triangle_shader.h b/intern/cycles/kernel/geom/geom_motion_triangle_shader.h index 5333e82b346..7a91f8041f7 100644 --- a/intern/cycles/kernel/geom/geom_motion_triangle_shader.h +++ b/intern/cycles/kernel/geom/geom_motion_triangle_shader.h @@ -66,7 +66,7 @@ ccl_device_noinline void motion_triangle_shader_setup( sd->P = motion_triangle_refine_local(kg, sd, isect, ray, verts); } else -#endif /* __BVH_LOCAL__*/ +#endif /* __BVH_LOCAL__*/ { sd->P = motion_triangle_refine(kg, sd, isect, ray, verts); } diff --git a/intern/cycles/kernel/kernel_shader.h b/intern/cycles/kernel/kernel_shader.h index e6bd99414cc..92b4a9cbf9e 100644 --- a/intern/cycles/kernel/kernel_shader.h +++ b/intern/cycles/kernel/kernel_shader.h @@ -274,7 +274,7 @@ ccl_device_inline void shader_setup_from_sample(KernelGlobals *kg, /* primitive */ sd->object = object; sd->lamp = LAMP_NONE; - /* currently no access to bvh prim index for strand sd->prim*/ + /* Currently no access to bvh prim index for strand sd->prim. */ sd->prim = prim; sd->u = u; sd->v = v; diff --git a/intern/cycles/kernel/kernel_subsurface.h b/intern/cycles/kernel/kernel_subsurface.h index dd922b86722..677504a4045 100644 --- a/intern/cycles/kernel/kernel_subsurface.h +++ b/intern/cycles/kernel/kernel_subsurface.h @@ -409,7 +409,7 @@ ccl_device void subsurface_random_walk_coefficients(const ShaderClosure *sc, ccl_device_forceinline float eval_phase_dwivedi(float v, float phase_log, float cos_theta) { - /* Eq. 9 from [2] using precomputed log((v + 1) / (v - 1))*/ + /* Eq. 9 from [2] using precomputed log((v + 1) / (v - 1)) */ return 1.0f / ((v - cos_theta) * phase_log); } diff --git a/intern/cycles/kernel/osl/osl_shader.cpp b/intern/cycles/kernel/osl/osl_shader.cpp index 8606c459375..389c854c495 100644 --- a/intern/cycles/kernel/osl/osl_shader.cpp +++ b/intern/cycles/kernel/osl/osl_shader.cpp @@ -49,7 +49,7 @@ void OSLShader::thread_init(KernelGlobals *kg, return; } - /* per thread kernel data init*/ + /* Per thread kernel data init. */ kg->osl = osl_globals; OSL::ShadingSystem *ss = kg->osl->ss; diff --git a/intern/cycles/kernel/split/kernel_split_data_types.h b/intern/cycles/kernel/split/kernel_split_data_types.h index ac4a450ca2b..06bdce9947d 100644 --- a/intern/cycles/kernel/split/kernel_split_data_types.h +++ b/intern/cycles/kernel/split/kernel_split_data_types.h @@ -68,7 +68,7 @@ typedef ccl_global struct SplitBranchedState { uint lcg_state; LocalIntersection ss_isect; -# endif /*__SUBSURFACE__ */ +# endif /* __SUBSURFACE__ */ int shared_sample_count; /* number of branched samples shared with other threads */ int original_ray; /* index of original ray when sharing branched samples */ diff --git a/intern/cycles/kernel/svm/svm_image.h b/intern/cycles/kernel/svm/svm_image.h index 742addab611..9348ddabde5 100644 --- a/intern/cycles/kernel/svm/svm_image.h +++ b/intern/cycles/kernel/svm/svm_image.h @@ -182,7 +182,7 @@ ccl_device void svm_node_tex_image_box(KernelGlobals *kg, ShaderData *sd, float } } else { - /* Desperate mode, no valid choice anyway, fallback to one side.*/ + /* Desperate mode, no valid choice anyway, fallback to one side. */ weight.x = 1.0f; } diff --git a/intern/cycles/render/geometry.cpp b/intern/cycles/render/geometry.cpp index ce76658acb6..6d084e82576 100644 --- a/intern/cycles/render/geometry.cpp +++ b/intern/cycles/render/geometry.cpp @@ -676,8 +676,8 @@ void GeometryManager::update_attribute_element_offset(Geometry *geom, Mesh *mesh = static_cast(geom); if (mesh->subdivision_type == Mesh::SUBDIVISION_CATMULL_CLARK && desc.flags & ATTR_SUBDIVIDED) { - /* indices for subdivided attributes are retrieved - * from patch table so no need for correction here*/ + /* Indices for subdivided attributes are retrieved + * from patch table so no need for correction here. */ } else if (element == ATTR_ELEMENT_VERTEX) offset -= mesh->vert_offset; diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp index 7ce65a0d1c9..42cba342bf8 100644 --- a/intern/cycles/render/nodes.cpp +++ b/intern/cycles/render/nodes.cpp @@ -4374,7 +4374,7 @@ NODE_DEFINE(HairInfoNode) SOCKET_OUT_FLOAT(intercept, "Intercept"); SOCKET_OUT_FLOAT(thickness, "Thickness"); SOCKET_OUT_NORMAL(tangent_normal, "Tangent Normal"); -#if 0 /*output for minimum hair width transparency - deactivated */ +#if 0 /* Output for minimum hair width transparency - deactivated. */ SOCKET_OUT_FLOAT(fade, "Fade"); #endif SOCKET_OUT_FLOAT(index, "Random"); diff --git a/intern/ghost/GHOST_ISystemPaths.h b/intern/ghost/GHOST_ISystemPaths.h index e7ac752d322..74285b7e0ce 100644 --- a/intern/ghost/GHOST_ISystemPaths.h +++ b/intern/ghost/GHOST_ISystemPaths.h @@ -95,7 +95,7 @@ class GHOST_ISystemPaths { virtual void addToSystemRecentFiles(const char *filename) const = 0; private: - /** The one and only system paths*/ + /** The one and only system paths. */ static GHOST_ISystemPaths *m_systemPaths; #ifdef WITH_CXX_GUARDEDALLOC diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h index 279f90b9641..87ba0ae9c8c 100644 --- a/intern/ghost/intern/GHOST_System.h +++ b/intern/ghost/intern/GHOST_System.h @@ -328,8 +328,8 @@ class GHOST_System : public GHOST_ISystem { */ virtual GHOST_TSuccess showMessageBox(const char * /*title*/, const char * /*message*/, - const char * /*help_label */, - const char * /*continue_label */, + const char * /*help_label*/, + const char * /*continue_label*/, const char * /*link*/, GHOST_DialogOptions /*dialog_options*/) const { diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index e0e4438a8b2..97c5652f112 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -86,7 +86,8 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction) { // printf("\nrecvchar %c 0x%x",recvChar,recvChar); switch (rawCode) { - /*Physical keycodes not used due to map changes in int'l keyboards + /* Physical key-codes: (not used due to map changes in int'l keyboards). */ +#if 0 case kVK_ANSI_A: return GHOST_kKeyA; case kVK_ANSI_B: return GHOST_kKeyB; case kVK_ANSI_C: return GHOST_kKeyC; @@ -112,9 +113,9 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction) case kVK_ANSI_W: return GHOST_kKeyW; case kVK_ANSI_X: return GHOST_kKeyX; case kVK_ANSI_Y: return GHOST_kKeyY; - case kVK_ANSI_Z: return GHOST_kKeyZ;*/ - - /* Numbers keys mapped to handle some int'l keyboard (e.g. French)*/ + case kVK_ANSI_Z: return GHOST_kKeyZ; +#endif + /* Numbers keys: mapped to handle some int'l keyboard (e.g. French). */ case kVK_ISO_Section: return GHOST_kKeyUnknown; case kVK_ANSI_1: @@ -244,8 +245,8 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction) return GHOST_kKeyUpPage; case kVK_PageDown: return GHOST_kKeyDownPage; - - /*case kVK_ANSI_Minus: return GHOST_kKeyMinus; +#if 0 /* TODO: why are these commented? */ + case kVK_ANSI_Minus: return GHOST_kKeyMinus; case kVK_ANSI_Equal: return GHOST_kKeyEqual; case kVK_ANSI_Comma: return GHOST_kKeyComma; case kVK_ANSI_Period: return GHOST_kKeyPeriod; @@ -255,15 +256,15 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction) case kVK_ANSI_Backslash: return GHOST_kKeyBackslash; case kVK_ANSI_LeftBracket: return GHOST_kKeyLeftBracket; case kVK_ANSI_RightBracket: return GHOST_kKeyRightBracket; - case kVK_ANSI_Grave: return GHOST_kKeyAccentGrave;*/ - + case kVK_ANSI_Grave: return GHOST_kKeyAccentGrave; +#endif case kVK_VolumeUp: case kVK_VolumeDown: case kVK_Mute: return GHOST_kKeyUnknown; default: { - /* alphanumerical or punctuation key that is remappable in int'l keyboards */ + /* Alphanumerical or punctuation key that is remappable in int'l keyboards. */ if ((recvChar >= 'A') && (recvChar <= 'Z')) { return (GHOST_TKey)(recvChar - 'A' + GHOST_kKeyA); } @@ -271,8 +272,8 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction) return (GHOST_TKey)(recvChar - 'a' + GHOST_kKeyA); } else { - /* Leopard and Snow Leopard 64bit compatible API*/ - CFDataRef uchrHandle; /*the keyboard layout*/ + /* Leopard and Snow Leopard 64bit compatible API. */ + CFDataRef uchrHandle; /* The keyboard layout. */ TISInputSourceRef kbdTISHandle; kbdTISHandle = TISCopyCurrentKeyboardLayoutInputSource(); @@ -280,9 +281,9 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction) kTISPropertyUnicodeKeyLayoutData); CFRelease(kbdTISHandle); - /*get actual character value of the "remappable" keys in int'l keyboards, - if keyboard layout is not correctly reported (e.g. some non Apple keyboards in Tiger), - then fallback on using the received charactersIgnoringModifiers */ + /* Get actual character value of the "remappable" keys in int'l keyboards, + * if keyboard layout is not correctly reported (e.g. some non Apple keyboards in Tiger), + * then fallback on using the received #charactersIgnoringModifiers. */ if (uchrHandle) { UInt32 deadKeyState = 0; UniCharCount actualStrLength = 0; @@ -433,8 +434,10 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) // So WM_exit needs to be called directly, as the event loop will never run before termination - (void)applicationWillTerminate:(NSNotification *)aNotification { - /*G.is_break = FALSE; //Let Cocoa perform the termination at the end - WM_exit(C);*/ +#if 0 + G.is_break = false; /* Let Cocoa perform the termination at the end. */ + WM_exit(C); +#endif } - (void)applicationWillBecomeActive:(NSNotification *)aNotification @@ -1215,7 +1218,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType return GHOST_kFailure; } - /*Get the bitmap of the image*/ + /* Get the bitmap of the image. */ enumerator = [[droppedImg representations] objectEnumerator]; while ((representation = [enumerator nextObject])) { if ([representation isKindOfClass:[NSBitmapImageRep class]]) { @@ -1228,7 +1231,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType if (([bitmapImage bitsPerPixel] == 32) && (([bitmapImage bitmapFormat] & 0x5) == 0) && ![bitmapImage isPlanar]) { - /* Try a fast copy if the image is a meshed RGBA 32bit bitmap*/ + /* Try a fast copy if the image is a meshed RGBA 32bit bitmap. */ toIBuf = (GHOST_TUns8 *)ibuf->rect; rasterRGB = (GHOST_TUns8 *)[bitmapImage bitmapData]; for (y = 0; y < imgSize.height; y++) { @@ -1258,7 +1261,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType colorSpaceName:NSDeviceRGBColorSpace bitmapFormat:(NSBitmapFormat)0 bytesPerRow:4 * imgSize.width - bitsPerPixel:32 /*RGB format padded to 32bits*/]; + bitsPerPixel:32 /* RGB format padded to 32bits. */]; [NSGraphicsContext saveGraphicsState]; [NSGraphicsContext @@ -1305,7 +1308,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType return GHOST_kFailure; } - /*Copy the image to ibuf, flipping it vertically*/ + /* Copy the image to ibuf, flipping it vertically. */ toIBuf = (GHOST_TUns8 *)ibuf->rect; for (y = 0; y < imgSize.height; y++) { for (x = 0; x < imgSize.width; x++) { diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index e9fd771e866..cdfb950a72c 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -1503,7 +1503,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, case WM_SYSKEYDOWN: case WM_KEYUP: case WM_SYSKEYUP: - /* These functions were replaced by WM_INPUT*/ + /* These functions were replaced by #WM_INPUT. */ case WM_CHAR: /* The WM_CHAR message is posted to the window with the keyboard focus when * a WM_KEYDOWN message is translated by the TranslateMessage function. WM_CHAR @@ -1851,7 +1851,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, * to perform any move or size change processing during the WM_WINDOWPOSCHANGED * message without calling DefWindowProc. */ - /* see WM_SIZE comment*/ + /* See #WM_SIZE comment. */ if (window->m_inLiveResize) { system->pushEvent(processWindowEvent(GHOST_kEventWindowMove, window)); system->dispatchEvents(); diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h index 1f2fed5b823..3542c6f2bcf 100644 --- a/intern/ghost/intern/GHOST_Window.h +++ b/intern/ghost/intern/GHOST_Window.h @@ -365,7 +365,7 @@ class GHOST_Window : public GHOST_IWindow { /** The current grabbed state of the cursor */ GHOST_TGrabCursorMode m_cursorGrab; - /** Grab cursor axis.*/ + /** Grab cursor axis. */ GHOST_TAxisFlag m_cursorGrabAxis; /** Initial grab location. */ diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 0a647c446e7..82b86863125 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -287,7 +287,7 @@ void GHOST_WindowWin32::setTitle(const char *title) std::string GHOST_WindowWin32::getTitle() const { - char buf[s_maxTitleLength]; /*CHANGE + never used yet*/ + char buf[s_maxTitleLength]; /* CHANGE + never used yet. */ ::GetWindowText(m_hWnd, buf, s_maxTitleLength); return std::string(buf); } diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index 10ef57c3a0a..ea798441adb 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -1241,7 +1241,7 @@ GHOST_WindowX11::~GHOST_WindowX11() if (m_valid_setup) { static Atom Primary_atom, Clipboard_atom; Window p_owner, c_owner; - /*Change the owner of the Atoms to None if we are the owner*/ + /* Change the owner of the Atoms to None if we are the owner. */ Primary_atom = XInternAtom(m_display, "PRIMARY", False); Clipboard_atom = XInternAtom(m_display, "CLIPBOARD", False); diff --git a/intern/guardedalloc/test/simpletest/memtest.c b/intern/guardedalloc/test/simpletest/memtest.c index f19ca4c4368..498857de8ea 100644 --- a/intern/guardedalloc/test/simpletest/memtest.c +++ b/intern/guardedalloc/test/simpletest/memtest.c @@ -115,7 +115,7 @@ int main(int argc, char *argv[]) p[i] = MEM_callocN(blocksize, strdup(tagstring)); } - /* now corrupt a few blocks...*/ + /* Now corrupt a few blocks. */ ip = (int *)p[5] - 50; for (i = 0; i < 1000; i++, ip++) *ip = i + 1; diff --git a/intern/openvdb/openvdb_capi.h b/intern/openvdb/openvdb_capi.h index ea963a269fc..98d89c340bf 100644 --- a/intern/openvdb/openvdb_capi.h +++ b/intern/openvdb/openvdb_capi.h @@ -85,7 +85,7 @@ struct OpenVDBRemeshData { int out_tottris; int filter_type; enum OpenVDBLevelSet_FilterType filter_bias; - enum OpenVDBLevelSet_FilterBias filter_width; /* Parameter for gaussian, median, mean*/ + enum OpenVDBLevelSet_FilterBias filter_width; /* Parameter for gaussian, median, mean. */ float voxel_size; float isovalue; diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index 4d483934717..7428798581d 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -206,7 +206,7 @@ int BLF_load_mem(const char *name, const unsigned char *mem, int mem_size) { int i = blf_search(name); if (i >= 0) { - /*font = global_font[i];*/ /*UNUSED*/ + // font = global_font[i]; /* UNUSED */ return i; } return BLF_load_mem_unique(name, mem, mem_size); diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index 7d553b68185..684296381eb 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -329,7 +329,7 @@ void DM_copy_vert_data(struct DerivedMesh *source, int dest_index, int count); -/*sets up mpolys for a DM based on face iterators in source*/ +/* Sets up mpolys for a DM based on face iterators in source. */ void DM_DupPolys(DerivedMesh *source, DerivedMesh *target); void DM_ensure_normals(DerivedMesh *dm); diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index 112b8bf3ad4..07b7aa2ec50 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -49,24 +49,30 @@ typedef struct EditBone { struct EditBone *next, *prev; /** User-Defined Properties on this Bone */ struct IDProperty *prop; - /** Editbones have a one-way link (i.e. children refer + /** + * Editbones have a one-way link (i.e. children refer * to parents. This is converted to a two-way link for - * normal bones when leaving editmode. */ + * normal bones when leaving editmode. + */ struct EditBone *parent; /** (64 == MAXBONENAME) */ char name[64]; - /** Roll along axis. We'll ultimately use the axis/angle method + /** + * Roll along axis. We'll ultimately use the axis/angle method * for determining the transformation matrix of the bone. The axis * is tail-head while roll provides the angle. Refer to Graphics - * Gems 1 p. 466 (section IX.6) if it's not already in here somewhere*/ + * Gems 1 p. 466 (section IX.6) if it's not already in here somewhere. + */ float roll; /** Orientation and length is implicit during editing */ float head[3]; float tail[3]; - /** All joints are considered to have zero rotation with respect to + /** + * All joints are considered to have zero rotation with respect to * their parents. Therefore any rotations specified during the - * animation are automatically relative to the bones' rest positions*/ + * animation are automatically relative to the bones' rest positions. + */ int flag; int layer; char inherit_scale_mode; diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index fce9156c19b..a0e3d5dc142 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -107,7 +107,7 @@ typedef struct ClothVertex { float v[3]; /* The velocity of the point. */ float xconst[3]; /* constrained position */ float x[3]; /* The current position of this vertex. */ - float xold[3]; /* The previous position of this vertex.*/ + float xold[3]; /* The previous position of this vertex. */ float tx[3]; /* temporary position */ float txold[3]; /* temporary old position */ float tv[3]; /* temporary "velocity", mostly used as tv = tx-txold */ @@ -194,7 +194,7 @@ typedef struct ClothSpring { } \ ((void)0) -/* Spring types as defined in the paper.*/ +/* Spring types as defined in the paper. */ typedef enum { CLOTH_SPRING_TYPE_STRUCTURAL = (1 << 1), CLOTH_SPRING_TYPE_SHEAR = (1 << 2), diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h index ff1bca896b1..2c21b7355d6 100644 --- a/source/blender/blenkernel/BKE_collision.h +++ b/source/blender/blenkernel/BKE_collision.h @@ -63,7 +63,7 @@ typedef struct CollPair { float time; /* collision time, from 0 up to 1 */ /* mesh-mesh collision */ -#ifdef WITH_ELTOPO /*either ap* or bp* can be set, but not both*/ +#ifdef WITH_ELTOPO /* Either ap* or bp* can be set, but not both. */ float bary[3]; int ap1, ap2, ap3, collp, bp1, bp2, bp3; int collface; diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index 6d6639b1e70..d41b3f9f956 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -41,7 +41,7 @@ struct CustomData_MeshMasks; struct ID; typedef uint64_t CustomDataMask; -/*a data type large enough to hold 1 element from any customdata layer type*/ +/* A data type large enough to hold 1 element from any custom-data layer type. */ typedef struct { unsigned char data[64]; } CDBlockBytes; @@ -109,9 +109,9 @@ bool CustomData_bmesh_has_free(const struct CustomData *data); */ bool CustomData_has_referenced(const struct CustomData *data); -/* copies the "value" (e.g. mloopuv uv or mloopcol colors) from one block to +/* Copies the "value" (e.g. mloopuv uv or mloopcol colors) from one block to * another, while not overwriting anything else (e.g. flags). probably only - * implemented for mloopuv/mloopcol, for now.*/ + * implemented for mloopuv/mloopcol, for now. */ void CustomData_data_copy_value(int type, const void *source, void *dest); /* Same as above, but doing advanced mixing. @@ -121,7 +121,7 @@ void CustomData_data_mix_value( /* compares if data1 is equal to data2. type is a valid CustomData type * enum (e.g. CD_MLOOPUV). the layer type's equal function is used to compare - * the data, if it exists, otherwise memcmp is used.*/ + * the data, if it exists, otherwise memcmp is used. */ bool CustomData_data_equals(int type, const void *data1, const void *data2); void CustomData_data_initminmax(int type, void *min, void *max); void CustomData_data_dominmax(int type, const void *data, void *min, void *max); @@ -158,7 +158,7 @@ void CustomData_realloc(struct CustomData *data, int totelem); /* bmesh version of CustomData_merge; merges the layouts of source and dest, * then goes through the mesh and makes sure all the customdata blocks are - * consistent with the new layout.*/ + * consistent with the new layout. */ bool CustomData_bmesh_merge(const struct CustomData *source, struct CustomData *dest, CustomDataMask mask, @@ -186,7 +186,7 @@ void CustomData_free_temporary(struct CustomData *data, int totelem); */ void *CustomData_add_layer( struct CustomData *data, int type, eCDAllocType alloctype, void *layer, int totelem); -/*same as above but accepts a name */ +/* Same as above but accepts a name. */ void *CustomData_add_layer_named(struct CustomData *data, int type, eCDAllocType alloctype, @@ -446,7 +446,7 @@ void CustomData_validate_layer_name(const struct CustomData *data, * only after this test passes, layer->data should be assigned */ bool CustomData_verify_versions(struct CustomData *data, int index); -/*BMesh specific customdata stuff*/ +/* BMesh specific custom-data stuff. */ void CustomData_to_bmeshpoly(struct CustomData *fdata, struct CustomData *ldata, int totloop); void CustomData_from_bmeshpoly(struct CustomData *fdata, struct CustomData *ldata, int total); void CustomData_bmesh_update_active_layers(struct CustomData *fdata, struct CustomData *ldata); diff --git a/source/blender/blenkernel/BKE_editmesh.h b/source/blender/blenkernel/BKE_editmesh.h index 075a9bc0eac..e31a0a16408 100644 --- a/source/blender/blenkernel/BKE_editmesh.h +++ b/source/blender/blenkernel/BKE_editmesh.h @@ -53,12 +53,12 @@ struct Scene; typedef struct BMEditMesh { struct BMesh *bm; - /*this is for undoing failed operations*/ + /* This is for undoing failed operations. */ struct BMEditMesh *emcopy; int emcopyusers; /* we store tessellations as triplets of three loops, - * which each define a triangle.*/ + * which each define a triangle. */ struct BMLoop *(*looptris)[3]; int tottri; @@ -67,14 +67,14 @@ typedef struct BMEditMesh { /** Cached cage bounding box for selection. */ struct BoundBox *bb_cage; - /*derivedmesh stuff*/ + /** Evaluated mesh data-mask. */ CustomData_MeshMasks lastDataMask; - /*selection mode*/ + /* Selection mode. */ short selectmode; short mat_nr; - /*temp variables for x-mirror editing*/ + /* Temp variables for x-mirror editing. */ int mirror_cdlayer; /* -1 is invalid */ /** diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h index 231a4563630..3a964ddb1aa 100644 --- a/source/blender/blenkernel/BKE_effect.h +++ b/source/blender/blenkernel/BKE_effect.h @@ -179,7 +179,7 @@ unsigned int BKE_sim_debug_data_hash(int i); unsigned int BKE_sim_debug_data_hash_combine(unsigned int kx, unsigned int ky); /* _VA_SIM_DEBUG_HASH#(i, ...): combined hash value of multiple integers */ -/* internal helpers*/ +/* Internal helpers. */ #define _VA_SIM_DEBUG_HASH1(a) (BKE_sim_debug_data_hash(a)) #define _VA_SIM_DEBUG_HASH2(a, b) \ (BKE_sim_debug_data_hash_combine(BKE_sim_debug_data_hash(a), _VA_SIM_DEBUG_HASH1(b))) diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index 74f2bf7c6ad..69c950a86dc 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -149,7 +149,7 @@ enum { G_DEBUG_DEPSGRAPH_TIME | G_DEBUG_DEPSGRAPH_UUID), G_DEBUG_SIMDATA = (1 << 15), /* sim debug data display */ G_DEBUG_GPU = (1 << 16), /* gpu debug */ - G_DEBUG_IO = (1 << 17), /* IO Debugging (for Collada, ...)*/ + G_DEBUG_IO = (1 << 17), /* IO Debugging (for Collada, ...). */ G_DEBUG_GPU_FORCE_WORKAROUNDS = (1 << 18), /* force gpu workarounds bypassing detections. */ G_DEBUG_XR = (1 << 19), /* XR/OpenXR messages */ G_DEBUG_XR_TIME = (1 << 20), /* XR/OpenXR timing messages */ diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h index bcf35bf1197..a5cb6489194 100644 --- a/source/blender/blenkernel/BKE_idprop.h +++ b/source/blender/blenkernel/BKE_idprop.h @@ -67,7 +67,7 @@ void IDP_AppendArray(struct IDProperty *prop, struct IDProperty *item); void IDP_ResizeIDPArray(struct IDProperty *prop, int len); /* ----------- Numeric Array Type ----------- */ -/*this function works for strings too!*/ +/* This function works for strings too! */ void IDP_ResizeArray(struct IDProperty *prop, int newlen); void IDP_FreeArray(struct IDProperty *prop); diff --git a/source/blender/blenkernel/BKE_mesh_remap.h b/source/blender/blenkernel/BKE_mesh_remap.h index d9b6ab3813e..02f8af6443c 100644 --- a/source/blender/blenkernel/BKE_mesh_remap.h +++ b/source/blender/blenkernel/BKE_mesh_remap.h @@ -36,7 +36,7 @@ typedef struct MeshPairRemapItem { int sources_num; int *indices_src; /* NULL if no source found. */ float *weights_src; /* NULL if no source found, else, always normalized! */ - /* UNUSED (at the moment)*/ + /* UNUSED (at the moment). */ // float hit_dist; /* FLT_MAX if irrelevant or no source found. */ int island; /* For loops only. */ } MeshPairRemapItem; diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index 748adc7acd5..af9f5d7bf22 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -382,14 +382,13 @@ void BKE_object_data_batch_cache_dirty_tag(struct ID *object_data); /* this function returns a superset of the scenes selection based on relationships */ typedef enum eObRelationTypes { - OB_REL_NONE = 0, /* just the selection as is */ - OB_REL_PARENT = (1 << 0), /* immediate parent */ - OB_REL_PARENT_RECURSIVE = (1 << 1), /* parents up to root of selection tree*/ - OB_REL_CHILDREN = (1 << 2), /* immediate children */ - OB_REL_CHILDREN_RECURSIVE = (1 << 3), /* All children */ - OB_REL_MOD_ARMATURE = (1 << 4), /* Armatures related to the selected objects */ - /* OB_REL_SCENE_CAMERA = (1 << 5), */ /* you might want the scene camera too even if unselected? - */ + OB_REL_NONE = 0, /* Just the selection as is. */ + OB_REL_PARENT = (1 << 0), /* Immediate parent. */ + OB_REL_PARENT_RECURSIVE = (1 << 1), /* Parents up to root of selection tree. */ + OB_REL_CHILDREN = (1 << 2), /* Immediate children. */ + OB_REL_CHILDREN_RECURSIVE = (1 << 3), /* All children. */ + OB_REL_MOD_ARMATURE = (1 << 4), /* Armatures related to the selected objects. */ + // OB_REL_SCENE_CAMERA = (1 << 5), /* You might want the scene camera too even if unselected? */ } eObRelationTypes; typedef enum eObjectSet { diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index 3913ede9049..e5b547d2557 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -78,7 +78,7 @@ struct Scene; for (p = 0; p < psys->totpart; p++) \ if ((pa = psys->particles + p)->state.time > 0.0f) -/* fast but sure way to get the modifier*/ +/* Fast but sure way to get the modifier. */ #define PARTICLE_PSMD \ ParticleSystemModifierData *psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys) @@ -190,7 +190,7 @@ typedef struct ParticleCollisionElement { /* pointers to original data */ float *x[3], *v[3]; - /* values interpolated from original data*/ + /* Values interpolated from original data. */ float x0[3], x1[3], x2[3], p[3]; /* results for found intersection point */ diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 3c773cd1611..cf7023bc672 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -1856,7 +1856,7 @@ void BKE_pose_blend_write(BlendWriter *writer, bPose *pose, bArmature *arm) /* Write channels */ LISTBASE_FOREACH (bPoseChannel *, chan, &pose->chanbase) { /* Write ID Properties -- and copy this comment EXACTLY for easy finding - * of library blocks that implement this.*/ + * of library blocks that implement this. */ if (chan->prop) { IDP_BlendWrite(writer, chan->prop); } diff --git a/source/blender/blenkernel/intern/appdir.c b/source/blender/blenkernel/intern/appdir.c index bcfd34ab42f..579f671e2b0 100644 --- a/source/blender/blenkernel/intern/appdir.c +++ b/source/blender/blenkernel/intern/appdir.c @@ -200,7 +200,7 @@ bool BKE_appdir_folder_documents(char *dir) return true; } - /* Ghost couldn't give us a documents path, let's try if we can find it ourselves.*/ + /* Ghost couldn't give us a documents path, let's try if we can find it ourselves. */ const char *home_path = BKE_appdir_folder_home(); if (!home_path || !BLI_is_dir(home_path)) { diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index f61acef1c15..5799f82bf94 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -198,7 +198,7 @@ static void write_bone(BlendWriter *writer, Bone *bone) BLO_write_struct(writer, Bone, bone); /* Write ID Properties -- and copy this comment EXACTLY for easy finding - * of library blocks that implement this.*/ + * of library blocks that implement this. */ if (bone->prop) { IDP_BlendWrite(writer, bone->prop); } diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c index 9ea1c8fedda..f31d8f5ade7 100644 --- a/source/blender/blenkernel/intern/blendfile.c +++ b/source/blender/blenkernel/intern/blendfile.c @@ -272,7 +272,7 @@ static void setup_app_data(bContext *C, /* We need to tag this here because events may be handled immediately after. * only the current screen is important because we won't have to handle - * events from multiple screens at once.*/ + * events from multiple screens at once. */ if (curscreen) { BKE_screen_gizmo_tag_refresh(curscreen); } diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c index 116e6279657..4659c464099 100644 --- a/source/blender/blenkernel/intern/bvhutils.c +++ b/source/blender/blenkernel/intern/bvhutils.c @@ -1143,7 +1143,7 @@ static BVHTree *bvhtree_from_editmesh_looptri_create_tree(float epsilon, bool insert = looptri_mask ? BLI_BITMAP_TEST_BOOL(looptri_mask, i) : true; if (insert) { - /* No reason found to block hit-testing the triangle for snap, so insert it now.*/ + /* No reason found to block hit-testing the triangle for snap, so insert it now. */ float co[3][3]; copy_v3_v3(co[0], ltri[0]->v->co); copy_v3_v3(co[1], ltri[1]->v->co); diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index 3f16526db09..fdffe7dca57 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -710,7 +710,7 @@ Collection *BKE_collection_duplicate(Main *bmain, * unless its duplication is a sub-process of another one. */ collection_new->id.tag &= ~LIB_TAG_NEW; - /* This code will follow into all ID links using an ID tagged with LIB_TAG_NEW.*/ + /* This code will follow into all ID links using an ID tagged with LIB_TAG_NEW. */ BKE_libblock_relink_to_newid(&collection_new->id); #ifndef NDEBUG diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index f30fcc54b23..df2277387ce 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -1280,12 +1280,12 @@ static void save_sample_line( { float yuv[3]; - /* vectorscope*/ + /* Vector-scope. */ rgb_to_yuv(rgb[0], rgb[1], rgb[2], &yuv[0], &yuv[1], &yuv[2], BLI_YUV_ITU_BT709); scopes->vecscope[idx + 0] = yuv[1]; scopes->vecscope[idx + 1] = yuv[2]; - /* waveform */ + /* Waveform. */ switch (scopes->wavefrm_mode) { case SCOPES_WAVEFRM_RGB: case SCOPES_WAVEFRM_RGB_PARADE: @@ -1497,7 +1497,7 @@ static void scopes_update_cb(void *__restrict userdata, mul_v3_fl(ycc, INV_255); minmax_v3v3_v3(min, max, ycc); } - /* increment count for histo*/ + /* Increment count for histo. */ bin_lum[get_bin_float(luma)]++; bin_r[get_bin_float(rgba[0])]++; bin_g[get_bin_float(rgba[1])]++; diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index bc5c1d9e41f..1d5cfa752a4 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -222,7 +222,7 @@ void BKE_constraints_clear_evalob(bConstraintOb *cob) /* XXX This would seem to be in wrong order. However, it does not work in 'right' order - * would be nice to understand why premul is needed here instead of usual postmul? * In any case, we **do not get a delta** here (e.g. startmat & matrix having same location, - * still gives a 'delta' with non-null translation component :/ ).*/ + * still gives a 'delta' with non-null translation component :/ ). */ mul_m4_m4m4(delta, cob->matrix, imat); /* copy matrices back to source */ @@ -1491,7 +1491,7 @@ static void followpath_get_tarmat(struct Depsgraph *UNUSED(depsgraph), dir, (data->followflag & FOLLOWPATH_FOLLOW) ? quat : NULL, &radius, - NULL)) { /* quat_pt is quat or NULL*/ + NULL)) { /* quat_pt is quat or NULL. */ float totmat[4][4]; unit_m4(totmat); @@ -2361,7 +2361,7 @@ static void pycon_new_data(void *cdata) { bPythonConstraint *data = (bPythonConstraint *)cdata; - /* everything should be set correctly by calloc, except for the prop->type constant.*/ + /* Everything should be set correctly by calloc, except for the prop->type constant. */ data->prop = MEM_callocN(sizeof(IDProperty), "PyConstraintProps"); data->prop->type = IDP_GROUP; } @@ -3523,7 +3523,7 @@ static void stretchto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t scale[0] = 1.0; scale[2] = 1.0; break; - default: /* should not happen, but in case*/ + default: /* Should not happen, but in case. */ return; } /* switch (data->volmode) */ @@ -6297,7 +6297,7 @@ void BKE_constraint_blend_write(BlendWriter *writer, ListBase *conlist) } /* Write ID Properties -- and copy this comment EXACTLY for easy finding - * of library blocks that implement this.*/ + * of library blocks that implement this. */ IDP_BlendWrite(writer, data->prop); break; diff --git a/source/blender/blenkernel/intern/curve_decimate.c b/source/blender/blenkernel/intern/curve_decimate.c index e4647908b58..62de7c74183 100644 --- a/source/blender/blenkernel/intern/curve_decimate.c +++ b/source/blender/blenkernel/intern/curve_decimate.c @@ -32,8 +32,8 @@ struct Knot { struct Knot *next, *prev; - uint point_index; /* index in point array */ - uint knot_index; /* index in knot array*/ + uint point_index; /* Index in point array. */ + uint knot_index; /* Index in knot array. */ float tan[2][3]; float handles[2]; diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index ea05ab99d88..e4717f0b6da 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -2099,7 +2099,7 @@ bool CustomData_merge(const struct CustomData *source, eCDAllocType alloctype, int totelem) { - /*const LayerTypeInfo *typeInfo;*/ + // const LayerTypeInfo *typeInfo; CustomDataLayer *layer, *newlayer; int lasttype = -1, lastactive = 0, lastrender = 0, lastclone = 0, lastmask = 0; int number = 0, maxnumber = -1; @@ -2107,7 +2107,7 @@ bool CustomData_merge(const struct CustomData *source, for (int i = 0; i < source->totlayer; i++) { layer = &source->layers[i]; - /*typeInfo = layerType_getInfo(layer->type);*/ /*UNUSED*/ + // typeInfo = layerType_getInfo(layer->type); /* UNUSED */ int type = layer->type; int flag = layer->flag; @@ -2631,7 +2631,7 @@ void *CustomData_add_layer( return NULL; } -/*same as above but accepts a name*/ +/* Same as above but accepts a name. */ void *CustomData_add_layer_named(CustomData *data, int type, eCDAllocType alloctype, @@ -3567,7 +3567,7 @@ bool CustomData_bmesh_merge(const CustomData *source, if (iter_type != BM_LOOPS_OF_FACE) { BMHeader *h; BMIter iter; - /*ensure all current elements follow new customdata layout*/ + /* Ensure all current elements follow new customdata layout. */ BM_ITER_MESH (h, &iter, bm, iter_type) { void *tmp = NULL; CustomData_bmesh_copy_data(&destold, dest, h->data, &tmp); @@ -3581,7 +3581,7 @@ bool CustomData_bmesh_merge(const CustomData *source, BMIter iter; BMIter liter; - /*ensure all current elements follow new customdata layout*/ + /* Ensure all current elements follow new customdata layout. */ BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) { BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) { void *tmp = NULL; @@ -3805,7 +3805,7 @@ void *CustomData_bmesh_get_n(const CustomData *data, void *block, int type, int return POINTER_OFFSET(block, data->layers[layer_index + n].offset); } -/*gets from the layer at physical index n, note: doesn't check type.*/ +/* Gets from the layer at physical index n, note: doesn't check type. */ void *CustomData_bmesh_get_layer_n(const CustomData *data, void *block, int n) { if (n < 0 || n >= data->totlayer) { @@ -3887,7 +3887,7 @@ bool CustomData_has_referenced(const struct CustomData *data) } /* copies the "value" (e.g. mloopuv uv or mloopcol colors) from one block to - * another, while not overwriting anything else (e.g. flags)*/ + * another, while not overwriting anything else (e.g. flags). */ void CustomData_data_copy_value(int type, const void *source, void *dest) { const LayerTypeInfo *typeInfo = layerType_getInfo(type); @@ -3905,7 +3905,7 @@ void CustomData_data_copy_value(int type, const void *source, void *dest) } /* Mixes the "value" (e.g. mloopuv uv or mloopcol colors) from one block into - * another, while not overwriting anything else (e.g. flags)*/ + * another, while not overwriting anything else (e.g. flags). */ void CustomData_data_mix_value( int type, const void *source, void *dest, const int mixmode, const float mixfactor) { diff --git a/source/blender/blenkernel/intern/data_transfer.c b/source/blender/blenkernel/intern/data_transfer.c index 2bf58d9e764..12269cf0d51 100644 --- a/source/blender/blenkernel/intern/data_transfer.c +++ b/source/blender/blenkernel/intern/data_transfer.c @@ -1260,7 +1260,7 @@ void BKE_object_data_transfer_layout(struct Depsgraph *depsgraph, me_dst = ob_dst->data; - /* Get source evaluated mesh.*/ + /* Get source evaluated mesh. */ BKE_object_data_transfer_dttypes_to_cdmask(data_types, &me_src_mask); me_src = mesh_get_eval_final(depsgraph, scene, ob_src, &me_src_mask); if (!me_src) { @@ -1441,7 +1441,7 @@ bool BKE_object_data_transfer_ex(struct Depsgraph *depsgraph, } } - /* Get source evaluated mesh.*/ + /* Get source evaluated mesh. */ BKE_object_data_transfer_dttypes_to_cdmask(data_types, &me_src_mask); BKE_mesh_remap_calc_source_cddata_masks_from_map_modes( map_vert_mode, map_edge_mode, map_loop_mode, map_poly_mode, &me_src_mask); diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 788a51257bf..2eb18a06799 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -1757,7 +1757,7 @@ void dynamicPaint_clearSurface(const Scene *scene, DynamicPaintSurface *surface) } } -/* completely (re)initializes surface (only for point cache types)*/ +/* Completely (re)initializes surface (only for point cache types). */ bool dynamicPaint_resetSurface(const Scene *scene, DynamicPaintSurface *surface) { int numOfPoints = dynamicPaint_surfaceNumOfPoints(surface); @@ -4145,7 +4145,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex( /* mix final sample strength depending on brush settings */ if (hit_found) { - /* if "negate volume" enabled, negate all factors within volume*/ + /* If "negate volume" enabled, negate all factors within volume. */ if (brush->collision == MOD_DPAINT_COL_VOLDIST && brush->flags & MOD_DPAINT_NEGATE_VOLUME) { volume_factor = 1.0f - volume_factor; if (inner_proximity) { diff --git a/source/blender/blenkernel/intern/editmesh.c b/source/blender/blenkernel/intern/editmesh.c index b512309a773..49c2a2cbd89 100644 --- a/source/blender/blenkernel/intern/editmesh.c +++ b/source/blender/blenkernel/intern/editmesh.c @@ -222,7 +222,7 @@ void BKE_editmesh_free_derivedmesh(BMEditMesh *em) MEM_SAFE_FREE(em->bb_cage); } -/*does not free the BMEditMesh struct itself*/ +/* Does not free the #BMEditMesh struct itself. */ void BKE_editmesh_free(BMEditMesh *em) { BKE_editmesh_free_derivedmesh(em); diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index e39749225ea..ff0fc4754e3 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -773,7 +773,7 @@ int get_effector_data(EffectorCache *eff, /* use center of object for distance calculus */ const Object *ob = eff->ob; - /* use z-axis as normal*/ + /* Use z-axis as normal. */ normalize_v3_v3(efd->nor, ob->obmat[2]); if (eff->pd && ELEM(eff->pd->shape, PFIELD_SHAPE_PLANE, PFIELD_SHAPE_LINE)) { diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 68ed3c239ef..18dac2fb679 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -1309,7 +1309,7 @@ void calchandles_fcurve_ex(FCurve *fcu, eBezTriple_Flag handle_sel_flag) * - Need bezier keys. * - Only bezier-interpolation has handles (for now). */ - if (ELEM(NULL, fcu, fcu->bezt) || (a < 2) /*|| ELEM(fcu->ipo, BEZT_IPO_CONST, BEZT_IPO_LIN)*/) { + if (ELEM(NULL, fcu, fcu->bezt) || (a < 2) /*|| ELEM(fcu->ipo, BEZT_IPO_CONST, BEZT_IPO_LIN) */) { return; } @@ -2322,7 +2322,7 @@ void BKE_fmodifiers_blend_write(BlendWriter *writer, ListBase *fmodifiers) FMod_Python *data = fcm->data; /* Write ID Properties -- and copy this comment EXACTLY for easy finding - * of library blocks that implement this.*/ + * of library blocks that implement this. */ IDP_BlendWrite(writer, data->prop); break; diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index 553575b5c7b..947417af55d 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -4395,7 +4395,7 @@ static void manta_smoke_calc_transparency(FluidDomainSettings *fds, ViewLayer *v int cell[3]; float t_ray = 1.0; - /* Reset shadow value.*/ + /* Reset shadow value. */ shadow[index] = -1.0f; voxel_center[0] = (float)x; @@ -5023,7 +5023,7 @@ void BKE_fluid_modifier_copy(const struct FluidModifierData *fmd, /* viscosity options */ tfds->viscosity_value = fds->viscosity_value; - /* diffusion options*/ + /* Diffusion options. */ tfds->surface_tension = fds->surface_tension; tfds->viscosity_base = fds->viscosity_base; tfds->viscosity_exponent = fds->viscosity_exponent; diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index 8d1e6b26d4d..b9f0b97ab46 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -875,7 +875,7 @@ static void fcm_python_new_data(void *mdata) { FMod_Python *data = (FMod_Python *)mdata; - /* everything should be set correctly by calloc, except for the prop->type constant.*/ + /* Everything should be set correctly by calloc, except for the prop->type constant. */ data->prop = MEM_callocN(sizeof(IDProperty), "PyFModifierProps"); data->prop->type = IDP_GROUP; } diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index eb0654274e1..95de9a9d636 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -1746,7 +1746,7 @@ void BKE_vfont_clipboard_set(const char32_t *text_buf, const CharInfo *info_buf, char32_t *text; CharInfo *info; - /* clean previous buffers*/ + /* Clean previous buffers. */ BKE_vfont_clipboard_free(); text = MEM_malloc_arrayN((len + 1), sizeof(*text), __func__); diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index 64b5462f824..459fc5e4c68 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -195,12 +195,12 @@ static void greasepencil_blend_write(BlendWriter *writer, ID *id, const void *id void BKE_gpencil_blend_read_data(BlendDataReader *reader, bGPdata *gpd) { - /* we must firstly have some grease-pencil data to link! */ + /* We must firstly have some grease-pencil data to link! */ if (gpd == NULL) { return; } - /* relink animdata */ + /* Relink anim-data. */ BLO_read_data_address(reader, &gpd->adt); BKE_animdata_blend_read_data(reader, gpd->adt); @@ -219,7 +219,7 @@ void BKE_gpencil_blend_read_data(BlendDataReader *reader, bGPdata *gpd) gpd->runtime.sbuffer_size = 0; gpd->runtime.tot_cp_points = 0; - /* relink palettes (old palettes deprecated, only to convert old files) */ + /* Relink palettes (old palettes deprecated, only to convert old files). */ BLO_read_list(reader, &gpd->palettes); if (gpd->palettes.first != NULL) { LISTBASE_FOREACH (bGPDpalette *, palette, &gpd->palettes) { @@ -227,14 +227,14 @@ void BKE_gpencil_blend_read_data(BlendDataReader *reader, bGPdata *gpd) } } - /* materials */ + /* Materials. */ BLO_read_pointer_array(reader, (void **)&gpd->mat); - /* relink layers */ + /* Relink layers. */ BLO_read_list(reader, &gpd->layers); LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) { - /* relink frames */ + /* Relink frames. */ BLO_read_list(reader, &gpl->frames); BLO_read_data_address(reader, &gpl->actframe); @@ -245,23 +245,23 @@ void BKE_gpencil_blend_read_data(BlendDataReader *reader, bGPdata *gpd) BLO_read_list(reader, &gpl->mask_layers); LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) { - /* relink strokes (and their points) */ + /* Relink strokes (and their points). */ BLO_read_list(reader, &gpf->strokes); LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) { - /* relink stroke points array */ + /* Relink stroke points array. */ BLO_read_data_address(reader, &gps->points); - /* Relink geometry*/ + /* Relink geometry. */ BLO_read_data_address(reader, &gps->triangles); - /* relink stroke edit curve. */ + /* Relink stroke edit curve. */ BLO_read_data_address(reader, &gps->editcurve); if (gps->editcurve != NULL) { - /* relink curve point array */ + /* Relink curve point array. */ BLO_read_data_address(reader, &gps->editcurve->curve_points); } - /* relink weight data */ + /* Relink weight data. */ if (gps->dvert) { BLO_read_data_address(reader, &gps->dvert); BKE_defvert_blend_read(reader, gps->totpoints, gps->dvert); @@ -458,7 +458,7 @@ void BKE_gpencil_free_frames(bGPDlayer *gpl) void BKE_gpencil_free_layer_masks(bGPDlayer *gpl) { - /* Free masks.*/ + /* Free masks. */ bGPDlayer_Mask *mask_next = NULL; for (bGPDlayer_Mask *mask = gpl->mask_layers.first; mask; mask = mask_next) { mask_next = mask->next; @@ -482,7 +482,7 @@ void BKE_gpencil_free_layers(ListBase *list) /* free layers and their data */ BKE_gpencil_free_frames(gpl); - /* Free masks.*/ + /* Free masks. */ BKE_gpencil_free_layer_masks(gpl); BLI_freelinkN(list, gpl); diff --git a/source/blender/blenkernel/intern/gpencil_curve.c b/source/blender/blenkernel/intern/gpencil_curve.c index 906d0fb0792..74bb787eac3 100644 --- a/source/blender/blenkernel/intern/gpencil_curve.c +++ b/source/blender/blenkernel/intern/gpencil_curve.c @@ -243,7 +243,7 @@ static int gpencil_get_stroke_material_fromcurve( /* If the curve has 2 materials, the first is considered as Fill and the second as Stroke. * If the has only one material, if the name contains _stroke, the is used - * as stroke, else as fill.*/ + * as stroke, else as fill. */ if (ob_cu->totcol >= 2) { *do_stroke = true; *do_fill = true; @@ -350,7 +350,7 @@ static void gpencil_convert_spline(Main *bmain, /* Assign material index to stroke. */ gps->mat_nr = r_idx; - /* Add stroke to frame.*/ + /* Add stroke to frame. */ BLI_addtail(&gpf->strokes, gps); float *coord_array = NULL; diff --git a/source/blender/blenkernel/intern/gpencil_geom.c b/source/blender/blenkernel/intern/gpencil_geom.c index 3aaa2eb76d1..2b16bbb10b2 100644 --- a/source/blender/blenkernel/intern/gpencil_geom.c +++ b/source/blender/blenkernel/intern/gpencil_geom.c @@ -2050,7 +2050,7 @@ void BKE_gpencil_stroke_subdivide(bGPdata *gpd, bGPDstroke *gps, int level, int MEM_SAFE_FREE(temp_points); MEM_SAFE_FREE(temp_dverts); - /* move points to smooth stroke (not simple type )*/ + /* Move points to smooth stroke (not simple type). */ if (type != GP_SUBDIV_SIMPLE) { /* duplicate points in a temp area with the new subdivide data */ temp_points = MEM_dupallocN(gps->points); @@ -2133,7 +2133,7 @@ void BKE_gpencil_stroke_merge_distance(bGPdata *gpd, else { pt->flag |= GP_SPOINT_TAG; } - /* Jump to next pair of points, keeping first point segment equals.*/ + /* Jump to next pair of points, keeping first point segment equals. */ step++; } else { @@ -2868,7 +2868,7 @@ static void gpencil_stroke_join_islands(bGPdata *gpd, MDeformVert *dvert_src = NULL; MDeformVert *dvert_dst = NULL; - /* Copy weights (last before)*/ + /* Copy weights (last before). */ e1 = 0; e2 = 0; for (int i = 0; i < totpoints; i++) { diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c index 578b8aa49d5..a67e78ceea0 100644 --- a/source/blender/blenkernel/intern/idprop.c +++ b/source/blender/blenkernel/intern/idprop.c @@ -54,15 +54,15 @@ static CLG_LogRef LOG = {"bke.idprop"}; -/*local size table.*/ +/* Local size table. */ static size_t idp_size_table[] = { 1, /*strings*/ sizeof(int), sizeof(float), - sizeof(float[3]), /*Vector type, deprecated*/ - sizeof(float[16]), /*Matrix type, deprecated*/ - 0, /*arrays don't have a fixed size*/ - sizeof(ListBase), /*Group type*/ + sizeof(float[3]), /* Vector type, deprecated. */ + sizeof(float[16]), /* Matrix type, deprecated. */ + 0, /* Arrays don't have a fixed size. */ + sizeof(ListBase), /* Group type. */ sizeof(void *), sizeof(double), }; @@ -99,12 +99,12 @@ IDProperty *IDP_CopyIDPArray(const IDProperty *array, const int flag) narray->data.pointer = MEM_dupallocN(array->data.pointer); for (int i = 0; i < narray->len; i++) { - /* ok, the copy functions always allocate a new structure, + /* OK, the copy functions always allocate a new structure, * which doesn't work here. instead, simply copy the * contents of the new structure into the array cell, * then free it. this makes for more maintainable * code than simply re-implementing the copy functions - * in this loop.*/ + * in this loop. */ IDProperty *tmp = IDP_CopyProperty_ex(GETPROP(narray, i), flag); memcpy(GETPROP(narray, i), tmp, sizeof(IDProperty)); MEM_freeN(tmp); @@ -228,7 +228,7 @@ static void idp_resize_group_array(IDProperty *prop, int newlen, void *newarr) } } -/*this function works for strings too!*/ +/* This function works for strings too! */ void IDP_ResizeArray(IDProperty *prop, int newlen) { const bool is_grow = newlen >= prop->len; @@ -390,8 +390,8 @@ void IDP_ConcatStringC(IDProperty *prop, const char *st) BLI_assert(prop->type == IDP_STRING); int newlen = prop->len + (int)strlen(st); - /* we have to remember that prop->len includes the null byte for strings. - * so there's no need to add +1 to the resize function.*/ + /* We have to remember that prop->len includes the null byte for strings. + * so there's no need to add +1 to the resize function. */ IDP_ResizeArray(prop, newlen); strcat(prop->data.pointer, st); } @@ -400,8 +400,8 @@ void IDP_ConcatString(IDProperty *str1, IDProperty *append) { BLI_assert(append->type == IDP_STRING); - /* since ->len for strings includes the NULL byte, we have to subtract one or - * we'll get an extra null byte after each concatenation operation.*/ + /* Since ->len for strings includes the NULL byte, we have to subtract one or + * we'll get an extra null byte after each concatenation operation. */ int newlen = str1->len + append->len - 1; IDP_ResizeArray(str1, newlen); strcat(str1->data.pointer, append->data.pointer); @@ -775,10 +775,10 @@ IDProperty *IDP_GetProperties(ID *id, const bool create_if_needed) if (create_if_needed) { id->properties = MEM_callocN(sizeof(IDProperty), "IDProperty"); id->properties->type = IDP_GROUP; - /* don't overwrite the data's name and type + /* NOTE(campbell): Don't overwrite the data's name and type * some functions might need this if they - * don't have a real ID, should be named elsewhere - Campbell */ - /* strcpy(id->name, "top_level_group");*/ + * don't have a real ID, should be named elsewhere. */ + // strcpy(id->name, "top_level_group"); } return id->properties; } @@ -1219,7 +1219,7 @@ static void IDP_DirectLinkArray(IDProperty *prop, BlendDataReader *reader) static void IDP_DirectLinkString(IDProperty *prop, BlendDataReader *reader) { - /*since we didn't save the extra string buffer, set totallen to len.*/ + /* Since we didn't save the extra string buffer, set totallen to len. */ prop->totallen = prop->len; BLO_read_data_address(reader, &prop->data.pointer); } @@ -1230,7 +1230,7 @@ static void IDP_DirectLinkGroup(IDProperty *prop, BlendDataReader *reader) BLO_read_list(reader, lb); - /*Link child id properties now*/ + /* Link child id properties now. */ LISTBASE_FOREACH (IDProperty *, loop, &prop->data.group) { IDP_DirectLinkProperty(loop, reader); } diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 92ff7b4fcdb..a2131d735a6 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -3208,7 +3208,7 @@ Image *BKE_image_ensure_viewer(Main *bmain, int type, const char *name) ima = image_alloc(bmain, name, IMA_SRC_VIEWER, type); } - /* happens on reload, imagewindow cannot be image user when hidden*/ + /* Happens on reload, imagewindow cannot be image user when hidden. */ if (ima->id.us == 0) { id_us_ensure_real(&ima->id); } @@ -4349,7 +4349,7 @@ static ImBuf *load_movie_single(Image *ima, ImageUser *iuser, int frame, const i BKE_image_user_file_path(&iuser_t, ima, str); - /* FIXME: make several stream accessible in image editor, too*/ + /* FIXME: make several stream accessible in image editor, too. */ ia->anim = openanim(str, flags, 0, ima->colorspace_settings.name); /* let's initialize this user */ diff --git a/source/blender/blenkernel/intern/image_save.c b/source/blender/blenkernel/intern/image_save.c index e571499ba8e..b68cd9e4d2d 100644 --- a/source/blender/blenkernel/intern/image_save.c +++ b/source/blender/blenkernel/intern/image_save.c @@ -207,7 +207,7 @@ static bool image_save_single(ReportList *reports, goto cleanup; } - /* it shouldn't ever happen*/ + /* It shouldn't ever happen. */ if ((BLI_findstring(&rr->views, STEREO_LEFT_NAME, offsetof(RenderView, name)) == NULL) || (BLI_findstring(&rr->views, STEREO_RIGHT_NAME, offsetof(RenderView, name)) == NULL)) { BKE_reportf(reports, diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index 09ef71d5886..1edf83b6685 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -819,7 +819,7 @@ static void layer_collection_sync(ViewLayer *view_layer, } /* We separate restrict viewport and visible view layer because a layer collection can be - * hidden in the view layer yet (locally) visible in a viewport (if it is not restricted).*/ + * hidden in the view layer yet (locally) visible in a viewport (if it is not restricted). */ if (child_restrict & COLLECTION_RESTRICT_VIEWPORT) { lc->runtime_flag |= LAYER_COLLECTION_RESTRICT_VIEWPORT; } diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index 6bef11dea76..f5d898e801b 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -158,7 +158,7 @@ static void metaball_blend_read_data(BlendDataReader *reader, ID *id) mb->editelems = NULL; /* Must always be cleared (meta's don't have their own edit-data). */ mb->needs_flush_to_id = 0; - /* mb->edit_elems.first= mb->edit_elems.last= NULL;*/ + // mb->edit_elems.first = mb->edit_elems.last = NULL; mb->lastelem = NULL; mb->batch_cache = NULL; } diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 40b95f9535b..b518f35fac7 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -413,8 +413,7 @@ static const char *cmpcode_to_str(int code) } } -/* thresh is threshold for comparing vertices, uvs, vertex colors, - * weights, etc.*/ +/** Thresh is threshold for comparing vertices, UV's, vertex colors, weights, etc. */ static int customdata_compare( CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2, const float thresh) { @@ -479,11 +478,11 @@ static int customdata_compare( if (len_squared_v3v3(v1->co, v2->co) > thresh_sq) { return MESHCMP_VERTCOMISMATCH; } - /* I don't care about normals, let's just do coordinates */ + /* I don't care about normals, let's just do coordinates. */ } } - /*we're order-agnostic for edges here*/ + /* We're order-agnostic for edges here. */ if (l1->type == CD_MEDGE) { MEdge *e1 = l1->data; MEdge *e2 = l2->data; @@ -748,12 +747,14 @@ bool BKE_mesh_clear_facemap_customdata(struct Mesh *me) return changed; } -/* this ensures grouped customdata (e.g. mtexpoly and mloopuv and mtface, or +/** + * This ensures grouped customdata (e.g. mtexpoly and mloopuv and mtface, or * mloopcol and mcol) have the same relative active/render/clone/mask indices. * - * note that for undo mesh data we want to skip 'ensure_tess_cd' call since + * NOTE(campbell): that for undo mesh data we want to skip 'ensure_tess_cd' call since * we don't want to store memory for tessface when its only used for older - * versions of the mesh. - campbell*/ + * Versions of the mesh. + */ static void mesh_update_linked_customdata(Mesh *me, const bool do_ensure_tess_cd) { if (do_ensure_tess_cd) { @@ -811,7 +812,7 @@ static void mesh_clear_geometry(Mesh *mesh) /* Note that materials and shape keys are not freed here. This is intentional, as freeing * shape keys requires tagging the depsgraph for updated relations, which is expensive. - * Material slots should be kept in sync with the object.*/ + * Material slots should be kept in sync with the object. */ mesh->totvert = 0; mesh->totedge = 0; diff --git a/source/blender/blenkernel/intern/mesh_boolean_convert.cc b/source/blender/blenkernel/intern/mesh_boolean_convert.cc index cfb1c192afe..5a8921132af 100644 --- a/source/blender/blenkernel/intern/mesh_boolean_convert.cc +++ b/source/blender/blenkernel/intern/mesh_boolean_convert.cc @@ -304,7 +304,7 @@ static IMesh meshes_to_imesh(Span meshes, r_info->mesh_edge_offset[mi] = e; r_info->mesh_poly_offset[mi] = f; /* Get matrix that transforms a coordinate in objects[mi]'s local space - * to the target space space.*/ + * to the target space space. */ const float4x4 objn_mat = (obmats[mi] == nullptr) ? float4x4::identity() : clean_obmat(*obmats[mi]); r_info->to_target_transform[mi] = inv_target_mat * objn_mat; diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c index 2260ffc668a..961c10ea5d3 100644 --- a/source/blender/blenkernel/intern/mesh_evaluate.c +++ b/source/blender/blenkernel/intern/mesh_evaluate.c @@ -3280,8 +3280,8 @@ void BKE_mesh_flush_select_from_polys_ex(MVert *mvert, i = totpoly; for (mp = mpoly; i--; mp++) { - /* assume if its selected its not hidden and none of its verts/edges are hidden - * (a common assumption)*/ + /* Assume if its selected its not hidden and none of its verts/edges are hidden + * (a common assumption). */ if (mp->flag & ME_FACE_SEL) { const MLoop *ml; int j; diff --git a/source/blender/blenkernel/intern/mesh_merge.c b/source/blender/blenkernel/intern/mesh_merge.c index 29f3a8110f4..1e51ee73c7c 100644 --- a/source/blender/blenkernel/intern/mesh_merge.c +++ b/source/blender/blenkernel/intern/mesh_merge.c @@ -606,11 +606,11 @@ Mesh *BKE_mesh_merge_verts(Mesh *mesh, MEM_freeN(poly_keys); } - /*create new cddm*/ + /* Create new cddm. */ result = BKE_mesh_new_nomain_from_template( mesh, STACK_SIZE(mvert), STACK_SIZE(medge), 0, STACK_SIZE(mloop), STACK_SIZE(mpoly)); - /*update edge indices and copy customdata*/ + /* Update edge indices and copy customdata. */ med = medge; for (i = 0; i < result->totedge; i++, med++) { BLI_assert(newv[med->v1] != -1); @@ -624,7 +624,7 @@ Mesh *BKE_mesh_merge_verts(Mesh *mesh, CustomData_copy_data(&mesh->edata, &result->edata, olde[i], i, 1); } - /*update loop indices and copy customdata*/ + /* Update loop indices and copy customdata. */ ml = mloop; for (i = 0; i < result->totloop; i++, ml++) { /* Edge remapping has already be done in main loop handling part above. */ @@ -634,19 +634,19 @@ Mesh *BKE_mesh_merge_verts(Mesh *mesh, CustomData_copy_data(&mesh->ldata, &result->ldata, oldl[i], i, 1); } - /*copy vertex customdata*/ + /* Copy vertex customdata. */ mv = mvert; for (i = 0; i < result->totvert; i++, mv++) { CustomData_copy_data(&mesh->vdata, &result->vdata, oldv[i], i, 1); } - /*copy poly customdata*/ + /* Copy poly customdata. */ mp = mpoly; for (i = 0; i < result->totpoly; i++, mp++) { CustomData_copy_data(&mesh->pdata, &result->pdata, oldp[i], i, 1); } - /*copy over data. CustomData_add_layer can do this, need to look it up.*/ + /* Copy over data. #CustomData_add_layer can do this, need to look it up. */ memcpy(result->mvert, mvert, sizeof(MVert) * STACK_SIZE(mvert)); memcpy(result->medge, medge, sizeof(MEdge) * STACK_SIZE(medge)); memcpy(result->mloop, mloop, sizeof(MLoop) * STACK_SIZE(mloop)); diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index 0f2f56f4f2b..3a7910d1a9f 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -1320,7 +1320,7 @@ static ImBuf *movieclip_get_postprocessed_ibuf( clip->lastframe = framenr; real_ibuf_size(clip, user, ibuf, &clip->lastsize[0], &clip->lastsize[1]); - /* postprocess frame and put to cache if needed*/ + /* Post-process frame and put to cache if needed. */ if (need_postprocess) { ImBuf *tmpibuf = ibuf; ibuf = postprocess_frame(clip, user, tmpibuf, flag, postprocess_flag); @@ -2128,9 +2128,9 @@ GPUTexture *BKE_movieclip_get_gpu_texture(MovieClip *clip, MovieClipUser *cuser) void BKE_movieclip_free_gputexture(struct MovieClip *clip) { - /* number of gpu textures to keep around as cache + /* Number of gpu textures to keep around as cache. * We don't want to keep too many GPU textures for - * movie clips around, as they can be large.*/ + * movie clips around, as they can be large. */ const int MOVIECLIP_NUM_GPUTEXTURES = 1; while (BLI_listbase_count(&clip->runtime.gputextures) > MOVIECLIP_NUM_GPUTEXTURES) { diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index bb7c1ef1f50..54f0da30a2b 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -994,7 +994,7 @@ static void multiresModifier_disp_run( } } - /*numGrids = dm->getNumGrids(dm);*/ /*UNUSED*/ + // numGrids = dm->getNumGrids(dm); /* UNUSED */ gridSize = dm->getGridSize(dm); gridData = dm->getGridData(dm); gridOffset = dm->getGridOffset(dm); @@ -1285,7 +1285,7 @@ DerivedMesh *multires_make_derived_from_derived( multires_set_tot_mdisps(me, mmd->totlvl); multiresModifier_ensure_external_read(me, mmd); - /*run displacement*/ + /* Run displacement. */ multiresModifier_disp_run(result, ob->data, dm, APPLY_DISPLACEMENTS, subGridData, mmd->totlvl); /* copy hidden elements for this level */ diff --git a/source/blender/blenkernel/intern/multires_reshape.c b/source/blender/blenkernel/intern/multires_reshape.c index 04ad78ec0de..bd52d70b223 100644 --- a/source/blender/blenkernel/intern/multires_reshape.c +++ b/source/blender/blenkernel/intern/multires_reshape.c @@ -235,7 +235,7 @@ void multiresModifier_subdivide_to_level(struct Object *object, /* Free original grids which makes it so smoothing with details thinks all the details were * added against base mesh's limit surface. This is similar behavior to as if we've done all - * displacement in sculpt mode at the old top level and then propagated to the new top level.*/ + * displacement in sculpt mode at the old top level and then propagated to the new top level. */ multires_reshape_free_original_grids(&reshape_context); if (ELEM(mode, MULTIRES_SUBDIVIDE_LINEAR, MULTIRES_SUBDIVIDE_SIMPLE)) { diff --git a/source/blender/blenkernel/intern/multires_unsubdivide.c b/source/blender/blenkernel/intern/multires_unsubdivide.c index 02b9bb852d6..4210f26a694 100644 --- a/source/blender/blenkernel/intern/multires_unsubdivide.c +++ b/source/blender/blenkernel/intern/multires_unsubdivide.c @@ -312,7 +312,7 @@ static bool unsubdivide_tag_disconnected_mesh_element(BMesh *bm, int *elem_id, i /* Also try from the different 4 vertices of a quad in the current * disconnected element ID. If a solution exists the search should return a valid solution from - * one of these vertices.*/ + * one of these vertices. */ BMFace *f, *init_face = NULL; BMVert *v; BMIter iter_a, iter_b; diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index 92e21183acb..bf18765aa94 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -1289,7 +1289,7 @@ void BKE_nlastrip_set_active(AnimData *adt, NlaStrip *strip) return; } - /* loop over tracks, deactivating*/ + /* Loop over tracks, deactivating. */ for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) { for (nls = nlt->strips.first; nls; nls = nls->next) { if (nls != strip) { @@ -1560,7 +1560,7 @@ bool BKE_nlatracks_have_animated_strips(ListBase *tracks) return false; } -/* Validate the NLA-Strips 'control' F-Curves based on the flags set*/ +/* Validate the NLA-Strips 'control' F-Curves based on the flags set. */ void BKE_nlastrip_validate_fcurves(NlaStrip *strip) { FCurve *fcu; diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index db18cecb5d3..cf0dd75ea9d 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -875,7 +875,7 @@ void ntreeBlendReadLib(struct BlendLibReader *reader, struct bNodeTree *ntree) LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { /* Link ID Properties -- and copy this comment EXACTLY for easy finding - * of library blocks that implement this.*/ + * of library blocks that implement this. */ IDP_BlendReadLib(reader, node->prop); BLO_read_id_address(reader, lib, &node->id); @@ -2365,7 +2365,7 @@ static void nodeUnMuteLink(bNodeLink *link) link->tosock->flag |= SOCK_IN_USE; } -/* Upstream muting. Always happens when unmuting but checks when muting. O(n^2) algorithm.*/ +/* Upstream muting. Always happens when unmuting but checks when muting. O(n^2) algorithm. */ static void nodeMuteRerouteInputLinks(bNodeTree *ntree, bNode *node, const bool mute) { if (node->type != NODE_REROUTE) { @@ -2388,7 +2388,7 @@ static void nodeMuteRerouteInputLinks(bNodeTree *ntree, bNode *node, const bool } } -/* Downstream muting propagates when reaching reroute nodes. O(n^2) algorithm.*/ +/* Downstream muting propagates when reaching reroute nodes. O(n^2) algorithm. */ static void nodeMuteRerouteOutputLinks(bNodeTree *ntree, bNode *node, const bool mute) { if (node->type != NODE_REROUTE) { diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 0ee7cec59fc..314cc1a46cd 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2759,7 +2759,7 @@ Object *BKE_object_duplicate(Main *bmain, } if (!is_subprocess) { - /* This code will follow into all ID links using an ID tagged with LIB_TAG_NEW.*/ + /* This code will follow into all ID links using an ID tagged with LIB_TAG_NEW. */ BKE_libblock_relink_to_newid(&obn->id); #ifndef NDEBUG diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c index 9d53dad8d03..2e7152302c7 100644 --- a/source/blender/blenkernel/intern/ocean.c +++ b/source/blender/blenkernel/intern/ocean.c @@ -248,7 +248,7 @@ void BKE_ocean_eval_uv(struct Ocean *oc, struct OceanResult *ocr, float u, float if (oc->_do_normals) { ocr->normal[0] = BILERP(oc->_N_x); - ocr->normal[1] = oc->_N_y /*BILERP(oc->_N_y) (MEM01)*/; + ocr->normal[1] = oc->_N_y /* BILERP(oc->_N_y) (MEM01) */; ocr->normal[2] = BILERP(oc->_N_z); } @@ -347,7 +347,7 @@ void BKE_ocean_eval_uv_catrom(struct Ocean *oc, struct OceanResult *ocr, float u } if (oc->_do_normals) { ocr->normal[0] = INTERP(oc->_N_x); - ocr->normal[1] = oc->_N_y /*INTERP(oc->_N_y) (MEM01)*/; + ocr->normal[1] = oc->_N_y /* INTERP(oc->_N_y) (MEM01) */; ocr->normal[2] = INTERP(oc->_N_z); } if (oc->_do_chop) { @@ -1052,7 +1052,7 @@ void BKE_ocean_free_data(struct Ocean *oc) fftw_destroy_plan(oc->_N_x_plan); fftw_destroy_plan(oc->_N_z_plan); MEM_freeN(oc->_N_x); - /*fftwf_free(oc->_N_y); (MEM01)*/ + /* fftwf_free(oc->_N_y); (MEM01) */ MEM_freeN(oc->_N_z); } @@ -1437,9 +1437,9 @@ void BKE_ocean_bake(struct Ocean *o, rgb_to_rgba_unit_alpha(&ibuf_disp->rect_float[4 * (res_x * y + x)], ocr.disp); if (o->_do_jacobian) { - /* TODO, cleanup unused code - campbell */ + /* TODO: cleanup unused code - campbell */ - float /*r, */ /* UNUSED */ pr = 0.0f, foam_result; + float /* r, */ /* UNUSED */ pr = 0.0f, foam_result; float neg_disp, neg_eplus; ocr.foam = BKE_ocean_jminus_to_foam(ocr.Jminus, och->foam_coverage); @@ -1449,9 +1449,9 @@ void BKE_ocean_bake(struct Ocean *o, pr = prev_foam[res_x * y + x]; } - /* r = BLI_rng_get_float(rng); */ /* UNUSED */ /* randomly reduce foam */ + // r = BLI_rng_get_float(rng); /* UNUSED */ /* randomly reduce foam */ - /* pr = pr * och->foam_fade; */ /* overall fade */ + // pr = pr * och->foam_fade; /* overall fade */ /* Remember ocean coord sys is Y up! * break up the foam where height (Y) is low (wave valley), @@ -1475,7 +1475,7 @@ void BKE_ocean_bake(struct Ocean *o, prev_foam[res_x * y + x] = foam_result; - /*foam_result = min_ff(foam_result, 1.0f); */ + // foam_result = min_ff(foam_result, 1.0f); value_to_rgba_unit_alpha(&ibuf_foam->rect_float[4 * (res_x * y + x)], foam_result); diff --git a/source/blender/blenkernel/intern/ocean_intern.h b/source/blender/blenkernel/intern/ocean_intern.h index b55b211fa33..4ebd03789af 100644 --- a/source/blender/blenkernel/intern/ocean_intern.h +++ b/source/blender/blenkernel/intern/ocean_intern.h @@ -99,7 +99,7 @@ typedef struct Ocean { double *_N_x; /* init w sim w via plan? */ /* all member of this array has same values, * so convert this array to a float to reduce memory usage (MEM01). */ - /*float * _N_y; */ + // float * _N_y; double _N_y; /* sim w ********* can be rearranged? */ double *_N_z; /* init w sim w via plan? */ double *_disp_x; /* init w sim w via plan? */ diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 021121034f1..d386967bf8b 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -2462,7 +2462,7 @@ int do_guides(Depsgraph *depsgraph, (int)(data->strength * guidetime * 100.0f), 100)); } - else { /* curve size*/ + else { /* Curve size. */ if (cu->flag & CU_PATH_RADIUS) { mul_v3_fl(vec_to_point, radius); } diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 0e806449bb9..c35f703b072 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -250,7 +250,7 @@ static void realloc_particles(ParticleSimulationData *sim, int new_totpart) if (psys->particles) { totsaved = MIN2(psys->totpart, totpart); - /*save old pars*/ + /* Save old pars. */ if (totsaved) { memcpy(newpars, psys->particles, totsaved * sizeof(ParticleData)); @@ -607,8 +607,8 @@ void init_particle(ParticleSimulationData *sim, ParticleData *pa) pa->time = part->sta + (part->end - part->sta) * birth_time; pa->hair_index = 0; - /* we can't reset to -1 anymore since we've figured out correct index in distribute_particles */ - /* usage other than straight after distribute has to handle this index by itself - jahka*/ + /* We can't reset to -1 anymore since we've figured out correct index in #distribute_particles + * usage other than straight after distribute has to handle this index by itself - jahka. */ // pa->num_dmcache = DMCACHE_NOTFOUND; /* assume we don't have a derived mesh face */ } @@ -1473,7 +1473,7 @@ static void integrate_particle( force_func(forcedata, states + i, force, impulse); - /* force to acceleration*/ + /* Force to acceleration. */ mul_v3_v3fl(acceleration, force, 1.0f / pa_mass); if (external_acceleration) { @@ -2226,7 +2226,7 @@ static void sph_integrate(ParticleSimulationData *sim, sphdata->pass = 0; // sphdata.element_size and sphdata.flow are set in the callback. - /* restore previous state and treat gravity & effectors as external acceleration*/ + /* Restore previous state and treat gravity & effectors as external acceleration. */ sub_v3_v3v3(effector_acceleration, pa->state.vel, pa->prev_state.vel); mul_v3_fl(effector_acceleration, 1.0f / dtime); @@ -3001,7 +3001,7 @@ static int collision_response(ParticleSimulationData *sim, /* get back to global coordinates */ add_v3_v3(v1_tan, vc_tan); - /* convert to angular velocity*/ + /* Convert to angular velocity. */ cross_v3_v3v3(ave, vr_tan, pce->nor); mul_v3_fl(ave, 1.0f / MAX2(pa->size, 0.001f)); @@ -3927,7 +3927,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra) pa->alive = PARS_DYING; } else if (birthtime <= cfra && birthtime >= psys->cfra) { - /* particle is born some time between this and last step*/ + /* Particle is born some time between this and last step. */ reset_particle(sim, pa, dfra * timestep, cfra); pa->alive = PARS_ALIVE; pa->state.time = cfra - birthtime; @@ -3936,7 +3936,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra) /* nothing to be done when particle is dead */ } - /* only reset unborn particles if they're shown or if the particle is born soon*/ + /* Only reset unborn particles if they're shown or if the particle is born soon. */ if (pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN || (cfra + psys->pointcache->step > pa->time))) { reset_particle(sim, pa, dtime, cfra); @@ -4104,7 +4104,7 @@ static void update_children(ParticleSimulationData *sim, const bool use_render_p psys_free_children(sim->psys); } } -/* updates cached particles' alive & other flags etc..*/ +/* Updates cached particles' alive & other flags etc. */ static void cached_step(ParticleSimulationData *sim, float cfra, const bool use_render_params) { ParticleSystem *psys = sim->psys; diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c index d66503a0659..c2483b265a5 100644 --- a/source/blender/blenkernel/intern/pbvh_bmesh.c +++ b/source/blender/blenkernel/intern/pbvh_bmesh.c @@ -180,7 +180,7 @@ static BMVert *bm_vert_hash_lookup_chain(GHash *deleted_verts, BMVert *v) while (true) { BMVert **v_next_p = (BMVert **)BLI_ghash_lookup_p(deleted_verts, v); if (v_next_p == NULL) { - /* not remapped*/ + /* Not remapped. */ return v; } if (*v_next_p == NULL) { diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 468f1d7b1ee..a05eb6962ce 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2632,7 +2632,7 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra) } #endif - /*if (!G.relbase_valid) return; */ /* save blend file before using pointcache */ + // if (!G.relbase_valid) return; /* Save blend file before using pointcache. */ /* clear all files in the temp dir with the prefix of the ID and the ".bphys" suffix */ switch (mode) { @@ -2659,8 +2659,8 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra) ptcache_filename_ext_append(pid, ext, 0, false, 0); while ((de = readdir(dir)) != NULL) { - if (strstr(de->d_name, ext)) { /* do we have the right extension?*/ - if (STREQLEN(filename, de->d_name, len)) { /* do we have the right prefix */ + if (strstr(de->d_name, ext)) { /* Do we have the right extension? */ + if (STREQLEN(filename, de->d_name, len)) { /* Do we have the right prefix. */ if (mode == PTCACHE_CLEAR_ALL) { pid->cache->last_exact = MIN2(pid->cache->startframe, 0); BLI_join_dirfile(path_full, sizeof(path_full), path, de->d_name); @@ -2695,7 +2695,7 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra) PTCacheMem *link = NULL; if (mode == PTCACHE_CLEAR_ALL) { - /*we want startframe if the cache starts before zero*/ + /* We want startframe if the cache starts before zero. */ pid->cache->last_exact = MIN2(pid->cache->startframe, 0); for (; pm; pm = pm->next) { ptcache_mem_clear(pm); @@ -2856,8 +2856,8 @@ void BKE_ptcache_id_time( ptcache_filename_ext_append(pid, ext, 0, false, 0); while ((de = readdir(dir)) != NULL) { - if (strstr(de->d_name, ext)) { /* do we have the right extension?*/ - if (STREQLEN(filename, de->d_name, len)) { /* do we have the right prefix */ + if (strstr(de->d_name, ext)) { /* Do we have the right extension? */ + if (STREQLEN(filename, de->d_name, len)) { /* Do we have the right prefix. */ /* read the number of the file */ const int frame = ptcache_frame_from_filename(de->d_name, ext); @@ -3038,7 +3038,7 @@ void BKE_ptcache_remove(void) if (FILENAME_IS_CURRPAR(de->d_name)) { /* do nothing */ } - else if (strstr(de->d_name, PTCACHE_EXT)) { /* do we have the right extension?*/ + else if (strstr(de->d_name, PTCACHE_EXT)) { /* Do we have the right extension? */ BLI_join_dirfile(path_full, sizeof(path_full), path, de->d_name); BLI_delete(path_full, false, false); } @@ -3569,8 +3569,8 @@ void BKE_ptcache_disk_cache_rename(PTCacheID *pid, const char *name_src, const c BLI_strncpy(pid->cache->name, name_dst, sizeof(pid->cache->name)); while ((de = readdir(dir)) != NULL) { - if (strstr(de->d_name, ext)) { /* do we have the right extension?*/ - if (STREQLEN(old_filename, de->d_name, len)) { /* do we have the right prefix */ + if (strstr(de->d_name, ext)) { /* Do we have the right extension? */ + if (STREQLEN(old_filename, de->d_name, len)) { /* Do we have the right prefix. */ /* read the number of the file */ const int frame = ptcache_frame_from_filename(de->d_name, ext); @@ -3589,7 +3589,7 @@ void BKE_ptcache_disk_cache_rename(PTCacheID *pid, const char *name_src, const c void BKE_ptcache_load_external(PTCacheID *pid) { - /*todo*/ + /* TODO: */ PointCache *cache = pid->cache; int len; /* store the length of the string */ int info = 0; @@ -3626,8 +3626,8 @@ void BKE_ptcache_load_external(PTCacheID *pid) } while ((de = readdir(dir)) != NULL) { - if (strstr(de->d_name, ext)) { /* do we have the right extension?*/ - if (STREQLEN(filename, de->d_name, len)) { /* do we have the right prefix */ + if (strstr(de->d_name, ext)) { /* Do we have the right extension? */ + if (STREQLEN(filename, de->d_name, len)) { /* Do we have the right prefix. */ /* read the number of the file */ const int frame = ptcache_frame_from_filename(de->d_name, ext); diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 404e5cde40a..791116682c8 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -2013,7 +2013,7 @@ Scene *BKE_scene_duplicate(Main *bmain, Scene *sce, eSceneCopyMethod type) bmain, NULL, sce_copy->master_collection, duplicate_flags, LIB_ID_DUPLICATE_IS_SUBPROCESS); if (!is_subprocess) { - /* This code will follow into all ID links using an ID tagged with LIB_TAG_NEW.*/ + /* This code will follow into all ID links using an ID tagged with LIB_TAG_NEW. */ BKE_libblock_relink_to_newid(&sce_copy->id); #ifndef NDEBUG diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index 7a5892baaf6..608317933f5 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -1703,9 +1703,9 @@ static void direct_link_area(BlendDataReader *reader, ScrArea *area) BLO_read_list(reader, &sconsole->scrollback); BLO_read_list(reader, &sconsole->history); - /* comma expressions, (e.g. expr1, expr2, expr3) evaluate each expression, + /* Comma expressions, (e.g. expr1, expr2, expr3) evaluate each expression, * from left to right. the right-most expression sets the result of the comma - * expression as a whole*/ + * expression as a whole. */ LISTBASE_FOREACH_MUTABLE (ConsoleLine *, cl, &sconsole->history) { BLO_read_data_address(reader, &cl->line); if (cl->line) { diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 441c77a91d1..123843c88db 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -109,11 +109,11 @@ typedef struct ReferenceVert { } ReferenceVert; typedef struct ReferenceState { - float com[3]; /* center of mass*/ - ReferenceVert *ivert; /* list of initial values */ + float com[3]; /* Center of mass. */ + ReferenceVert *ivert; /* List of initial values. */ } ReferenceState; -/*private scratch pad for caching and other data only needed when alive*/ +/* Private scratch pad for caching and other data only needed when alive. */ typedef struct SBScratch { GHash *colliderhash; short needstobuildcollider; @@ -162,9 +162,9 @@ static float SoftHeunTol = 1.0f; /* local prototypes */ static void free_softbody_intern(SoftBody *sb); -/*+++ frame based timing +++*/ +/*+++ frame based timing +++ */ -/*physical unit of force is [kg * m / sec^2]*/ +/* Physical unit of force is `kg * m / sec^2`. */ /** * Since unit of g is [m/sec^2] and F = mass * g we re-scale unit mass of node to 1 gram @@ -207,7 +207,7 @@ static float sb_time_scale(Object *ob) } /*--- frame based timing ---*/ -/* helper functions for everything is animatable jow_go_for2_5 +++++++*/ +/* helper functions for everything is animatable jow_go_for2_5 +++++++ */ /* introducing them here, because i know: steps in properties ( at frame timing ) * will cause unwanted responses of the softbody system (which does inter frame calculations ) * so first 'cure' would be: interpolate linear in time .. @@ -217,7 +217,7 @@ static float sb_time_scale(Object *ob) */ /* animate sb->maxgoal, sb->mingoal */ -static float _final_goal(Object *ob, BodyPoint *bp) /*jow_go_for2_5 */ +static float _final_goal(Object *ob, BodyPoint *bp) /* jow_go_for2_5 */ { float f = -1999.99f; if (ob) { @@ -235,7 +235,7 @@ static float _final_goal(Object *ob, BodyPoint *bp) /*jow_go_for2_5 */ } } CLOG_ERROR(&LOG, "sb or bp == NULL"); - return f; /*using crude but spot able values some times helps debuggin */ + return f; /* Using crude but spot able values some times helps debugging. */ } static float _final_mass(Object *ob, BodyPoint *bp) @@ -251,7 +251,7 @@ static float _final_mass(Object *ob, BodyPoint *bp) } /* helper functions for everything is animateble jow_go_for2_5 ------*/ -/*+++ collider caching and dicing +++*/ +/* +++ collider caching and dicing +++ */ /* * for each target object/face the axis aligned bounding box (AABB) is stored @@ -311,7 +311,7 @@ static ccd_Mesh *ccd_mesh_make(Object *ob) /* blow it up with forcefield ranges */ hull = max_ff(ob->pd->pdef_sbift, ob->pd->pdef_sboft); - /* alloc and copy verts*/ + /* Allocate and copy verts. */ pccd_M->mvert = MEM_dupallocN(cmd->xnew); /* note that xnew coords are already in global space, */ /* determine the ortho BB */ @@ -328,7 +328,7 @@ static ccd_Mesh *ccd_mesh_make(Object *ob) pccd_M->bbmax[1] = max_ff(pccd_M->bbmax[1], v[1] + hull); pccd_M->bbmax[2] = max_ff(pccd_M->bbmax[2], v[2] + hull); } - /* alloc and copy faces*/ + /* Allocate and copy faces. */ pccd_M->tri = MEM_dupallocN(cmd->tri); /* OBBs for idea1 */ @@ -401,7 +401,7 @@ static void ccd_mesh_update(Object *ob, ccd_Mesh *pccd_M) MEM_freeN((void *)pccd_M->mprevvert); } pccd_M->mprevvert = pccd_M->mvert; - /* alloc and copy verts*/ + /* Allocate and copy verts. */ pccd_M->mvert = MEM_dupallocN(cmd->xnew); /* note that xnew coords are already in global space, */ /* determine the ortho BB */ @@ -598,7 +598,7 @@ static int count_mesh_quads(Mesh *me) static void add_mesh_quad_diag_springs(Object *ob) { Mesh *me = ob->data; - /*BodyPoint *bp;*/ /*UNUSED*/ + // BodyPoint *bp; /* UNUSED */ int a; if (ob->soft) { @@ -618,7 +618,7 @@ static void add_mesh_quad_diag_springs(Object *ob) /* fill the tail */ a = 0; bs = &ob->soft->bspring[ob->soft->totspring]; - /*bp= ob->soft->bpoint; */ /*UNUSED*/ + // bp = ob->soft->bpoint; /* UNUSED */ for (a = me->totpoly; a > 0; a--, mp++) { if (mp->totloop == 4) { bs->v1 = mloop[mp->loopstart + 0].v; @@ -640,7 +640,7 @@ static void add_mesh_quad_diag_springs(Object *ob) static void add_2nd_order_roller(Object *ob, float UNUSED(stiffness), int *counter, int addsprings) { - /*assume we have a softbody*/ + /* Assume we have a softbody. */ SoftBody *sb = ob->soft; /* is supposed to be there */ BodyPoint *bp, *bpo; BodySpring *bs, *bs2, *bs3 = NULL; @@ -654,7 +654,7 @@ static void add_2nd_order_roller(Object *ob, float UNUSED(stiffness), int *count bs3 = ob->soft->bspring + ob->soft->totspring; } for (a = sb->totpoint, bp = sb->bpoint; a > 0; a--, bp++) { - /*scan for neighborhood*/ + /* Scan for neighborhood. */ bpo = NULL; v0 = (sb->totpoint - a); for (b = bp->nofsprings; b > 0; b--) { @@ -678,7 +678,7 @@ static void add_2nd_order_roller(Object *ob, float UNUSED(stiffness), int *count for (c = bpo->nofsprings; c > 0; c--) { bs2 = sb->bspring + bpo->springs[c - 1]; if ((bs2->v1 != notthis) && (bs2->v1 > v0)) { - (*counter)++; /*hit */ + (*counter)++; /* hit */ if (addsprings) { bs3->v1 = v0; bs3->v2 = bs2->v1; @@ -698,7 +698,7 @@ static void add_2nd_order_roller(Object *ob, float UNUSED(stiffness), int *count } } } - /*scan for neighborhood done*/ + /* Scan for neighborhood done. */ } } @@ -772,8 +772,8 @@ static void build_bps_springlist(Object *ob) if (((sb->totpoint - a) == bs->v2)) { add_bp_springlist(bp, sb->totspring - b); } - } /*for springs*/ - } /*for bp*/ + } /* For springs. */ + } /* For bp. */ } static void calculate_collision_balls(Object *ob) @@ -825,7 +825,7 @@ static void calculate_collision_balls(Object *ob) else { bp->colball = 0; } - } /*for bp*/ + } /* For bp. */ } /* creates new softbody if didn't exist yet, makes new points and springs arrays */ @@ -905,7 +905,7 @@ static void free_scratch(SoftBody *sb) if (sb->scratch->colliderhash) { BLI_ghash_free(sb->scratch->colliderhash, NULL, - (GHashValFreeFP)ccd_mesh_free); /*this hoepfully will free all caches*/ + (GHashValFreeFP)ccd_mesh_free); /* This hopefully will free all caches. */ sb->scratch->colliderhash = NULL; } if (sb->scratch->bodyface) { @@ -976,7 +976,7 @@ static void free_softbody_intern(SoftBody *sb) * since that would only valid for 'slow' moving collision targets and dito particles */ -/* +++ dependency information functions*/ +/* +++ dependency information functions. */ /** * \note collection overrides scene when not NULL. @@ -990,9 +990,9 @@ static int query_external_colliders(Depsgraph *depsgraph, Collection *collection return (numobjects != 0); } -/* --- dependency information functions*/ +/* --- dependency information functions. */ -/* +++ the aabb "force" section*/ +/* +++ the aabb "force" section. */ static int sb_detect_aabb_collisionCached(float UNUSED(force[3]), struct Object *vertexowner, float UNUSED(time)) @@ -1036,7 +1036,7 @@ static int sb_detect_aabb_collisionCached(float UNUSED(force[3]), deflected = 2; } else { - /*aye that should be cached*/ + /* Aye that should be cached. */ CLOG_ERROR(&LOG, "missing cache error"); BLI_ghashIterator_step(ihash); continue; @@ -1048,9 +1048,9 @@ static int sb_detect_aabb_collisionCached(float UNUSED(force[3]), BLI_ghashIterator_free(ihash); return deflected; } -/* --- the aabb section*/ +/* --- the aabb section. */ -/* +++ the face external section*/ +/* +++ the face external section. */ static int sb_detect_face_pointCached(const float face_v1[3], const float face_v2[3], const float face_v3[3], @@ -1104,13 +1104,13 @@ static int sb_detect_face_pointCached(const float face_v1[3], } } else { - /*aye that should be cached*/ + /* Aye that should be cached. */ CLOG_ERROR(&LOG, "missing cache error"); BLI_ghashIterator_step(ihash); continue; } - /* use mesh*/ + /* Use mesh. */ if (mvert) { while (a) { copy_v3_v3(nv1, mvert[a - 1].co); @@ -1118,7 +1118,7 @@ static int sb_detect_face_pointCached(const float face_v1[3], mul_v3_fl(nv1, time); madd_v3_v3fl(nv1, mprevvert[a - 1].co, 1.0f - time); } - /* origin to face_v2*/ + /* Origin to face_v2. */ sub_v3_v3(nv1, face_v2); facedist = dot_v3v3(nv1, d_nvect); if (fabsf(facedist) < outerfacethickness) { @@ -1139,7 +1139,7 @@ static int sb_detect_face_pointCached(const float face_v1[3], } } a--; - } /* while (a)*/ + } /* while (a) */ } /* if (mvert) */ } /* if (ob->pd && ob->pd->deflect) */ BLI_ghashIterator_step(ihash); @@ -1201,13 +1201,13 @@ static int sb_detect_face_collisionCached(const float face_v1[3], } } else { - /*aye that should be cached*/ + /* Aye that should be cached. */ CLOG_ERROR(&LOG, "missing cache error"); BLI_ghashIterator_step(ihash); continue; } - /* use mesh*/ + /* Use mesh. */ while (a--) { if ((aabbmax[0] < mima->minx) || (aabbmin[0] > mima->maxx) || (aabbmax[1] < mima->miny) || (aabbmin[1] > mima->maxy) || @@ -1235,7 +1235,7 @@ static int sb_detect_face_collisionCached(const float face_v1[3], } } - /* switch origin to be nv2*/ + /* Switch origin to be nv2. */ sub_v3_v3v3(edge1, nv1, nv2); sub_v3_v3v3(edge2, nv3, nv2); cross_v3_v3v3(d_nvect, edge2, edge1); @@ -1272,7 +1272,7 @@ static void scan_for_ext_face_forces(Object *ob, float timenow) bf = sb->scratch->bodyface; for (a = 0; a < sb->scratch->totface; a++, bf++) { bf->ext_force[0] = bf->ext_force[1] = bf->ext_force[2] = 0.0f; - /*+++edges intruding*/ + /*+++edges intruding. */ bf->flag &= ~BFF_INTERSECT; zero_v3(feedback); if (sb_detect_face_collisionCached(sb->bpoint[bf->v1].pos, @@ -1289,9 +1289,9 @@ static void scan_for_ext_face_forces(Object *ob, float timenow) bf->flag |= BFF_INTERSECT; choke = min_ff(max_ff(damp, choke), 1.0f); } - /*---edges intruding*/ + /*---edges intruding. */ - /*+++ close vertices*/ + /*+++ close vertices. */ if ((bf->flag & BFF_INTERSECT) == 0) { bf->flag &= ~BFF_CLOSEVERT; tune = -1.0f; @@ -1311,7 +1311,7 @@ static void scan_for_ext_face_forces(Object *ob, float timenow) choke = min_ff(max_ff(damp, choke), 1.0f); } } - /*--- close vertices*/ + /*--- close vertices. */ } bf = sb->scratch->bodyface; for (a = 0; a < sb->scratch->totface; a++, bf++) { @@ -1324,9 +1324,9 @@ static void scan_for_ext_face_forces(Object *ob, float timenow) } } -/* --- the face external section*/ +/* --- the face external section. */ -/* +++ the spring external section*/ +/* +++ the spring external section. */ static int sb_detect_edge_collisionCached(const float edge_v1[3], const float edge_v2[3], @@ -1377,13 +1377,13 @@ static int sb_detect_edge_collisionCached(const float edge_v1[3], } } else { - /*aye that should be cached*/ + /* Aye that should be cached. */ CLOG_ERROR(&LOG, "missing cache error"); BLI_ghashIterator_step(ihash); continue; } - /* use mesh*/ + /* Use mesh. */ while (a--) { if ((aabbmax[0] < mima->minx) || (aabbmin[0] > mima->maxx) || (aabbmax[1] < mima->miny) || (aabbmin[1] > mima->maxy) || @@ -1411,7 +1411,7 @@ static int sb_detect_edge_collisionCached(const float edge_v1[3], } } - /* switch origin to be nv2*/ + /* Switch origin to be nv2. */ sub_v3_v3v3(edge1, nv1, nv2); sub_v3_v3v3(edge2, nv3, nv2); @@ -1469,12 +1469,12 @@ static void _scan_for_ext_spring_forces( } /* ---- springs colliding */ - /* +++ springs seeing wind ... n stuff depending on their orientation*/ - /* note we don't use sb->mediafrict but use sb->aeroedge for magnitude of effect*/ + /* +++ springs seeing wind ... n stuff depending on their orientation. */ + /* NOTE: we don't use `sb->mediafrict` but use `sb->aeroedge` for magnitude of effect. */ if (sb->aeroedge) { float vel[3], sp[3], pr[3], force[3]; float f, windfactor = 0.25f; - /*see if we have wind*/ + /* See if we have wind. */ if (effectors) { EffectedPoint epoint; float speed[3] = {0.0f, 0.0f, 0.0f}; @@ -1543,7 +1543,7 @@ static void sb_sfesf_threads_run(struct Depsgraph *depsgraph, /* figure the number of threads while preventing pretty pointless threading overhead */ totthread = BKE_scene_num_threads(scene); - /* what if we got zillions of CPUs running but less to spread*/ + /* What if we got zillions of CPUs running but less to spread. */ while ((totsprings / totthread < lowsprings) && (totthread > 1)) { totthread--; } @@ -1590,7 +1590,7 @@ static void sb_sfesf_threads_run(struct Depsgraph *depsgraph, BKE_effectors_free(effectors); } -/* --- the spring external section*/ +/* --- the spring external section. */ static int choose_winner( float *w, float *pos, float *a, float *b, float *c, float *ca, float *cb, float *cc) @@ -1683,7 +1683,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], } } else { - /*aye that should be cached*/ + /* Aye that should be cached. */ CLOG_ERROR(&LOG, "missing cache error"); BLI_ghashIterator_step(ihash); continue; @@ -1697,7 +1697,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], fa *= fa; fa = 1.0f / fa; avel[0] = avel[1] = avel[2] = 0.0f; - /* use mesh*/ + /* Use mesh. */ while (a--) { if ((opco[0] < mima->minx) || (opco[0] > mima->maxx) || (opco[1] < mima->miny) || (opco[1] > mima->maxy) || (opco[2] < mima->minz) || (opco[2] > mima->maxz)) { @@ -1733,7 +1733,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], } } - /* switch origin to be nv2*/ + /* Switch origin to be nv2. */ sub_v3_v3v3(edge1, nv1, nv2); sub_v3_v3v3(edge2, nv3, nv2); /* Abuse dv1 to have vertex in question at *origin* of triangle. */ @@ -2068,7 +2068,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, bp->force[1] += -ks * (auxvect[1]); bp->force[2] += -ks * (auxvect[2]); - /* calculate damping forces generated by goals*/ + /* Calculate damping forces generated by goals. */ sub_v3_v3v3(velgoal, bp->origS, bp->origE); kd = sb->goalfrict * sb_fric_force_scale(ob); add_v3_v3v3(auxvect, velgoal, bp->vec); @@ -2113,7 +2113,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, pd_point_from_soft(scene, bp->pos, bp->vec, sb->bpoint - bp, &epoint); BKE_effectors_apply(effectors, NULL, sb->effector_weights, &epoint, force, NULL, speed); - /* apply forcefield*/ + /* Apply force-field. */ mul_v3_fl(force, fieldfactor * eval_sb_fric_force_scale); add_v3_v3(bp->force, force); @@ -2125,7 +2125,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, /* now we'll have nice centrifugal effect for vortex */ } else { - /* BP friction in media (not) moving*/ + /* BP friction in media (not) moving. */ float kd = sb->mediafrict * sb_fric_force_scale(ob); /* assume it to be proportional to actual velocity */ bp->force[0] -= bp->vec[0] * kd; @@ -2160,7 +2160,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, /* +++springs */ iks = 1.0f / (1.0f - sb->inspring) - 1.0f; /* inner spring constants function */ if (ob->softflag & OB_SB_EDGES) { - if (sb->bspring) { /* spring list exists at all ? */ + if (sb->bspring) { /* Spring list exists at all? */ int b; BodySpring *bs; for (b = bp->nofsprings; b > 0; b--) { @@ -2173,13 +2173,13 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, } // sb_spring_force(Object *ob, int bpi, BodySpring *bs, float iks, float forcetime) sb_spring_force(ob, ilast - bb, bs, iks, forcetime); - } /* loop springs */ - } /* existing spring list */ - } /*any edges*/ + } /* loop springs. */ + } /* existing spring list. */ + } /* Any edges. */ /* ---springs */ - } /*omit on snap */ - } /*loop all bp's*/ - return 0; /*done fine*/ + } /* Omit on snap. */ + } /* Loop all bp's. */ + return 0; /* Done fine. */ } static void *exec_softbody_calc_forces(void *data) @@ -2220,7 +2220,7 @@ static void sb_cf_threads_run(Scene *scene, /* figure the number of threads while preventing pretty pointless threading overhead */ totthread = BKE_scene_num_threads(scene); - /* what if we got zillions of CPUs running but less to spread*/ + /* What if we got zillions of CPUs running but less to spread. */ while ((totpoint / totthread < lowpoints) && (totthread > 1)) { totthread--; } @@ -2275,11 +2275,11 @@ static void softbody_calc_forces( * this will ruin adaptive stepsize AKA heun! (BM) */ SoftBody *sb = ob->soft; /* is supposed to be there */ - /*BodyPoint *bproot;*/ /* UNUSED */ - /* float gravity; */ /* UNUSED */ - /* float iks; */ + // BodyPoint *bproot; /* UNUSED */ + // float gravity; /* UNUSED */ + // float iks; float fieldfactor = -1.0f, windfactor = 0.25; - int do_deflector /*, do_selfcollision*/, do_springcollision, do_aero; + int do_deflector /*, do_selfcollision */, do_springcollision, do_aero; /* gravity = sb->grav * sb_grav_force_scale(ob); */ /* UNUSED */ @@ -2292,8 +2292,8 @@ static void softbody_calc_forces( (ob->softflag & OB_SB_EDGECOLL); do_aero = ((sb->aeroedge) && (ob->softflag & OB_SB_EDGES)); - /* iks = 1.0f/(1.0f-sb->inspring)-1.0f; */ /* inner spring constants function */ /* UNUSED */ - /* bproot= sb->bpoint; */ /* need this for proper spring addressing */ /* UNUSED */ + // iks = 1.0f / (1.0f - sb->inspring) - 1.0f; /* Inner spring constants function. */ /* UNUSED */ + // bproot = sb->bpoint; /* Need this for proper spring addressing. */ /* UNUSED */ if (do_springcollision || do_aero) { sb_sfesf_threads_run(depsgraph, scene, ob, timenow, sb->totspring, NULL); @@ -2489,7 +2489,7 @@ static void softbody_apply_forces(Object *ob, float forcetime, int mode, float * /* used by heun when it overshoots */ static void softbody_restore_prev_step(Object *ob) { - SoftBody *sb = ob->soft; /* is supposed to be there*/ + SoftBody *sb = ob->soft; /* is supposed to be there. */ BodyPoint *bp; int a; @@ -2502,7 +2502,7 @@ static void softbody_restore_prev_step(Object *ob) #if 0 static void softbody_store_step(Object *ob) { - SoftBody *sb = ob->soft; /* is supposed to be there*/ + SoftBody *sb = ob->soft; /* is supposed to be there. */ BodyPoint *bp; int a; @@ -2515,7 +2515,7 @@ static void softbody_store_step(Object *ob) /* used by predictors and correctors */ static void softbody_store_state(Object *ob, float *ppos, float *pvel) { - SoftBody *sb = ob->soft; /* is supposed to be there*/ + SoftBody *sb = ob->soft; /* is supposed to be there. */ BodyPoint *bp; int a; float *pp = ppos, *pv = pvel; @@ -2533,7 +2533,7 @@ static void softbody_store_state(Object *ob, float *ppos, float *pvel) /* used by predictors and correctors */ static void softbody_retrieve_state(Object *ob, float *ppos, float *pvel) { - SoftBody *sb = ob->soft; /* is supposed to be there*/ + SoftBody *sb = ob->soft; /* is supposed to be there. */ BodyPoint *bp; int a; float *pp = ppos, *pv = pvel; @@ -2551,7 +2551,7 @@ static void softbody_retrieve_state(Object *ob, float *ppos, float *pvel) /* used by predictors and correctors */ static void softbody_swap_state(Object *ob, float *ppos, float *pvel) { - SoftBody *sb = ob->soft; /* is supposed to be there*/ + SoftBody *sb = ob->soft; /* is supposed to be there. */ BodyPoint *bp; int a; float *pp = ppos, *pv = pvel; @@ -2773,7 +2773,7 @@ static void mesh_faces_to_scratch(Object *ob) MLoopTri *looptri, *lt; BodyFace *bodyface; int a; - /* alloc and copy faces*/ + /* Allocate and copy faces. */ sb->scratch->totface = poly_to_tri_count(me->totpoly, me->totloop); looptri = lt = MEM_mallocN(sizeof(*looptri) * sb->scratch->totface, __func__); @@ -3000,8 +3000,8 @@ static void curve_surf_to_softbody(Object *ob) bp = sb->bpoint; bs = sb->bspring; - /* weights from bpoints, same code used as for mesh vertices */ - /* if ((ob->softflag & OB_SB_GOAL) && sb->vertgroup) 2.4x hack*/ + /* Weights from bpoints, same code used as for mesh vertices. */ + /* if ((ob->softflag & OB_SB_GOAL) && sb->vertgroup) 2.4x hack. */ /* new! take the weights from curve vertex anyhow */ if (ob->softflag & OB_SB_GOAL) { setgoal = 1; @@ -3022,10 +3022,10 @@ static void curve_surf_to_softbody(Object *ob) if (setgoal) { bp->goal *= bezt->weight; - /* all three triples */ + /* All three triples. */ (bp + 1)->goal = bp->goal; (bp + 2)->goal = bp->goal; - /*do not collide handles */ + /* Do not collide handles. */ (bp + 1)->loc_flag |= SBF_OUTOFCOLLISION; (bp + 2)->loc_flag |= SBF_OUTOFCOLLISION; } @@ -3137,7 +3137,7 @@ SoftBody *sbNew(void) sb->inspring = 0.5f; sb->infrict = 0.5f; - /*todo backward file compat should copy inspring to inpush while reading old files*/ + /* TODO: backward file compat should copy `inspring` to `inpush` while reading old files. */ sb->inpush = 0.5f; sb->colball = 0.49f; @@ -3150,7 +3150,7 @@ SoftBody *sbNew(void) sb->choke = 3; sb_new_scratch(sb); - /*todo backward file compat should set sb->shearstiff = 1.0f while reading old files*/ + /* TODO: backward file compat should set `sb->shearstiff = 1.0f` while reading old files. */ sb->shearstiff = 1.0f; sb->solverflags |= SBSO_OLDERR; @@ -3311,7 +3311,7 @@ static void softbody_reset(Object *ob, SoftBody *sb, float (*vertexCos)[3], int for (a = 0, bp = sb->bpoint; a < numVerts; a++, bp++) { copy_v3_v3(bp->pos, vertexCos[a]); - mul_m4_v3(ob->obmat, bp->pos); /* yep, sofbody is global coords*/ + mul_m4_v3(ob->obmat, bp->pos); /* Yep, soft-body is global coords. */ copy_v3_v3(bp->origS, bp->pos); copy_v3_v3(bp->origE, bp->pos); copy_v3_v3(bp->origT, bp->pos); @@ -3493,18 +3493,18 @@ static void softbody_step( else if (sb->solver_ID == 2) { /* do semi "fake" implicit euler */ /* removed */ - } /*SOLVER SELECT*/ + } /* SOLVER SELECT */ else if (sb->solver_ID == 4) { /* do semi "fake" implicit euler */ - } /*SOLVER SELECT*/ + } /* SOLVER SELECT */ else if (sb->solver_ID == 3) { /* do "stupid" semi "fake" implicit euler */ /* removed */ - } /*SOLVER SELECT*/ + } /* SOLVER SELECT */ else { CLOG_ERROR(&LOG, "softbody no valid solver ID!"); - } /*SOLVER SELECT*/ + } /* SOLVER SELECT */ if (sb->plastic) { apply_spring_memory(ob); } diff --git a/source/blender/blenkernel/intern/subdiv_ccg.c b/source/blender/blenkernel/intern/subdiv_ccg.c index 6f8a3d166e3..8b672b2cb49 100644 --- a/source/blender/blenkernel/intern/subdiv_ccg.c +++ b/source/blender/blenkernel/intern/subdiv_ccg.c @@ -1116,7 +1116,7 @@ typedef struct AverageGridsCornerData { SubdivCCG *subdiv_ccg; CCGKey *key; - /* Optional lookup table. Maps task range index to index in subdiv_ccg->adjacent_vertices*/ + /* Optional lookup table. Maps task range index to index in `subdiv_ccg->adjacent_vertices`. */ const int *adjacent_vert_index_map; } AverageGridsCornerData; diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 23eccbfba9b..0dbfeaaaadb 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -580,16 +580,16 @@ static void ss_sync_ccg_from_derivedmesh(CCGSubSurf *ss, #endif MVert *mvert = dm->getVertArray(dm); MEdge *medge = dm->getEdgeArray(dm); - /* MFace *mface = dm->getTessFaceArray(dm); */ /* UNUSED */ + // MFace *mface = dm->getTessFaceArray(dm); /* UNUSED */ MVert *mv; MEdge *me; MLoop *mloop = dm->getLoopArray(dm), *ml; MPoly *mpoly = dm->getPolyArray(dm), *mp; - /*MFace *mf;*/ /*UNUSED*/ + // MFace *mf; /* UNUSED */ int totvert = dm->getNumVerts(dm); int totedge = dm->getNumEdges(dm); - /*int totface = dm->getNumTessFaces(dm);*/ /*UNUSED*/ - /*int totpoly = dm->getNumFaces(dm);*/ /*UNUSED*/ + // int totface = dm->getNumTessFaces(dm); /* UNUSED */ + // int totpoly = dm->getNumFaces(dm); /* UNUSED */ int i, j; int *index; @@ -641,10 +641,10 @@ static void ss_sync_ccg_from_derivedmesh(CCGSubSurf *ss, fVerts[j] = POINTER_FROM_UINT(ml->v); } - /* this is very bad, means mesh is internally inconsistent. + /* This is very bad, means mesh is internally inconsistent. * it is not really possible to continue without modifying * other parts of code significantly to handle missing faces. - * since this really shouldn't even be possible we just bail.*/ + * since this really shouldn't even be possible we just bail. */ if (ccgSubSurf_syncFace(ss, POINTER_FROM_INT(i), mp->totloop, fVerts, &f) == eCCGError_InvalidValue) { static int hasGivenError = 0; @@ -1008,11 +1008,11 @@ static void ccgDM_getFinalFace(DerivedMesh *dm, int faceNum, MFace *mf) int gridFaces = gridSideEdges * gridSideEdges; int i; CCGFace *f; - /*int numVerts;*/ + // int numVerts; int offset; int grid; int x, y; - /*int lastface = ccgSubSurf_getNumFaces(ss) - 1;*/ /*UNUSED*/ + // int lastface = ccgSubSurf_getNumFaces(ss) - 1; /* UNUSED */ DMFlagMat *faceFlags = ccgdm->faceFlags; memset(mf, 0, sizeof(*mf)); @@ -1023,7 +1023,7 @@ static void ccgDM_getFinalFace(DerivedMesh *dm, int faceNum, MFace *mf) i = ccgdm->reverseFaceMap[faceNum]; f = ccgdm->faceMap[i].face; - /*numVerts = ccgSubSurf_getFaceNumVerts(f);*/ /*UNUSED*/ + // numVerts = ccgSubSurf_getFaceNumVerts(f); /* UNUSED */ offset = faceNum - ccgdm->faceMap[i].startFace; grid = offset / gridFaces; @@ -1781,7 +1781,7 @@ static void ccgdm_create_grids(DerivedMesh *dm) numGrids = ccgDM_getNumGrids(dm); numFaces = ccgSubSurf_getNumFaces(ss); - /*gridSize = ccgDM_getGridSize(dm);*/ /*UNUSED*/ + // gridSize = ccgDM_getGridSize(dm); /* UNUSED */ /* compute offset into grid array for each face */ gridOffset = MEM_mallocN(sizeof(int) * numFaces, "ccgdm.gridOffset"); @@ -2089,7 +2089,7 @@ static void set_ccgdm_all_geometry(CCGDerivedMesh *ccgdm, vertidx[s] = POINTER_AS_INT(ccgSubSurf_getVertVertHandle(v)); } - /*I think this is for interpolating the center vert?*/ + /* I think this is for interpolating the center vert? */ w2 = w; // + numVerts*(g2_wid-1) * (g2_wid-1); //numVerts*((g2_wid-1) * g2_wid+g2_wid-1); DM_interp_vert_data(dm, &ccgdm->dm, vertidx, w2, numVerts, vertNum); if (vertOrigIndex) { @@ -2099,7 +2099,7 @@ static void set_ccgdm_all_geometry(CCGDerivedMesh *ccgdm, vertNum++; - /*interpolate per-vert data*/ + /* Interpolate per-vert data. */ for (s = 0; s < numVerts; s++) { for (x = 1; x < gridFaces; x++) { w2 = w + s * numVerts * g2_wid * g2_wid + x * numVerts; @@ -2114,7 +2114,7 @@ static void set_ccgdm_all_geometry(CCGDerivedMesh *ccgdm, } } - /*interpolate per-vert data*/ + /* Interpolate per-vert data. */ for (s = 0; s < numVerts; s++) { for (y = 1; y < gridFaces; y++) { for (x = 1; x < gridFaces; x++) { @@ -2138,7 +2138,7 @@ static void set_ccgdm_all_geometry(CCGDerivedMesh *ccgdm, } for (s = 0; s < numVerts; s++) { - /*interpolate per-face data*/ + /* Interpolate per-face data. */ for (y = 0; y < gridFaces; y++) { for (x = 0; x < gridFaces; x++) { w2 = w + s * numVerts * g2_wid * g2_wid + (y * g2_wid + x) * numVerts; @@ -2161,10 +2161,10 @@ static void set_ccgdm_all_geometry(CCGDerivedMesh *ccgdm, &dm->loopData, &ccgdm->dm.loopData, loopidx, w2, NULL, numVerts, loopindex2); loopindex2++; - /*copy over poly data, e.g. mtexpoly*/ + /* Copy over poly data, e.g. mtexpoly. */ CustomData_copy_data(&dm->polyData, &ccgdm->dm.polyData, origIndex, faceNum, 1); - /*set original index data*/ + /* Set original index data. */ if (faceOrigIndex) { /* reference the index in 'polyOrigIndex' */ *faceOrigIndex = faceNum; diff --git a/source/blender/blenkernel/intern/workspace.c b/source/blender/blenkernel/intern/workspace.c index be67b2370e3..533107b2bf6 100644 --- a/source/blender/blenkernel/intern/workspace.c +++ b/source/blender/blenkernel/intern/workspace.c @@ -105,8 +105,8 @@ static void workspace_blend_read_data(BlendDataReader *reader, ID *id) BLO_read_list(reader, &workspace->tools); LISTBASE_FOREACH (WorkSpaceDataRelation *, relation, &workspace->hook_layout_relations) { - /* parent pointer does not belong to workspace data and is therefore restored in lib_link step - * of window manager.*/ + /* Parent pointer does not belong to workspace data and is therefore restored in lib_link step + * of window manager. */ BLO_read_data_address(reader, &relation->value); } diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h index 4e37314ed3e..e40a79dad21 100644 --- a/source/blender/blenlib/BLI_array.h +++ b/source/blender/blenlib/BLI_array.h @@ -105,8 +105,9 @@ void _bli_array_grow_func(void **arr_p, ((void)BLI_array_grow_one(arr), (void)(arr[_##arr##_len - 1] = item)) /** - * appends an item to the array and returns a pointer to the item in the array. - * item is not a pointer, but actual data value.*/ + * Appends an item to the array and returns a pointer to the item in the array. + * item is not a pointer, but actual data value. + */ #define BLI_array_append_r(arr, item) \ ((void)BLI_array_grow_one(arr), (void)(arr[_##arr##_len - 1] = item), (&arr[_##arr##_len - 1])) diff --git a/source/blender/blenlib/BLI_buffer.h b/source/blender/blenlib/BLI_buffer.h index f641c89e53b..9d66fe9a14e 100644 --- a/source/blender/blenlib/BLI_buffer.h +++ b/source/blender/blenlib/BLI_buffer.h @@ -42,7 +42,7 @@ enum { BLI_Buffer name_ = { \ (name_##_static_), sizeof(type_), 0, static_count_, BLI_BUFFER_USE_STATIC | (flag_)} -/* never use static*/ +/* Never use static. */ #define BLI_buffer_declare(type_, name_, flag_) \ bool name_##user; /* warn for free only */ \ BLI_Buffer name_ = {NULL, sizeof(type_), 0, 0, (flag_)} diff --git a/source/blender/blenlib/BLI_strict_flags.h b/source/blender/blenlib/BLI_strict_flags.h index 6cee6b64797..b967d7e494d 100644 --- a/source/blender/blenlib/BLI_strict_flags.h +++ b/source/blender/blenlib/BLI_strict_flags.h @@ -30,7 +30,7 @@ # pragma GCC diagnostic error "-Wconversion" # endif # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 -/* gcc4.8+ only (behavior changed to ignore globals)*/ +/* gcc4.8+ only (behavior changed to ignore globals). */ # pragma GCC diagnostic error "-Wshadow" /* older gcc changed behavior with ternary */ # pragma GCC diagnostic error "-Wsign-conversion" diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h index eefde1afefb..4f71e3aa6e4 100644 --- a/source/blender/blenlib/BLI_threads.h +++ b/source/blender/blenlib/BLI_threads.h @@ -38,7 +38,7 @@ struct ListBase; /* Threading API */ -/*this is run once at startup*/ +/* This is run once at startup. */ void BLI_threadapi_init(void); void BLI_threadapi_exit(void); diff --git a/source/blender/blenlib/intern/boxpack_2d.c b/source/blender/blenlib/intern/boxpack_2d.c index 58889827b96..ea6c2d8d498 100644 --- a/source/blender/blenlib/intern/boxpack_2d.c +++ b/source/blender/blenlib/intern/boxpack_2d.c @@ -298,8 +298,8 @@ void BLI_box_pack_2d(BoxPack *boxarray, const uint len, float *r_tot_x, float *r bool isect; float tot_x = 0.0f, tot_y = 0.0f; - BoxPack *box, *box_test; /*current box and another for intersection tests*/ - BoxVert *vert; /* the current vert */ + BoxPack *box, *box_test; /* Current box and another for intersection tests. */ + BoxVert *vert; /* The current vert. */ struct VertSortContext vs_ctx; diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index 5114d548b9c..58b109eca10 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -199,7 +199,7 @@ MINLINE float scalenorm(float a, float b, float x) return (x * (b - a)) + a; } -/* used for zoom values*/ +/* Used for zoom values. */ MINLINE float power_of_2(float val) { return (float)pow(2.0, ceil(log((double)val) / M_LN2)); diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index abcb3139dc7..67c4ad95d79 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -478,7 +478,7 @@ void minmax_rgb(short c[3]) * accessible from the given triple of primaries. Desaturate * it by adding white, equal quantities of R, G, and B, enough * to make RGB all positive. The function returns 1 if the - * components were modified, zero otherwise.*/ + * components were modified, zero otherwise. */ int constrain_rgb(float *r, float *g, float *b) { /* Amount of white needed */ diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 272623ab4ec..3175bf116a0 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -856,7 +856,7 @@ void dist_squared_to_projected_aabb_precalc(struct DistProjectedAABBPrecalc *pre } #else if (!isect_plane_plane_v3(px, py, precalc->ray_origin, precalc->ray_direction)) { - /* Matrix with weird coplanar planes. Undetermined origin.*/ + /* Matrix with weird co-planar planes. Undetermined origin. */ zero_v3(precalc->ray_origin); precalc->ray_direction[0] = precalc->pmat[0][3]; precalc->ray_direction[1] = precalc->pmat[1][3]; @@ -2133,7 +2133,7 @@ bool isect_ray_line_v3(const float ray_origin[3], const float nlen = len_squared_v3(n); if (nlen == 0.0f) { - /* the lines are parallel.*/ + /* The lines are parallel. */ return false; } @@ -2903,7 +2903,7 @@ bool isect_sweeping_sphere_tri_v3(const float p1[3], /*---test edges---*/ sub_v3_v3v3(e3, v2, v1); /* wasn't yet calculated */ - /*e1*/ + /* `e1` */ sub_v3_v3v3(bv, v0, p1); elen2 = dot_v3v3(e1, e1); @@ -2926,8 +2926,8 @@ bool isect_sweeping_sphere_tri_v3(const float p1[3], } } - /*e2*/ - /*bv is same*/ + /* `e2` */ + /* `bv` is same. */ elen2 = dot_v3v3(e2, e2); edotv = dot_v3v3(e2, vel); edotbv = dot_v3v3(e2, bv); @@ -2948,11 +2948,11 @@ bool isect_sweeping_sphere_tri_v3(const float p1[3], } } - /*e3*/ - /* sub_v3_v3v3(bv, v0, p1); */ /* UNUSED */ - /* elen2 = dot_v3v3(e1, e1); */ /* UNUSED */ - /* edotv = dot_v3v3(e1, vel); */ /* UNUSED */ - /* edotbv = dot_v3v3(e1, bv); */ /* UNUSED */ + /* `e3` */ + // sub_v3_v3v3(bv, v0, p1); /* UNUSED */ + // elen2 = dot_v3v3(e1, e1); /* UNUSED */ + // edotv = dot_v3v3(e1, vel); /* UNUSED */ + // edotbv = dot_v3v3(e1, bv); /* UNUSED */ sub_v3_v3v3(bv, v1, p1); elen2 = dot_v3v3(e3, e3); @@ -4642,7 +4642,7 @@ void resolve_quad_uv_v2_deriv(float r_uv[2], (st3[0] * st0[1] - st3[1] * st0[0]); /* X is 2D cross product (determinant) - * A = (p0 - p) X (p0 - p3)*/ + * A = (p0 - p) X (p0 - p3) */ const double a = (st0[0] - st[0]) * (st0[1] - st3[1]) - (st0[1] - st[1]) * (st0[0] - st3[0]); /* B = ( (p0 - p) X (p1 - p2) + (p1 - p) X (p0 - p3) ) / 2 */ @@ -4731,7 +4731,7 @@ float resolve_quad_u_v2(const float st[2], (st3[0] * st0[1] - st3[1] * st0[0]); /* X is 2D cross product (determinant) - * A = (p0 - p) X (p0 - p3)*/ + * A = (p0 - p) X (p0 - p3) */ const double a = (st0[0] - st[0]) * (st0[1] - st3[1]) - (st0[1] - st[1]) * (st0[0] - st3[0]); /* B = ( (p0 - p) X (p1 - p2) + (p1 - p) X (p0 - p3) ) / 2 */ diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index d447da4de64..5eb0125062d 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -2665,7 +2665,7 @@ void loc_eul_size_to_mat4(float R[4][4], size_to_mat3(smat, size); mul_m3_m3m3(tmat, rmat, smat); - /* copy rot/scale part to output matrix*/ + /* Copy rot/scale part to output matrix. */ copy_m4_m3(R, tmat); /* copy location to matrix */ @@ -2686,18 +2686,18 @@ void loc_eulO_size_to_mat4(float R[4][4], { float rmat[3][3], smat[3][3], tmat[3][3]; - /* initialize new matrix */ + /* Initialize new matrix. */ unit_m4(R); - /* make rotation + scaling part */ + /* Make rotation + scaling part. */ eulO_to_mat3(rmat, eul, rotOrder); size_to_mat3(smat, size); mul_m3_m3m3(tmat, rmat, smat); - /* copy rot/scale part to output matrix*/ + /* Copy rot/scale part to output matrix. */ copy_m4_m3(R, tmat); - /* copy location to matrix */ + /* Copy location to matrix. */ R[3][0] = loc[0]; R[3][1] = loc[1]; R[3][2] = loc[2]; @@ -2722,7 +2722,7 @@ void loc_quat_size_to_mat4(float R[4][4], size_to_mat3(smat, size); mul_m3_m3m3(tmat, rmat, smat); - /* copy rot/scale part to output matrix*/ + /* Copy rot/scale part to output matrix. */ copy_m4_m3(R, tmat); /* copy location to matrix */ diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c index d40f665ba0d..beeae175869 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.c @@ -45,7 +45,7 @@ int BLI_windows_get_executable_dir(char *str) { char dir[FILE_MAXDIR]; int a; - /*change to utf support*/ + /* Change to utf support. */ GetModuleFileName(NULL, str, FILE_MAX); BLI_split_dir_part(str, dir, sizeof(dir)); /* shouldn't be relative */ a = strlen(dir); diff --git a/source/blender/blenlib/tests/BLI_kdopbvh_test.cc b/source/blender/blenlib/tests/BLI_kdopbvh_test.cc index f921c3ae2a4..04e4c3a1625 100644 --- a/source/blender/blenlib/tests/BLI_kdopbvh_test.cc +++ b/source/blender/blenlib/tests/BLI_kdopbvh_test.cc @@ -2,7 +2,7 @@ #include "testing/testing.h" -/* TODO: ray intersection, overlap ... etc.*/ +/* TODO: ray intersection, overlap ... etc. */ #include "MEM_guardedalloc.h" diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index dce5b5ebf87..f9982d96d76 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2474,7 +2474,7 @@ static void direct_link_id_common( BKE_asset_metadata_read(reader, id->asset_data); } - /*link direct data of ID properties*/ + /* Link direct data of ID properties. */ if (id->properties) { BLO_read_data_address(reader, &id->properties); /* this case means the data was written incorrectly, it should not happen */ @@ -2843,7 +2843,7 @@ static void lib_link_workspace_layout_restore(struct IDNameLib_Map *id_map, } /* TODO: restore path pointers: T40046 - * (complicated because this contains data pointers too, not just ID)*/ + * (complicated because this contains data pointers too, not just ID). */ MEM_SAFE_FREE(sbuts->path); } else if (sl->spacetype == SPACE_FILE) { diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index 990fc1d65d7..9399af5eb11 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -2052,7 +2052,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) } } - /* replace 'rim material' option for in offset*/ + /* Replace 'rim material' option for in offset. */ for (ob = bmain->objects.first; ob; ob = ob->id.next) { ModifierData *md; for (md = ob->modifiers.first; md; md = md->next) { diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index fe3d7f8e98f..c19ef1be7c4 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -2616,7 +2616,7 @@ void do_versions_after_linking_260(Main *bmain) float output_locx = -1000000.0f, output_locy = 0.0f; /* rough guess, not nice but we don't have access to UI constants here ... */ static const float offsetx = 42 + 3 * 20 + 20; - /*static const float offsety = 0.0f;*/ + // static const float offsety = 0.0f; if (create_io_nodes) { if (ntree->inputs.first) { diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index d5b2e0685e0..c6514edb417 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1652,7 +1652,7 @@ void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports)) * which exact version fully deprecated tessfaces, so think we can keep that one here, no * harm to be expected anyway for being over-conservative. */ for (Mesh *me = bmain->meshes.first; me != NULL; me = me->id.next) { - /*check if we need to convert mfaces to mpolys*/ + /* Check if we need to convert mfaces to mpolys. */ if (me->totface && !me->totpoly) { /* temporarily switch main so that reading from * external CustomData works */ @@ -3557,7 +3557,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - /* Fix anamorphic bokeh eevee rna limits.*/ + /* Fix anamorphic bokeh eevee rna limits. */ for (Camera *ca = bmain->cameras.first; ca; ca = ca->id.next) { if (ca->gpu_dof.ratio < 0.01f) { ca->gpu_dof.ratio = 0.01f; @@ -4924,7 +4924,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - /* Corrective smooth modifier scale*/ + /* Corrective smooth modifier scale. */ if (!DNA_struct_elem_find(fd->filesdna, "CorrectiveSmoothModifierData", "float", "scale")) { for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { @@ -4973,7 +4973,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - /* Surface deform modifier strength*/ + /* Surface deform modifier strength. */ if (!DNA_struct_elem_find(fd->filesdna, "SurfaceDeformModifierData", "float", "strength")) { for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) { LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index 4acd1334fb0..09d43676b8f 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -2026,7 +2026,7 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - /* Initialize the spread parameter for area lights*/ + /* Initialize the spread parameter for area lights. */ if (!DNA_struct_elem_find(fd->filesdna, "Lamp", "float", "area_spread")) { LISTBASE_FOREACH (Light *, la, &bmain->lights) { la->area_spread = DEG2RADF(180.0f); diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index 56b2f18f8a6..46e25251fd4 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -363,7 +363,7 @@ static void customdata_version_242(Mesh *me) BKE_mesh_update_customdata_pointers(me, true); } -/*only copy render texface layer from active*/ +/* Only copy render texface layer from active. */ static void customdata_version_243(Mesh *me) { CustomDataLayer *layer; @@ -1266,8 +1266,8 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) } cam = cam->id.next; } - /* force oops draw if depgraph was set*/ - /* set time line var */ + /* Force oops draw if depgraph was set. */ + /* Set time line var. */ /* softbody init new vars */ for (ob = bmain->objects.first; ob; ob = ob->id.next) { @@ -2021,7 +2021,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* fix all versions before 2.45 */ if (bmain->versionfile != 245) { - /* repair preview from 242 - 244*/ + /* Repair preview from 242 - 244. */ for (ima = bmain->images.first; ima; ima = ima->id.next) { ima->preview = NULL; } diff --git a/source/blender/blentranslation/BLT_translation.h b/source/blender/blentranslation/BLT_translation.h index b8979caa909..341e648443e 100644 --- a/source/blender/blentranslation/BLT_translation.h +++ b/source/blender/blentranslation/BLT_translation.h @@ -119,7 +119,7 @@ bool BLT_lang_is_ime_supported(void); #define BLT_I18NCONTEXT_ID_HAIR "Hair" #define BLT_I18NCONTEXT_ID_ID "ID" #define BLT_I18NCONTEXT_ID_IMAGE "Image" -/*#define BLT_I18NCONTEXT_ID_IPO "Ipo"*/ /* Deprecated */ +// #define BLT_I18NCONTEXT_ID_IPO "Ipo" /* DEPRECATED */ #define BLT_I18NCONTEXT_ID_SHAPEKEY "Key" #define BLT_I18NCONTEXT_ID_SIMULATION "Simulation" #define BLT_I18NCONTEXT_ID_LIGHT "Light" @@ -182,7 +182,7 @@ typedef struct { BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_ID, "id_id"), \ BLT_I18NCONTEXTS_ITEM( \ BLT_I18NCONTEXT_ID_IMAGE, \ - "id_image"), /*BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_IPO, "id_ipo"),*/ \ + "id_image"), /* BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_IPO, "id_ipo"), */ \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_SHAPEKEY, "id_shapekey"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LIGHT, "id_light"), \ BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_LIBRARY, "id_library"), \ diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h index f60fc72f8a9..61ec1bc679e 100644 --- a/source/blender/bmesh/bmesh_class.h +++ b/source/blender/bmesh/bmesh_class.h @@ -89,9 +89,9 @@ typedef struct BMHeader { BLI_STATIC_ASSERT((sizeof(BMHeader) <= 16), "BMHeader size has grown!"); -/* note: need some way to specify custom locations for custom data layers. so we can +/* NOTE: need some way to specify custom locations for custom data layers. so we can * make them point directly into structs. and some way to make it only happen to the - * active layer, and properly update when switching active layers.*/ + * active layer, and properly update when switching active layers. */ typedef struct BMVert { BMHeader head; @@ -267,7 +267,7 @@ typedef struct BMFace { BMHeader head; #ifdef USE_BMESH_HOLES - int totbounds; /*total boundaries, is one plus the number of holes in the face*/ + int totbounds; /* Total boundaries, is one plus the number of holes in the face. */ ListBase loops; #else BMLoop *l_first; @@ -545,7 +545,7 @@ typedef bool (*BMLoopPairFilterFunc)(const BMLoop *, const BMLoop *, void *user_ #define BM_ELEM_CD_GET_FLOAT_AS_UCHAR(ele, offset) \ (BLI_assert(offset != -1), (uchar)(BM_ELEM_CD_GET_FLOAT(ele, offset) * 255.0f)) -/*forward declarations*/ +/* Forward declarations. */ #ifdef USE_BMESH_HOLES # define BM_FACE_FIRST_LOOP(p) (((BMLoopList *)((p)->loops.first))->first) diff --git a/source/blender/bmesh/intern/bmesh_error.h b/source/blender/bmesh/intern/bmesh_error.h index 41d02e334fb..587e33e7dfd 100644 --- a/source/blender/bmesh/intern/bmesh_error.h +++ b/source/blender/bmesh/intern/bmesh_error.h @@ -24,12 +24,12 @@ /*----------- bmop error system ----------*/ -/* pushes an error onto the bmesh error stack. +/* Pushes an error onto the bmesh error stack. * if msg is null, then the default message for the `errcode` is used. */ void BMO_error_raise(BMesh *bm, BMOperator *owner, int errcode, const char *msg); -/* gets the topmost error from the stack. - * returns error code or 0 if no error.*/ +/* Gets the topmost error from the stack. + * returns error code or 0 if no error. */ int BMO_error_get(BMesh *bm, const char **msg, BMOperator **op); bool BMO_error_occurred(BMesh *bm); @@ -37,23 +37,22 @@ bool BMO_error_occurred(BMesh *bm); int BMO_error_pop(BMesh *bm, const char **msg, BMOperator **op); void BMO_error_clear(BMesh *bm); -/* this is meant for handling errors, like self-intersection test failures. +/* This is meant for handling errors, like self-intersection test failures. * it's dangerous to handle errors in general though, so disabled for now. */ -/* catches an error raised by the op pointed to by catchop. +/* Catches an error raised by the op pointed to by catchop. * errorcode is either the errorcode, or BMERR_ALL for any - * error.*/ + * error. */ -/* not yet implemented. - * int BMO_error_catch_op(BMesh *bm, BMOperator *catchop, int errorcode, char **msg); - */ +/* Not yet implemented. */ +// int BMO_error_catch_op(BMesh *bm, BMOperator *catchop, int errorcode, char **msg); #define BM_ELEM_INDEX_VALIDATE(_bm, _msg_a, _msg_b) \ BM_mesh_elem_index_validate(_bm, __FILE__ ":" STRINGIFY(__LINE__), __func__, _msg_a, _msg_b) /*------ error code defines -------*/ -/*error messages*/ +/** Error messages. */ enum { BMERR_CONNECTVERT_FAILED = 1, BMERR_DISSOLVEFACES_FAILED, @@ -71,8 +70,8 @@ enum { # define _BMESH_DUMMY_ABORT() (void)0 #endif -/* this is meant to be higher level than BLI_assert(), - * its enabled even when in Release mode*/ +/* This is meant to be higher level than BLI_assert(), + * its enabled even when in Release mode. */ #define BMESH_ASSERT(a) \ (void)((!(a)) ? ((fprintf(stderr, \ "BMESH_ASSERT failed: %s, %s(), %d at \'%s\'\n", \ diff --git a/source/blender/bmesh/intern/bmesh_iterators.h b/source/blender/bmesh/intern/bmesh_iterators.h index f2e7a48a16c..470aceeb756 100644 --- a/source/blender/bmesh/intern/bmesh_iterators.h +++ b/source/blender/bmesh/intern/bmesh_iterators.h @@ -61,11 +61,11 @@ typedef enum BMIterType { BM_LOOPS_OF_FACE = 11, /* returns elements from all boundaries, and returns * the first element at the end to flag that we're entering - * a different face hole boundary*/ + * a different face hole boundary. */ // BM_ALL_LOOPS_OF_FACE = 12, /* iterate through loops around this loop, which are fetched * from the other faces in the radial cycle surrounding the - * input loop's edge.*/ + * input loop's edge. */ BM_LOOPS_OF_LOOP = 12, BM_LOOPS_OF_EDGE = 13, } BMIterType; diff --git a/source/blender/bmesh/intern/bmesh_marking.h b/source/blender/bmesh/intern/bmesh_marking.h index ff6c359138a..99feae1d66c 100644 --- a/source/blender/bmesh/intern/bmesh_marking.h +++ b/source/blender/bmesh/intern/bmesh_marking.h @@ -68,8 +68,8 @@ void BM_mesh_elem_hflag_disable_all(BMesh *bm, const char hflag, const bool respecthide); -/* individual element select functions, BM_elem_select_set is a shortcut for these - * that automatically detects which one to use*/ +/* Individual element select functions, BM_elem_select_set is a shortcut for these + * that automatically detects which one to use. */ void BM_vert_select_set(BMesh *bm, BMVert *v, const bool select); void BM_edge_select_set(BMesh *bm, BMEdge *e, const bool select); void BM_face_select_set(BMesh *bm, BMFace *f, const bool select); diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index 80028564ff2..b2958a9e744 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -854,7 +854,7 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const for (i = totvert, ve = verts_copy + totvert - 1, vep = verts_pool + totvert - 1; i--; ve--, vep--) { *ve = **vep; - /* printf("*vep: %p, verts_pool[%d]: %p\n", *vep, i, verts_pool[i]);*/ + // printf("*vep: %p, verts_pool[%d]: %p\n", *vep, i, verts_pool[i]); if (cd_vert_pyptr != -1) { void **pyptr = BM_ELEM_CD_GET_VOID_P(((BMElem *)ve), cd_vert_pyptr); pyptrs[i] = *pyptr; @@ -990,7 +990,7 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const /* Verts' pointers, only edge pointers... */ if (eptr_map) { BM_ITER_MESH (ve, &iter, bm, BM_VERTS_OF_MESH) { - /* printf("Vert e: %p -> %p\n", ve->e, BLI_ghash_lookup(eptr_map, ve->e));*/ + // printf("Vert e: %p -> %p\n", ve->e, BLI_ghash_lookup(eptr_map, ve->e)); if (ve->e) { ve->e = BLI_ghash_lookup(eptr_map, ve->e); BLI_assert(ve->e); @@ -1004,22 +1004,30 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const if (vptr_map || eptr_map) { BM_ITER_MESH (ed, &iter, bm, BM_EDGES_OF_MESH) { if (vptr_map) { - /* printf("Edge v1: %p -> %p\n", ed->v1, BLI_ghash_lookup(vptr_map, ed->v1));*/ - /* printf("Edge v2: %p -> %p\n", ed->v2, BLI_ghash_lookup(vptr_map, ed->v2));*/ +#if 0 + printf("Edge v1: %p -> %p\n", ed->v1, BLI_ghash_lookup(vptr_map, ed->v1)); + printf("Edge v2: %p -> %p\n", ed->v2, BLI_ghash_lookup(vptr_map, ed->v2)); +#endif ed->v1 = BLI_ghash_lookup(vptr_map, ed->v1); ed->v2 = BLI_ghash_lookup(vptr_map, ed->v2); BLI_assert(ed->v1); BLI_assert(ed->v2); } if (eptr_map) { - /* printf("Edge v1_disk_link prev: %p -> %p\n", ed->v1_disk_link.prev,*/ - /* BLI_ghash_lookup(eptr_map, ed->v1_disk_link.prev));*/ - /* printf("Edge v1_disk_link next: %p -> %p\n", ed->v1_disk_link.next,*/ - /* BLI_ghash_lookup(eptr_map, ed->v1_disk_link.next));*/ - /* printf("Edge v2_disk_link prev: %p -> %p\n", ed->v2_disk_link.prev,*/ - /* BLI_ghash_lookup(eptr_map, ed->v2_disk_link.prev));*/ - /* printf("Edge v2_disk_link next: %p -> %p\n", ed->v2_disk_link.next,*/ - /* BLI_ghash_lookup(eptr_map, ed->v2_disk_link.next));*/ +#if 0 + printf("Edge v1_disk_link prev: %p -> %p\n", + ed->v1_disk_link.prev, + BLI_ghash_lookup(eptr_map, ed->v1_disk_link.prev)); + printf("Edge v1_disk_link next: %p -> %p\n", + ed->v1_disk_link.next, + BLI_ghash_lookup(eptr_map, ed->v1_disk_link.next)); + printf("Edge v2_disk_link prev: %p -> %p\n", + ed->v2_disk_link.prev, + BLI_ghash_lookup(eptr_map, ed->v2_disk_link.prev)); + printf("Edge v2_disk_link next: %p -> %p\n", + ed->v2_disk_link.next, + BLI_ghash_lookup(eptr_map, ed->v2_disk_link.next)); +#endif ed->v1_disk_link.prev = BLI_ghash_lookup(eptr_map, ed->v1_disk_link.prev); ed->v1_disk_link.next = BLI_ghash_lookup(eptr_map, ed->v1_disk_link.next); ed->v2_disk_link.prev = BLI_ghash_lookup(eptr_map, ed->v2_disk_link.prev); @@ -1036,17 +1044,17 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const BM_ITER_MESH (fa, &iter, bm, BM_FACES_OF_MESH) { BM_ITER_ELEM (lo, &iterl, fa, BM_LOOPS_OF_FACE) { if (vptr_map) { - /* printf("Loop v: %p -> %p\n", lo->v, BLI_ghash_lookup(vptr_map, lo->v));*/ + // printf("Loop v: %p -> %p\n", lo->v, BLI_ghash_lookup(vptr_map, lo->v)); lo->v = BLI_ghash_lookup(vptr_map, lo->v); BLI_assert(lo->v); } if (eptr_map) { - /* printf("Loop e: %p -> %p\n", lo->e, BLI_ghash_lookup(eptr_map, lo->e));*/ + // printf("Loop e: %p -> %p\n", lo->e, BLI_ghash_lookup(eptr_map, lo->e)); lo->e = BLI_ghash_lookup(eptr_map, lo->e); BLI_assert(lo->e); } if (fptr_map) { - /* printf("Loop f: %p -> %p\n", lo->f, BLI_ghash_lookup(fptr_map, lo->f));*/ + // printf("Loop f: %p -> %p\n", lo->f, BLI_ghash_lookup(fptr_map, lo->f)); lo->f = BLI_ghash_lookup(fptr_map, lo->f); BLI_assert(lo->f); } diff --git a/source/blender/bmesh/intern/bmesh_mesh_normals.c b/source/blender/bmesh/intern/bmesh_mesh_normals.c index 3e3fa2a2d9d..db09bbff97c 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_normals.c +++ b/source/blender/bmesh/intern/bmesh_mesh_normals.c @@ -1546,7 +1546,7 @@ static int bm_loop_normal_mark_indiv(BMesh *bm, BLI_bitmap *loops, const bool do /* Using face history allows to select a single loop from a single face... * Note that this is O(n^2) piece of code, * but it is not designed to be used with huge selection sets, - * rather with only a few items selected at most.*/ + * rather with only a few items selected at most. */ /* Goes from last selected to the first selected element. */ for (ese = bm->selected.last; ese; ese = ese->prev) { if (ese->htype == BM_FACE) { diff --git a/source/blender/bmesh/intern/bmesh_mods.c b/source/blender/bmesh/intern/bmesh_mods.c index c2c5dc24fa9..b61ef47351a 100644 --- a/source/blender/bmesh/intern/bmesh_mods.c +++ b/source/blender/bmesh/intern/bmesh_mods.c @@ -962,7 +962,7 @@ bool BM_edge_rotate_check_beauty(BMEdge *e, BMLoop *l1, BMLoop *l2) { /* Stupid check for now: * Could compare angles of surrounding edges - * before & after, but this is OK.*/ + * before & after, but this is OK. */ return (len_squared_v3v3(e->v1->co, e->v2->co) > len_squared_v3v3(l1->v->co, l2->v->co)); } diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h index 706979abeba..d09c0ee428d 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api.h +++ b/source/blender/bmesh/intern/bmesh_operator_api.h @@ -256,7 +256,7 @@ typedef struct BMO_FlagSet { } BMO_FlagSet; /* please ignore all these structures, don't touch them in tool code, except - * for when your defining an operator with BMOpDefine.*/ + * for when your defining an operator with BMOpDefine. */ typedef struct BMOpSlot { const char *slot_name; /* pointer to BMOpDefine.slot_args */ @@ -345,16 +345,16 @@ typedef struct BMOpDefine { /* data types that use pointers (arrays, etc) should never * have it set directly. and never use BMO_slot_ptr_set to - * pass in a list of edges or any arrays, really.*/ + * pass in a list of edges or any arrays, really. */ void BMO_op_init(BMesh *bm, BMOperator *op, const int flag, const char *opname); /* executes an operator, pushing and popping a new tool flag - * layer as appropriate.*/ + * layer as appropriate. */ void BMO_op_exec(BMesh *bm, BMOperator *op); /* finishes an operator (though note the operator's tool flag is removed - * after it finishes executing in BMO_op_exec).*/ + * after it finishes executing in BMO_op_exec). */ void BMO_op_finish(BMesh *bm, BMOperator *op); /* count the number of elements with the specified flag enabled. @@ -369,7 +369,7 @@ int BMO_mesh_disabled_flag_count(BMesh *bm, const char htype, const short oflag) void BMO_push(BMesh *bm, BMOperator *op); void BMO_pop(BMesh *bm); -/*executes an operator*/ +/* Executes an operator. */ bool BMO_op_callf(BMesh *bm, const int flag, const char *fmt, ...); /* initializes, but doesn't execute an operator. this is so you can @@ -538,7 +538,7 @@ void BMO_slot_buffer_hflag_disable(BMesh *bm, /* puts every element of type 'type' (which is a bitmask) with header * flag 'flag', into a slot. note: ignores hidden elements - * (e.g. elements with header flag BM_ELEM_HIDDEN set).*/ + * (e.g. elements with header flag BM_ELEM_HIDDEN set). */ void BMO_slot_buffer_from_enabled_hflag(BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], @@ -548,7 +548,7 @@ void BMO_slot_buffer_from_enabled_hflag(BMesh *bm, /* puts every element of type 'type' (which is a bitmask) without * header flag 'flag', into a slot. note: ignores hidden elements - * (e.g. elements with header flag BM_ELEM_HIDDEN set).*/ + * (e.g. elements with header flag BM_ELEM_HIDDEN set). */ void BMO_slot_buffer_from_disabled_hflag(BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], @@ -571,7 +571,7 @@ int BMO_slot_map_count(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_na void BMO_slot_map_insert(BMOperator *op, BMOpSlot *slot, const void *element, const void *data); /* flags all elements in a mapping. note that the mapping must only have - * bmesh elements in it.*/ + * bmesh elements in it. */ void BMO_slot_map_to_flag(BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h index 2d9e244e54d..a701fe3eb85 100644 --- a/source/blender/bmesh/intern/bmesh_operators.h +++ b/source/blender/bmesh/intern/bmesh_operators.h @@ -20,7 +20,7 @@ * \ingroup bmesh */ -/*see comments in intern/bmesh_opdefines.c for documentation of specific operators*/ +/* See comments in `intern/bmesh_opdefines.c` for documentation of specific operators. */ /*--------defines/enumerations for specific operators-------*/ diff --git a/source/blender/bmesh/intern/bmesh_query.c b/source/blender/bmesh/intern/bmesh_query.c index da407abfb21..1449df9925f 100644 --- a/source/blender/bmesh/intern/bmesh_query.c +++ b/source/blender/bmesh/intern/bmesh_query.c @@ -2365,7 +2365,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len) for (int i = 0; i < len; i++) { BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) { if ((f->len <= len) && (BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0)) { - /* check if all vers in this face are flagged*/ + /* Check if all vers in this face are flagged. */ BMLoop *l_iter, *l_first; if (is_init == false) { diff --git a/source/blender/bmesh/intern/bmesh_walkers.h b/source/blender/bmesh/intern/bmesh_walkers.h index ce0f8ae8324..d0348aa11dc 100644 --- a/source/blender/bmesh/intern/bmesh_walkers.h +++ b/source/blender/bmesh/intern/bmesh_walkers.h @@ -80,7 +80,7 @@ void *BMW_step(struct BMWalker *walker); void BMW_end(struct BMWalker *walker); int BMW_current_depth(BMWalker *walker); -/*these are used by custom walkers*/ +/* These are used by custom walkers. */ void *BMW_current_state(BMWalker *walker); void *BMW_state_add(BMWalker *walker); void BMW_state_remove(BMWalker *walker); diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c index 9e8e330e87c..39f8f41432a 100644 --- a/source/blender/bmesh/operators/bmo_inset.c +++ b/source/blender/bmesh/operators/bmo_inset.c @@ -361,7 +361,7 @@ static void bmo_face_inset_individual(BMesh *bm, madd_v3_v3fl(v_new_co, tvec, thickness); - /* Set normal, add depth and write new vertex position*/ + /* Set normal, add depth and write new vertex position. */ copy_v3_v3(l_iter->v->no, f->no); if (depth != 0.0f) { diff --git a/source/blender/bmesh/operators/bmo_smooth_laplacian.c b/source/blender/bmesh/operators/bmo_smooth_laplacian.c index a9879ce025a..b2b93bfd003 100644 --- a/source/blender/bmesh/operators/bmo_smooth_laplacian.c +++ b/source/blender/bmesh/operators/bmo_smooth_laplacian.c @@ -36,17 +36,17 @@ #define SMOOTH_LAPLACIAN_MIN_EDGE_PERCENTAGE 0.15f struct BLaplacianSystem { - float *eweights; /* Length weights per Edge */ - float (*fweights)[3]; /* Cotangent weights per face */ - float *ring_areas; /* Total area per ring*/ - float *vlengths; /* Total sum of lengths(edges) per vertice*/ - float *vweights; /* Total sum of weights per vertice*/ - int numEdges; /* Number of edges*/ - int numFaces; /* Number of faces*/ - int numVerts; /* Number of verts*/ - short *zerola; /* Is zero area or length*/ - - /* Pointers to data*/ + float *eweights; /* Length weights per Edge. */ + float (*fweights)[3]; /* Cotangent weights per face. */ + float *ring_areas; /* Total area per ring. */ + float *vlengths; /* Total sum of lengths(edges) per vertex. */ + float *vweights; /* Total sum of weights per vertex. */ + int numEdges; /* Number of edges. */ + int numFaces; /* Number of faces. */ + int numVerts; /* Number of verts. */ + short *zerola; /* Is zero area or length. */ + + /* Pointers to data. */ BMesh *bm; BMOperator *op; LinearSolver *context; @@ -343,7 +343,7 @@ static void fill_laplacian_matrix(LaplacianSystem *sys) idv1 = BM_elem_index_get(vf[0]); idv2 = BM_elem_index_get(vf[1]); idv3 = BM_elem_index_get(vf[2]); - /* Is ring if number of faces == number of edges around vertice*/ + /* Is ring if number of faces == number of edges around vertice. */ i = BM_elem_index_get(f); if (!vert_is_boundary(vf[0]) && sys->zerola[idv1] == 0) { EIG_linear_solver_matrix_add( diff --git a/source/blender/bmesh/tools/bmesh_beautify.c b/source/blender/bmesh/tools/bmesh_beautify.c index 2d9b35697ff..4ef165fe6c1 100644 --- a/source/blender/bmesh/tools/bmesh_beautify.c +++ b/source/blender/bmesh/tools/bmesh_beautify.c @@ -277,10 +277,10 @@ float BM_verts_calc_rotate_beauty(const BMVert *v1, static float bm_edge_calc_rotate_beauty(const BMEdge *e, const short flag, const short method) { const BMVert *v1, *v2, *v3, *v4; - v1 = e->l->prev->v; /* first vert co */ - v2 = e->l->v; /* e->v1 or e->v2*/ - v3 = e->l->radial_next->prev->v; /* second vert co */ - v4 = e->l->next->v; /* e->v1 or e->v2*/ + v1 = e->l->prev->v; /* First vert co */ + v2 = e->l->v; /* `e->v1` or `e->v2`. */ + v3 = e->l->radial_next->prev->v; /* Second vert co */ + v4 = e->l->next->v; /* `e->v1` or `e->v2`. */ return BM_verts_calc_rotate_beauty(v1, v2, v3, v4, flag, method); } diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c index 82878c7618a..a1630d9d2ff 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c +++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c @@ -568,9 +568,9 @@ static bool bm_decim_triangulate_begin(BMesh *bm, int *r_edges_tri_tot) pf_heap = NULL; } - /* adding new faces as we loop over faces + /* Adding new faces as we loop over faces * is normally best avoided, however in this case its not so bad because any face touched twice - * will already be triangulated*/ + * will already be triangulated. */ BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) { if (f->len > 3) { has_cut |= bm_face_triangulate(bm, diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c index cc980a81aad..d51661a08bb 100644 --- a/source/blender/bmesh/tools/bmesh_intersect.c +++ b/source/blender/bmesh/tools/bmesh_intersect.c @@ -379,7 +379,7 @@ static BMVert *bm_isect_edge_tri(struct ISectState *s, } \ (void)0 - /* order tri, then order (1-2, 2-3)*/ + /* Order tri, then order (1-2, 2-3). */ #define KEY_EDGE_TRI_ORDER(k) \ { \ if (k[2] > k[3]) { \ diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.h b/source/blender/compositor/intern/COM_MemoryBuffer.h index 575bb2fe383..fdfd1c1c37b 100644 --- a/source/blender/compositor/intern/COM_MemoryBuffer.h +++ b/source/blender/compositor/intern/COM_MemoryBuffer.h @@ -34,7 +34,7 @@ enum class MemoryBufferState { /** \brief memory has been allocated on creator device and CPU machine, * but kernel has not been executed */ Default = 0, - /** \brief chunk is consolidated from other chunks. special state.*/ + /** \brief chunk is consolidated from other chunks. special state. */ Temporary = 6, }; diff --git a/source/blender/compositor/intern/COM_MetaData.cc b/source/blender/compositor/intern/COM_MetaData.cc index 88bfa385514..a6fb84dfb87 100644 --- a/source/blender/compositor/intern/COM_MetaData.cc +++ b/source/blender/compositor/intern/COM_MetaData.cc @@ -41,7 +41,7 @@ void MetaData::addCryptomatteEntry(const blender::StringRef layer_name, /* Replace the hash neutral cryptomatte keys with hashed versions. * * When a conversion happens it will also add the cryptomatte name key with the given - * `layer_name`.*/ + * `layer_name`. */ void MetaData::replaceHashNeutralCryptomatteKeys(const blender::StringRef layer_name) { std::string cryptomatte_hash = entries_.pop_default(META_DATA_KEY_CRYPTOMATTE_HASH, ""); diff --git a/source/blender/compositor/nodes/COM_OutputFileNode.cc b/source/blender/compositor/nodes/COM_OutputFileNode.cc index e5b9cfb8cc2..8b5140636c1 100644 --- a/source/blender/compositor/nodes/COM_OutputFileNode.cc +++ b/source/blender/compositor/nodes/COM_OutputFileNode.cc @@ -96,7 +96,7 @@ void OutputFileNode::convertToOperations(NodeConverter &converter, converter.addOperation(outputOperation); /* First add all inputs. Inputs are stored in a Vector and can be moved to a different - * memory address during this time.*/ + * memory address during this time. */ add_input_sockets(*outputOperation); /* After adding the sockets the memory addresses will stick. */ map_input_sockets(converter, *outputOperation); diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.cc b/source/blender/compositor/operations/COM_ChannelMatteOperation.cc index 89290978608..ec4331dc231 100644 --- a/source/blender/compositor/operations/COM_ChannelMatteOperation.cc +++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.cc @@ -104,12 +104,12 @@ void ChannelMatteOperation::executePixelSampled(float output[4], /* test range */ if (alpha > limit_max) { - alpha = inColor[3]; /*whatever it was prior */ + alpha = inColor[3]; /* Whatever it was prior. */ } else if (alpha < limit_min) { alpha = 0.0f; } - else { /*blend */ + else { /* Blend. */ alpha = (alpha - limit_min) / limit_range; } diff --git a/source/blender/compositor/operations/COM_ChromaMatteOperation.cc b/source/blender/compositor/operations/COM_ChromaMatteOperation.cc index 69aa4aac163..b7fec5f07e5 100644 --- a/source/blender/compositor/operations/COM_ChromaMatteOperation.cc +++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.cc @@ -79,12 +79,12 @@ void ChromaMatteOperation::executePixelSampled(float output[4], theta = atan2(inKey[2], inKey[1]); - /*rotate the cb and cr into x/z space */ + /* Rotate the cb and cr into x/z space. */ x_angle = inImage[1] * cosf(theta) + inImage[2] * sinf(theta); z_angle = inImage[2] * cosf(theta) - inImage[1] * sinf(theta); - /*if within the acceptance angle */ - /* if kfg is <0 then the pixel is outside of the key color */ + /* If within the acceptance angle. */ + /* If kfg is <0 then the pixel is outside of the key color. */ kfg = x_angle - (fabsf(z_angle) / tanf(acceptance / 2.0f)); if (kfg > 0.0f) { /* found a pixel that is within key color */ @@ -105,8 +105,8 @@ void ChromaMatteOperation::executePixelSampled(float output[4], output[0] = inImage[3]; } } - else { /*pixel is outside key color */ - output[0] = inImage[3]; /* make pixel just as transparent as it was before */ + else { /* Pixel is outside key color. */ + output[0] = inImage[3]; /* Make pixel just as transparent as it was before. */ } } diff --git a/source/blender/compositor/operations/COM_ColorMatteOperation.cc b/source/blender/compositor/operations/COM_ColorMatteOperation.cc index 4f0a5e28e6b..ddfbf415d9c 100644 --- a/source/blender/compositor/operations/COM_ColorMatteOperation.cc +++ b/source/blender/compositor/operations/COM_ColorMatteOperation.cc @@ -77,8 +77,8 @@ void ColorMatteOperation::executePixelSampled(float output[4], output[0] = 0.0f; /* make transparent */ } - else { /*pixel is outside key color */ - output[0] = inColor[3]; /* make pixel just as transparent as it was before */ + else { /* Pixel is outside key color. */ + output[0] = inColor[3]; /* Make pixel just as transparent as it was before. */ } } diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cc b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cc index e380131634f..0acdfc1651f 100644 --- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cc +++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cc @@ -68,11 +68,11 @@ void DifferenceMatteOperation::executePixelSampled(float output[4], if (difference <= tolerance) { output[0] = 0.0f; } - /*in the falloff region, make partially transparent */ + /* In the falloff region, make partially transparent. */ else if (difference <= falloff + tolerance) { difference = difference - tolerance; alpha = difference / falloff; - /*only change if more transparent than before */ + /* Only change if more transparent than before. */ if (alpha < inColor1[3]) { output[0] = alpha; } diff --git a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cc b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cc index 12cb7e7d075..1b3403cbb29 100644 --- a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cc +++ b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cc @@ -71,15 +71,15 @@ void DistanceRGBMatteOperation::executePixelSampled(float output[4], * COM_SetAlphaMultiplyOperation and the Value output. */ - /*make 100% transparent */ + /* Make 100% transparent. */ if (distance < tolerance) { output[0] = 0.0f; } - /*in the falloff region, make partially transparent */ + /* In the falloff region, make partially transparent. */ else if (distance < falloff + tolerance) { distance = distance - tolerance; alpha = distance / falloff; - /*only change if more transparent than before */ + /* Only change if more transparent than before. */ if (alpha < inImage[3]) { output[0] = alpha; } diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cc b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cc index 0afc4278a45..5ca16e40ce3 100644 --- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cc +++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cc @@ -66,7 +66,7 @@ void LuminanceMatteOperation::executePixelSampled(float output[4], else if (luminance < low) { alpha = 0.0f; } - else { /*blend */ + else { /* Blend. */ alpha = (luminance - low) / (high - low); } diff --git a/source/blender/depsgraph/DEG_depsgraph_build.h b/source/blender/depsgraph/DEG_depsgraph_build.h index 9da2cd5e42a..42c9cccceed 100644 --- a/source/blender/depsgraph/DEG_depsgraph_build.h +++ b/source/blender/depsgraph/DEG_depsgraph_build.h @@ -75,7 +75,7 @@ void DEG_graph_tag_relations_update(struct Depsgraph *graph); /* Create or update relations in the specified graph. */ void DEG_graph_relations_update(struct Depsgraph *graph); -/* Tag all relations in the database for update.*/ +/* Tag all relations in the database for update. */ void DEG_relations_tag_update(struct Main *bmain); /* Add Dependencies ----------------------------- */ diff --git a/source/blender/draw/engines/eevee/eevee_depth_of_field.c b/source/blender/draw/engines/eevee/eevee_depth_of_field.c index 77e7291b78d..4748323d6a7 100644 --- a/source/blender/draw/engines/eevee/eevee_depth_of_field.c +++ b/source/blender/draw/engines/eevee/eevee_depth_of_field.c @@ -626,7 +626,7 @@ static void dof_reduce_pass_init(EEVEE_FramebufferList *fbl, if (txl->dof_reduced_color) { /* TODO(fclem) In the future, we need to check if mip_count did not change. - * For now it's ok as we always define all mip level.*/ + * For now it's ok as we always define all mip level. */ if (res[0] != GPU_texture_width(txl->dof_reduced_color) || res[1] != GPU_texture_width(txl->dof_reduced_color)) { DRW_TEXTURE_FREE_SAFE(txl->dof_reduced_color); diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c index 485ed9273a8..cdd66759308 100644 --- a/source/blender/draw/engines/eevee/eevee_lightcache.c +++ b/source/blender/draw/engines/eevee/eevee_lightcache.c @@ -1480,7 +1480,7 @@ void EEVEE_lightbake_job(void *custom_data, short *stop, short *do_update, float eevee_lightbake_delete_resources(lbake); - /* Free GPU smoke textures and the smoke domain list correctly: See also T73921.*/ + /* Free GPU smoke textures and the smoke domain list correctly: See also T73921. */ EEVEE_volumes_free_smoke_textures(); } diff --git a/source/blender/draw/engines/eevee/eevee_subsurface.c b/source/blender/draw/engines/eevee/eevee_subsurface.c index 7fd39007263..129822ed8a9 100644 --- a/source/blender/draw/engines/eevee/eevee_subsurface.c +++ b/source/blender/draw/engines/eevee/eevee_subsurface.c @@ -315,7 +315,7 @@ void EEVEE_subsurface_compute(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) if (!DRW_pass_is_empty(psl->sss_translucency_ps)) { /* We sample the shadow-maps using normal sampler. We need to disable Comparison mode. - * TODO(fclem): avoid this by using sampler objects.*/ + * TODO(fclem): avoid this by using sampler objects. */ GPU_texture_compare_mode(sldata->shadow_cube_pool, false); GPU_texture_compare_mode(sldata->shadow_cascade_pool, false); diff --git a/source/blender/draw/engines/eevee/eevee_volumes.c b/source/blender/draw/engines/eevee/eevee_volumes.c index eed36221fcb..56c5b367f7e 100644 --- a/source/blender/draw/engines/eevee/eevee_volumes.c +++ b/source/blender/draw/engines/eevee/eevee_volumes.c @@ -709,7 +709,7 @@ void EEVEE_volumes_compute(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) DRW_stats_group_start("Volumetrics"); /* We sample the shadow-maps using shadow sampler. We need to enable Comparison mode. - * TODO(fclem): avoid this by using sampler objects.*/ + * TODO(fclem): avoid this by using sampler objects. */ GPU_texture_compare_mode(sldata->shadow_cube_pool, true); GPU_texture_compare_mode(sldata->shadow_cascade_pool, true); diff --git a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl index 05496ad4ab0..4ee21cf8c2e 100644 --- a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl @@ -201,6 +201,6 @@ float cone_cosine(float r) // return cos(2.0 * sqrt(2.0 / (gloss + 2))); /* Uludag 2014 in GPUPro5 */ // return pow(0.244, 1 / (gloss + 1)); - /* Jimenez 2016 in Practical Realtime Strategies for Accurate Indirect Occlusion*/ + /* Jimenez 2016 in Practical Realtime Strategies for Accurate Indirect Occlusion. */ return exp2(-3.32193 * r * r); } diff --git a/source/blender/draw/engines/eevee/shaders/closure_type_lib.glsl b/source/blender/draw/engines/eevee/shaders/closure_type_lib.glsl index 38ae3972aa7..f66f45635f4 100644 --- a/source/blender/draw/engines/eevee/shaders/closure_type_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/closure_type_lib.glsl @@ -99,7 +99,7 @@ Closure closure_mix(Closure cl1, Closure cl2, float fac) cl.flag = cl1.flag | cl2.flag; cl.ssr_data = mix(cl1.ssr_data, cl2.ssr_data, fac); bool use_cl1_ssr = FLAG_TEST(cl1.flag, CLOSURE_SSR_FLAG); - /* When mixing SSR don't blend roughness and normals but only specular (ssr_data.xyz).*/ + /* When mixing SSR don't blend roughness and normals but only specular (ssr_data.xyz). */ cl.ssr_data.w = (use_cl1_ssr) ? cl1.ssr_data.w : cl2.ssr_data.w; cl.ssr_normal = (use_cl1_ssr) ? cl1.ssr_normal : cl2.ssr_normal; @@ -122,7 +122,7 @@ Closure closure_add(Closure cl1, Closure cl2) cl.flag = cl1.flag | cl2.flag; cl.ssr_data = cl1.ssr_data + cl2.ssr_data; bool use_cl1_ssr = FLAG_TEST(cl1.flag, CLOSURE_SSR_FLAG); - /* When mixing SSR don't blend roughness and normals.*/ + /* When mixing SSR don't blend roughness and normals. */ cl.ssr_data.w = (use_cl1_ssr) ? cl1.ssr_data.w : cl2.ssr_data.w; cl.ssr_normal = (use_cl1_ssr) ? cl1.ssr_normal : cl2.ssr_normal; diff --git a/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl b/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl index d7996ab4bd1..c935eca6a39 100644 --- a/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/common_uniforms_lib.glsl @@ -37,7 +37,7 @@ layout(std140) uniform common_block int prbIrradianceVisSize; float prbIrradianceSmooth; float prbLodCubeMax; - /* Misc*/ + /* Misc */ int rayType; float rayDepth; float alphaHashOffset; diff --git a/source/blender/draw/engines/eevee/shaders/effect_dof_scatter_vert.glsl b/source/blender/draw/engines/eevee/shaders/effect_dof_scatter_vert.glsl index 276ab119fab..f349806d37e 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_dof_scatter_vert.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_dof_scatter_vert.glsl @@ -25,7 +25,8 @@ flat out float spritesize; /* Load 4 Circle of confusion values. texel_co is centered around the 4 taps. */ vec4 fetch_cocs(vec2 texel_co) { - /* TODO(fclem) The textureGather(sampler, co, comp) variant isn't here on some implementations.*/ + /* TODO(fclem) The textureGather(sampler, co, comp) variant isn't here on some implementations. + */ #if 0 // GPU_ARB_texture_gather vec2 uvs = texel_co / vec2(textureSize(cocBuffer, 0)); /* Reminder: Samples order is CW starting from top left. */ diff --git a/source/blender/draw/engines/eevee/shaders/effect_translucency_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_translucency_frag.glsl index 356ed102928..97b31a972e3 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_translucency_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_translucency_frag.glsl @@ -49,7 +49,7 @@ float light_translucent_power_with_falloff(LightData ld, vec3 N, vec4 l_vector) } else if (ld.l_type == SUN) { power = 1.0 / (1.0 + (ld.l_radius * ld.l_radius * 0.5)); - power *= ld.l_radius * ld.l_radius * M_PI; /* Removing area light power*/ + power *= ld.l_radius * ld.l_radius * M_PI; /* Removing area light power. */ power *= M_2PI * 0.78; /* Matching cycles with point light. */ power *= 0.082; /* XXX ad hoc, empirical */ falloff = dot(N, -ld.l_forward); diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl index 0f670532349..b1368f90846 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl @@ -101,23 +101,23 @@ void blend_mode_output( { switch (blend_mode) { case MODE_REGULAR: - /* Reminder: Blending func is premult alpha blend (dst.rgba * (1 - src.a) + src.rgb).*/ + /* Reminder: Blending func is premult alpha blend (dst.rgba * (1 - src.a) + src.rgb). */ color *= opacity; frag_color = color; frag_revealage = vec4(0.0, 0.0, 0.0, color.a); break; case MODE_MULTIPLY: - /* Reminder: Blending func is multiply blend (dst.rgba * src.rgba).*/ + /* Reminder: Blending func is multiply blend (dst.rgba * src.rgba). */ color.a *= opacity; frag_revealage = frag_color = (1.0 - color.a) + color.a * color; break; case MODE_DIVIDE: - /* Reminder: Blending func is multiply blend (dst.rgba * src.rgba).*/ + /* Reminder: Blending func is multiply blend (dst.rgba * src.rgba). */ color.a *= opacity; frag_revealage = frag_color = clamp(1.0 / max(vec4(1e-6), 1.0 - color * color.a), 0.0, 1e18); break; case MODE_HARDLIGHT: - /* Reminder: Blending func is multiply blend (dst.rgba * src.rgba).*/ + /* Reminder: Blending func is multiply blend (dst.rgba * src.rgba). */ /** * We need to separate the overlay equation into 2 term (one mul and one add). * This is the standard overlay equation (per channel): @@ -135,14 +135,14 @@ void blend_mode_output( frag_revealage = max(vec4(0.0), frag_revealage); break; case MODE_HARDLIGHT_SECOND_PASS: - /* Reminder: Blending func is additive blend (dst.rgba + src.rgba).*/ + /* Reminder: Blending func is additive blend (dst.rgba + src.rgba). */ color = mix(vec4(0.5), color, color.a * opacity); frag_revealage = frag_color = (-1.0 + 2.0 * color) * step(-0.5, -color); frag_revealage = max(vec4(0.0), frag_revealage); break; case MODE_SUB: case MODE_ADD: - /* Reminder: Blending func is additive / subtractive blend (dst.rgba +/- src.rgba).*/ + /* Reminder: Blending func is additive / subtractive blend (dst.rgba +/- src.rgba). */ frag_color = color * color.a * opacity; frag_revealage = vec4(0.0); break; @@ -347,7 +347,7 @@ float stroke_thickness_modulate(float thickness) float clamp_small_stroke_thickness(float thickness) { /* To avoid aliasing artifacts, we clamp the line thickness and - * reduce its opacity in the fragment shader.*/ + * reduce its opacity in the fragment shader. */ float min_thickness = gl_Position.w * 1.3; thickness = max(min_thickness, thickness); diff --git a/source/blender/draw/engines/overlay/overlay_particle.c b/source/blender/draw/engines/overlay/overlay_particle.c index 5fa74a8c3a6..e51f7032288 100644 --- a/source/blender/draw/engines/overlay/overlay_particle.c +++ b/source/blender/draw/engines/overlay/overlay_particle.c @@ -174,7 +174,7 @@ void OVERLAY_particle_cache_populate(OVERLAY_Data *vedata, Object *ob) int draw_as = (part->draw_as == PART_DRAW_REND) ? part->ren_as : part->draw_as; if (part->type == PART_HAIR) { - /* Hairs should have been rendered by the render engine.*/ + /* Hairs should have been rendered by the render engine. */ continue; } diff --git a/source/blender/draw/engines/overlay/shaders/armature_shape_outline_geom.glsl b/source/blender/draw/engines/overlay/shaders/armature_shape_outline_geom.glsl index 6398426952c..a2a478f400b 100644 --- a/source/blender/draw/engines/overlay/shaders/armature_shape_outline_geom.glsl +++ b/source/blender/draw/engines/overlay/shaders/armature_shape_outline_geom.glsl @@ -54,7 +54,7 @@ void main(void) * (avoid problems with point behind near plane). * If the chosen point is parallel to the edge in screen space, * choose the other point anyway. - * This fixes some issue with cubes in orthographic views.*/ + * This fixes some issue with cubes in orthographic views. */ if (vPos[0].z < vPos[3].z) { hidden_point = (abs(fac0) > 1e-5) ? ssPos[0] : ssPos[3]; } diff --git a/source/blender/draw/engines/workbench/workbench_private.h b/source/blender/draw/engines/workbench/workbench_private.h index 6247436feea..453ef9c7f8e 100644 --- a/source/blender/draw/engines/workbench/workbench_private.h +++ b/source/blender/draw/engines/workbench/workbench_private.h @@ -381,13 +381,13 @@ typedef struct WORKBENCH_ObjectData { } WORKBENCH_ObjectData; typedef struct WORKBENCH_ViewLayerData { - /** Depth of field sample location array.*/ + /** Depth of field sample location array. */ struct GPUUniformBuf *dof_sample_ubo; - /** All constant data used for a render loop.*/ + /** All constant data used for a render loop. */ struct GPUUniformBuf *world_ubo; - /** Cavity sample location array.*/ + /** Cavity sample location array. */ struct GPUUniformBuf *cavity_sample_ubo; - /** Blue noise texture used to randomize the sampling of some effects.*/ + /** Blue noise texture used to randomize the sampling of some effects. */ struct GPUTexture *cavity_jitter_tx; /** Materials UBO's allocated in a memblock for easy bookkeeping. */ struct BLI_memblock *material_ubo; diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index 5071658fd82..5d5a506c1e7 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -308,7 +308,7 @@ void DRW_shader_library_free(DRWShaderLibrary *lib); * on the differences the minimum state changes can be invoked to setup the desired render state. * * The Write Stencil, Stencil test, Depth test and Blend state options are mutual exclusive - * therefore they aren't ordered as a bit mask.*/ + * therefore they aren't ordered as a bit mask. */ typedef enum { /** Write mask */ DRW_STATE_WRITE_DEPTH = (1 << 0), diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index f902a95a19a..d55da3ed83b 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -2528,7 +2528,7 @@ GPUBatch *DRW_cache_bone_arrows_get(void) for (int axis = 0; axis < 3; axis++) { int flag = VCLASS_EMPTY_AXES | VCLASS_SCREENALIGNED; /* Vertex layout is XY screen position and axis in Z. - * Fractional part of Z is a positive offset at axis unit position.*/ + * Fractional part of Z is a positive offset at axis unit position. */ float p[3] = {0.0f, 0.0f, axis}; /* center to axis line */ GPU_vertbuf_vert_set(vbo, v++, &(Vert){{0.0f, 0.0f, 0.0f}, 0}); diff --git a/source/blender/draw/intern/draw_cache_impl_curve.cc b/source/blender/draw/intern/draw_cache_impl_curve.cc index 9ca452cdacc..c4cd547ef43 100644 --- a/source/blender/draw/intern/draw_cache_impl_curve.cc +++ b/source/blender/draw/intern/draw_cache_impl_curve.cc @@ -94,7 +94,7 @@ static void curve_render_overlay_verts_edges_len_get(ListBase *lb, LISTBASE_FOREACH (Nurb *, nu, lb) { if (nu->bezt) { vert_len += nu->pntsu * 3; - /* 2x handles per point*/ + /* 2x handles per point. */ edge_len += 2 * nu->pntsu; } else if (nu->bp) { diff --git a/source/blender/draw/intern/draw_cache_impl_lattice.c b/source/blender/draw/intern/draw_cache_impl_lattice.c index e6c7341759b..eabef49fa22 100644 --- a/source/blender/draw/intern/draw_cache_impl_lattice.c +++ b/source/blender/draw/intern/draw_cache_impl_lattice.c @@ -165,7 +165,7 @@ static LatticeRenderData *lattice_render_data_create(Lattice *lt, const int type } if (types & (LR_DATATYPE_EDGE)) { rdata->edge_len = lattice_render_edges_len_get(lt); - /*no edge data */ + /* No edge data. */ } } diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 8a805409b27..3ba89a1a91e 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -2090,7 +2090,7 @@ void DRW_draw_render_loop_2d_ex(struct Depsgraph *depsgraph, drw_viewport_colormanagement_set(); /* TODO(jbakker): Only populate when editor needs to draw object. - * for the image editor this is when showing UV's.*/ + * for the image editor this is when showing UV's. */ const bool do_populate_loop = (DST.draw_ctx.space_data->spacetype == SPACE_IMAGE); const bool do_annotations = drw_draw_show_annotation(); const bool do_draw_gizmos = (DST.draw_ctx.space_data->spacetype != SPACE_IMAGE); diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index d5c7ff07274..745b869228a 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -413,7 +413,7 @@ static float normalization_factor_get(Scene *scene, FCurve *fcu, short flag, flo else { /* Calculate min/max using full fcurve evaluation. * [slower than bezier forward differencing but evaluates Back/Elastic interpolation - * as well].*/ + * as well]. */ float step_size = (bezt->vec[1][0] - prev_bezt->vec[1][0]) / resol; for (int j = 0; j <= resol; j++) { float eval_time = prev_bezt->vec[1][0] + step_size * j; diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index a03f19d0111..1cdd879a8f9 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -3132,7 +3132,7 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, Base *base, int filter_m /* check selection and object type filters */ if ((ads->filterflag & ADS_FILTER_ONLYSEL) && - !((base->flag & BASE_SELECTED) /*|| (base == sce->basact)*/)) { + !((base->flag & BASE_SELECTED) /*|| (base == sce->basact) */)) { /* only selected should be shown */ return false; } diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index ecc1b4b4523..dae2138e481 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -1253,7 +1253,7 @@ static int copy_driver_button_exec(bContext *C, wmOperator *op) } } - /* since we're just copying, we don't really need to do anything else...*/ + /* Since we're just copying, we don't really need to do anything else. */ return (changed) ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } @@ -1303,7 +1303,7 @@ static int paste_driver_button_exec(bContext *C, wmOperator *op) } } - /* since we're just copying, we don't really need to do anything else...*/ + /* Since we're just copying, we don't really need to do anything else. */ return (changed) ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index e1ae6526347..aeddd03f3c1 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -693,7 +693,7 @@ typedef struct tAnimCopybufItem { int totvert; /* number of keyframes stored for this channel */ BezTriple *bezt; /* keyframes in buffer */ - short id_type; /* Result of GS(id->name)*/ + short id_type; /* Result of `GS(id->name)`. */ bool is_bone; /* special flag for armature bones */ } tAnimCopybufItem; diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index e795d6fb774..506b126d01e 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -2244,7 +2244,7 @@ static int clear_anim_v3d_exec(bContext *C, wmOperator *UNUSED(op)) bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, bone_name); MEM_freeN(bone_name); - /* delete if bone is selected*/ + /* Delete if bone is selected. */ if ((pchan) && (pchan->bone)) { if (pchan->bone->flag & BONE_SELECTED) { can_delete = true; diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index fda7b600c1c..0206aabd359 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -529,7 +529,7 @@ void ANIM_OT_keying_set_active_set(wmOperatorType *ot) /* Keying Set Type Info declarations */ static ListBase keyingset_type_infos = {NULL, NULL}; -/* Built-In Keying Sets (referencing type infos)*/ +/* Built-In Keying Sets (referencing type information). */ ListBase builtin_keyingsets = {NULL, NULL}; /* --------------- */ diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index 1d4936bdf5e..0ee11a6ef55 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -1558,7 +1558,7 @@ void ARMATURE_OT_extrude(wmOperatorType *ot) /* ********************** Bone Add *************************************/ -/*op makes a new bone and returns it with its tip selected */ +/* Op makes a new bone and returns it with its tip selected. */ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op) { diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c index 912aafbd6e3..67d6dd94190 100644 --- a/source/blender/editors/armature/armature_edit.c +++ b/source/blender/editors/armature/armature_edit.c @@ -1030,7 +1030,7 @@ void ARMATURE_OT_switch_direction(wmOperatorType *ot) /** \name Align Operator * \{ */ -/* helper to fix a ebone position if its parent has moved due to alignment*/ +/* Helper to fix a ebone position if its parent has moved due to alignment. */ static void fix_connected_bone(EditBone *ebone) { float diff[3]; @@ -1073,9 +1073,9 @@ static void bone_align_to_bone(ListBase *edbo, EditBone *selbone, EditBone *actb add_v3_v3v3(selbone->tail, selbone->head, actboneaxis); selbone->roll = actbone->roll; - /* if the bone being aligned has connected descendants they must be moved + /* If the bone being aligned has connected descendants they must be moved * according to their parent new position, otherwise they would be left - * in an inconsistent state: connected but away from the parent*/ + * in an inconsistent state: connected but away from the parent. */ fix_editbone_connected_children(edbo, selbone); } diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index ffcdb99c5a3..bc6d0687654 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -847,7 +847,7 @@ void ED_armature_to_edit(bArmature *arm) } /* *************************************************************** */ -/* Used by Undo for Armature EditMode*/ +/* Used by Undo for Armature EditMode. */ /* free's bones and their properties */ diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index f63334b25ba..df3550d5db6 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -516,7 +516,7 @@ static int poselib_add_exec(bContext *C, wmOperator *op) /* use Keying Set to determine what to store for the pose */ - /* this includes custom props :)*/ + /* This includes custom props :). */ ks = ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_WHOLE_CHARACTER_SELECTED_ID); ANIM_apply_keyingset(C, NULL, act, ks, MODIFYKEY_MODE_INSERT, (float)frame); @@ -1462,7 +1462,7 @@ static int poselib_preview_handle_event(bContext *UNUSED(C), wmOperator *op, con pld->state = PL_PREVIEW_CONFIRM; break; - /* toggle between original pose and poselib pose*/ + /* Toggle between original pose and poselib pose. */ case EVT_TABKEY: pld->flag |= PL_PREVIEW_SHOWORIGINAL; pld->redraw = PL_PREVIEW_REDRAWALL; diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index 4e8c969f705..9b1de742332 100644 --- a/source/blender/editors/armature/pose_slide.c +++ b/source/blender/editors/armature/pose_slide.c @@ -444,7 +444,7 @@ static void pose_slide_draw_2d_slider(const struct bContext *UNUSED(C), ARegion color_line); /* Draw triangles at the ends of the line in overshoot mode to indicate direction of 0-100% - * range.*/ + * range. */ if (pso->overshoot) { if (pso->factor > 1 + OVERSHOOT_RANGE_DELTA + 0.5) { draw_overshoot_triangle(color_line, false, main_line_rect.xmin, line_y); @@ -1468,7 +1468,7 @@ static int pose_slide_modal(bContext *C, wmOperator *op, const wmEvent *event) /* Reset transforms back to original state. */ pose_slide_reset(pso); - /* Depsgraph updates + redraws.*/ + /* Depsgraph updates + redraws. */ pose_slide_refresh(C, pso); /* Clean up temp data. */ diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 751f8333aaa..2160aaf705f 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -323,7 +323,7 @@ static void gpencil_draw_strokes(tGPDdraw *tgpw) MaterialGPencilStyle *gp_style = (ma) ? ma->gp_style : NULL; if ((gp_style == NULL) || (gp_style->flag & GP_MATERIAL_HIDE) || - /* if onion and ghost flag do not draw*/ + /* If onion and ghost flag do not draw. */ (tgpw->onion && (gp_style->flag & GP_MATERIAL_HIDE_ONIONSKIN))) { continue; } diff --git a/source/blender/editors/gpencil/gpencil_armature.c b/source/blender/editors/gpencil/gpencil_armature.c index 6d6f4bc4b40..24fb0873a86 100644 --- a/source/blender/editors/gpencil/gpencil_armature.c +++ b/source/blender/editors/gpencil/gpencil_armature.c @@ -425,7 +425,7 @@ static void gpencil_add_verts_to_dgroups( } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/gpencil/gpencil_bake_animation.c b/source/blender/editors/gpencil/gpencil_bake_animation.c index 30ebc9189c5..1a5e2950e09 100644 --- a/source/blender/editors/gpencil/gpencil_bake_animation.c +++ b/source/blender/editors/gpencil/gpencil_bake_animation.c @@ -185,7 +185,7 @@ static void gpencil_bake_ob_list(bContext *C, Depsgraph *depsgraph, Scene *scene if (ob == obact) { continue; } - /* Add selected objects.*/ + /* Add selected objects. */ if (ob->type == OB_GPENCIL) { elem = MEM_callocN(sizeof(GpBakeOb), __func__); elem->ob = ob; diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c index 8ab413e907c..9bea1868895 100644 --- a/source/blender/editors/gpencil/gpencil_convert.c +++ b/source/blender/editors/gpencil/gpencil_convert.c @@ -168,7 +168,7 @@ static void gpencil_strokepoint_convertcoords(bContext *C, ARegion *region = CTX_wm_region(C); /* TODO(sergey): This function might be called from a loop, but no tagging is happening in it, * so it's not that expensive to ensure evaluated depsgraph here. However, ideally all the - * parameters are to wrapped into a context style struct and queried from Context once.*/ + * parameters are to wrapped into a context style struct and queried from Context once. */ Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); Object *obact = CTX_data_active_object(C); bGPDspoint mypt, *pt; @@ -219,7 +219,7 @@ typedef struct tGpTimingData { int frame_range; /* Number of frames evaluated for path animation */ int start_frame, end_frame; bool realtime; /* Will overwrite end_frame in case of Original or CustomGap timing... */ - float gap_duration, gap_randomness; /* To be used with CustomGap mode*/ + float gap_duration, gap_randomness; /* To be used with CustomGap mode. */ int seed; /* Data set from points, used to compute final timing FCurve */ diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index b4afeb4ed8a..47bb153cf46 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -828,7 +828,7 @@ static int gpencil_frame_clean_loose_exec(bContext *C, wmOperator *op) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -1572,7 +1572,7 @@ static int gpencil_stroke_arrange_exec(bContext *C, wmOperator *op) continue; } bool gpf_lock = false; - /* some stroke is already at front*/ + /* Some stroke is already at front. */ if (ELEM(direction, GP_STROKE_MOVE_TOP, GP_STROKE_MOVE_UP)) { if (gps == gpf->strokes.last) { gpf_lock = true; @@ -1664,7 +1664,7 @@ static int gpencil_stroke_arrange_exec(bContext *C, wmOperator *op) BLI_freelistN(&selected); } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -1772,7 +1772,7 @@ static int gpencil_stroke_change_color_exec(bContext *C, wmOperator *op) } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -3356,7 +3356,7 @@ static int gpencil_material_unlock_all_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_CANCELLED; } - /* make all layers editable again*/ + /* Make all layers editable again. */ MaterialGPencilStyle *gp_style = NULL; for (short i = 0; i < *totcol; i++) { @@ -3410,7 +3410,7 @@ static int gpencil_material_select_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* read all strokes and select*/ + /* Read all strokes and select. */ CTX_DATA_BEGIN (C, bGPDlayer *, gpl, editable_gpencil_layers) { bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe; @@ -3452,7 +3452,7 @@ static int gpencil_material_select_exec(bContext *C, wmOperator *op) } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index b1c0060981a..8d1f841da6c 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -3285,7 +3285,7 @@ static int gpencil_stroke_cyclical_set_exec(bContext *C, wmOperator *op) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -4478,7 +4478,7 @@ static int gpencil_stroke_trim_exec(bContext *C, wmOperator *op) } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -4681,7 +4681,7 @@ static int gpencil_stroke_separate_exec(bContext *C, wmOperator *op) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -4860,7 +4860,7 @@ static int gpencil_stroke_split_exec(bContext *C, wmOperator *op) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -5087,7 +5087,7 @@ static int gpencil_cutter_lasso_select(bContext *C, BKE_gpencil_stroke_select_index_reset(gps); } } - /* if not multiedit, exit loop. */ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -5151,7 +5151,7 @@ static int gpencil_cutter_lasso_select(bContext *C, } } } - /* if not multiedit, exit loop. */ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -5170,7 +5170,7 @@ static int gpencil_cutter_lasso_select(bContext *C, gpencil_cutter_dissolve(gpd, gpl, gps, flat_caps); } } - /* if not multiedit, exit loop. */ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -5478,7 +5478,7 @@ static int gpencil_stroke_normalize_exec(bContext *C, wmOperator *op) BKE_gpencil_stroke_geometry_update(gpd, gps); } } - /* If not multiedit, exit loop. */ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index 6e6ecfa583b..4419833a99c 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -810,7 +810,7 @@ static bool is_leak_narrow(ImBuf *ibuf, const int maxpixel, int limit, int index } } else { - /* edge of image*/ + /* Edge of image. */ t_a = true; } /* pixels on bottom */ @@ -822,7 +822,7 @@ static bool is_leak_narrow(ImBuf *ibuf, const int maxpixel, int limit, int index } } else { - /* edge of image*/ + /* Edge of image. */ t_b = true; } } @@ -846,7 +846,7 @@ static bool is_leak_narrow(ImBuf *ibuf, const int maxpixel, int limit, int index } } else { - t_a = true; /* edge of image*/ + t_a = true; /* Edge of image. */ } /* pixels to left */ pt = index + extreme; @@ -1869,7 +1869,7 @@ static int gpencil_fill_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE DEG_id_tag_update(&tgpf->gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED, NULL); - /* add a modal handler for this operator*/ + /* Add a modal handler for this operator. */ WM_event_add_modal_handler(C, op); return OPERATOR_RUNNING_MODAL; @@ -2123,7 +2123,7 @@ static int gpencil_fill_modal(bContext *C, wmOperator *op, const wmEvent *event) gpencil_stroke_convertcoords_tpoint( tgpf->scene, tgpf->region, tgpf->ob, &point2D, NULL, &pt->x); - /* Hash of selected frames.*/ + /* Hash of selected frames. */ GHash *frame_list = BLI_ghash_int_new_ex(__func__, 64); /* If not multiframe and there is no frame in CFRA for the active layer, create diff --git a/source/blender/editors/gpencil/gpencil_mesh.c b/source/blender/editors/gpencil/gpencil_mesh.c index 55468dffab0..1882285a230 100644 --- a/source/blender/editors/gpencil/gpencil_mesh.c +++ b/source/blender/editors/gpencil/gpencil_mesh.c @@ -159,7 +159,7 @@ static bool gpencil_bake_ob_list(bContext *C, Depsgraph *depsgraph, Scene *scene if (ob == obact) { continue; } - /* Add selected meshes.*/ + /* Add selected meshes. */ if (ob->type == OB_MESH) { elem = MEM_callocN(sizeof(GpBakeOb), __func__); elem->ob = ob; diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 7e0ec9b957c..d0c0933c5be 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1433,7 +1433,7 @@ static void gpencil_stroke_soft_refine(bGPDstroke *gps) bGPDspoint *pt2 = NULL; int i; - /* check if enough points*/ + /* Check if enough points. */ if (gps->totpoints < 3) { return; } @@ -1792,7 +1792,7 @@ static void gpencil_stroke_doeraser(tGPsdata *p) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index 55521ac4d15..c33b43247fd 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -1374,7 +1374,7 @@ static bool gpencil_do_curve_circle_sel(bContext *C, const bool handles_visible = (v3d->overlay.handle_display != CURVE_HANDLE_NONE) && (!only_selected || BEZT_ISSEL_ANY(bezt)); - /* if the handles are not visible only check ctrl point (vec[1])*/ + /* If the handles are not visible only check control point (vec[1]). */ int from = (!handles_visible) ? 1 : 0; int to = (!handles_visible) ? 2 : 3; @@ -1719,7 +1719,7 @@ static bool gpencil_generic_curve_select(bContext *C, } } } - /* if the handles are not visible only check ctrl point (vec[1])*/ + /* If the handles are not visible only check ctrl point (vec[1]). */ else { const bool is_select = bezt->f2; bool is_inside = is_inside_fn(region, gps_iter.diff_mat, bezt->vec[1], user_data); @@ -2153,7 +2153,7 @@ static void gpencil_select_curve_point(bContext *C, const bool handles_visible = (v3d->overlay.handle_display != CURVE_HANDLE_NONE) && (!only_selected || BEZT_ISSEL_ANY(bezt)); - /* if the handles are not visible only check ctrl point (vec[1])*/ + /* If the handles are not visible only check control point (vec[1]). */ int from = (!handles_visible) ? 1 : 0; int to = (!handles_visible) ? 2 : 3; diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 31f5972fdf8..15ada6e0891 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -565,7 +565,7 @@ bool ED_gpencil_layer_has_selected_stroke(const bGPDlayer *gpl, const bool is_mu return true; } } - /* If not multiedit, exit loop. */ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -1640,7 +1640,7 @@ void ED_gpencil_vgroup_assign(bContext *C, Object *ob, float weight) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -1693,7 +1693,7 @@ void ED_gpencil_vgroup_remove(bContext *C, Object *ob) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -1748,7 +1748,7 @@ void ED_gpencil_vgroup_select(bContext *C, Object *ob) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -1798,7 +1798,7 @@ void ED_gpencil_vgroup_deselect(bContext *C, Object *ob) } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/gpencil/gpencil_vertex_ops.c b/source/blender/editors/gpencil/gpencil_vertex_ops.c index bf46fa2544f..402bccce2f7 100644 --- a/source/blender/editors/gpencil/gpencil_vertex_ops.c +++ b/source/blender/editors/gpencil/gpencil_vertex_ops.c @@ -99,7 +99,7 @@ static bool is_any_stroke_selected(bContext *C, const bool is_multiedit, const b } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -204,7 +204,7 @@ static int gpencil_vertexpaint_brightness_contrast_exec(bContext *C, wmOperator } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -325,7 +325,7 @@ static int gpencil_vertexpaint_hsv_exec(bContext *C, wmOperator *op) } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -419,7 +419,7 @@ static int gpencil_vertexpaint_invert_exec(bContext *C, wmOperator *op) } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -510,7 +510,7 @@ static int gpencil_vertexpaint_levels_exec(bContext *C, wmOperator *op) } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -605,7 +605,7 @@ static int gpencil_vertexpaint_set_exec(bContext *C, wmOperator *op) } } } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } @@ -1113,7 +1113,7 @@ static int gpencil_stroke_reset_vertex_color_exec(bContext *C, wmOperator *op) changed = true; } - /* if not multiedit, exit loop*/ + /* If not multi-edit, exit loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/gpencil/gpencil_vertex_paint.c b/source/blender/editors/gpencil/gpencil_vertex_paint.c index 3d99b314f7e..7ec64b2afd6 100644 --- a/source/blender/editors/gpencil/gpencil_vertex_paint.c +++ b/source/blender/editors/gpencil/gpencil_vertex_paint.c @@ -1107,7 +1107,7 @@ static bool gpencil_vertexpaint_brush_do_frame(bContext *C, break; } } - /* Clear the selected array, but keep the memory allocation.*/ + /* Clear the selected array, but keep the memory allocation. */ gso->pbuffer = gpencil_select_buffer_ensure( gso->pbuffer, &gso->pbuffer_size, &gso->pbuffer_used, true); diff --git a/source/blender/editors/gpencil/gpencil_weight_paint.c b/source/blender/editors/gpencil/gpencil_weight_paint.c index 6fb98b4a8ac..56eed187d87 100644 --- a/source/blender/editors/gpencil/gpencil_weight_paint.c +++ b/source/blender/editors/gpencil/gpencil_weight_paint.c @@ -555,7 +555,7 @@ static bool gpencil_weightpaint_brush_do_frame(bContext *C, break; } } - /* Clear the selected array, but keep the memory allocation.*/ + /* Clear the selected array, but keep the memory allocation. */ gso->pbuffer = gpencil_select_buffer_ensure( gso->pbuffer, &gso->pbuffer_size, &gso->pbuffer_used, true); diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 0e2be5eb568..7fcae2349db 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -91,7 +91,7 @@ void EDBM_mesh_load(struct Main *bmain, struct Object *ob); /* flushes based on the current select mode. if in vertex select mode, * verts select/deselect edges and faces, if in edge select mode, * edges select/deselect faces and vertices, and in face select mode faces select/deselect - * edges and vertices.*/ + * edges and vertices. */ void EDBM_select_more(struct BMEditMesh *em, const bool use_face_step); void EDBM_select_less(struct BMEditMesh *em, const bool use_face_step); @@ -481,9 +481,8 @@ int ED_mesh_mirror_spatial_table_lookup(struct Object *ob, void ED_mesh_mirror_topo_table_begin(struct Object *ob, struct Mesh *me_eval); void ED_mesh_mirror_topo_table_end(struct Object *ob); -/* retrieves mirrored cache vert, or NULL if there isn't one. - * note: calling this without ensuring the mirror cache state - * is bad.*/ +/* Retrieves mirrored cache vert, or NULL if there isn't one. + * NOTE: calling this without ensuring the mirror cache state is bad. */ int mesh_get_x_mirror_vert(struct Object *ob, struct Mesh *me_eval, int index, diff --git a/source/blender/editors/include/ED_undo.h b/source/blender/editors/include/ED_undo.h index ed1ec96a13f..059277e1466 100644 --- a/source/blender/editors/include/ED_undo.h +++ b/source/blender/editors/include/ED_undo.h @@ -53,7 +53,7 @@ void ED_OT_undo_redo(struct wmOperatorType *ot); void ED_OT_undo_history(struct wmOperatorType *ot); int ED_undo_operator_repeat(struct bContext *C, struct wmOperator *op); -/* convenience since UI callbacks use this mostly*/ +/* Convenience since UI callbacks use this mostly. */ void ED_undo_operator_repeat_cb(struct bContext *C, void *arg_op, void *arg_unused); void ED_undo_operator_repeat_cb_evt(struct bContext *C, void *arg_op, int arg_unused); diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 7553a2d373e..b8443b952a8 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -318,8 +318,8 @@ typedef enum { UI_BUT_POIN_SHORT = 64, UI_BUT_POIN_INT = 96, UI_BUT_POIN_FLOAT = 128, - /* UI_BUT_POIN_FUNCTION = 192, */ /*UNUSED*/ - UI_BUT_POIN_BIT = 256, /* OR'd with a bit index*/ + // UI_BUT_POIN_FUNCTION = 192, /* UNUSED */ + UI_BUT_POIN_BIT = 256, /* OR'd with a bit index. */ } eButPointerType; /* requires (but->poin != NULL) */ diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 063dd88c01d..9e5e1a33564 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -3244,8 +3244,8 @@ void ui_but_range_set_soft(uiBut *but) RNA_property_int_ui_range(&but->rnapoin, but->rnaprop, &imin, &imax, &istep); softmin = (imin == INT_MIN) ? -1e4 : imin; softmax = (imin == INT_MAX) ? 1e4 : imax; - /*step = istep;*/ /*UNUSED*/ - /*precision = 1;*/ /*UNUSED*/ + // step = istep; /* UNUSED */ + // precision = 1; /* UNUSED */ if (is_array) { int value_range[2]; @@ -3264,8 +3264,8 @@ void ui_but_range_set_soft(uiBut *but) RNA_property_float_ui_range(&but->rnapoin, but->rnaprop, &fmin, &fmax, &fstep, &fprecision); softmin = (fmin == -FLT_MAX) ? (float)-1e4 : fmin; softmax = (fmax == FLT_MAX) ? (float)1e4 : fmax; - /*step = fstep;*/ /*UNUSED*/ - /*precision = fprecision;*/ /*UNUSED*/ + // step = fstep; /* UNUSED */ + // precision = fprecision; /* UNUSED */ /* Use shared min/max for array values, except for color alpha. */ if (is_array && !(subtype == PROP_COLOR && but->rnaindex == 3)) { @@ -4595,7 +4595,7 @@ static uiBut *ui_def_but_rna(uiBlock *block, if (proptype == PROP_POINTER) { /* If the button shows an ID, automatically set it as focused in context so operators can - * access it.*/ + * access it. */ const PointerRNA pptr = RNA_property_pointer_get(ptr, prop); if (pptr.data && RNA_struct_is_ID(pptr.type)) { but->context = CTX_store_add(&block->contexts, "id", &pptr); diff --git a/source/blender/editors/interface/interface_eyedropper_gpencil_color.c b/source/blender/editors/interface/interface_eyedropper_gpencil_color.c index f2899fc0098..417807afff1 100644 --- a/source/blender/editors/interface/interface_eyedropper_gpencil_color.c +++ b/source/blender/editors/interface/interface_eyedropper_gpencil_color.c @@ -255,7 +255,7 @@ static void eyedropper_gpencil_color_set(bContext *C, const wmEvent *event, Eyed copy_v3_v3(col_conv, eye->color); } - /* Add material or Palette color*/ + /* Add material or Palette color. */ if (eye->mode == 0) { eyedropper_add_material(C, col_conv, only_stroke, only_fill, both); } diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 7d866ec17d2..f255507ddaf 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -4770,7 +4770,7 @@ static float ui_numedit_apply_snapf( UnitSettings *unit = but->block->unit; const int unit_type = UI_but_unit_type_get(but); if ((unit_type == PROP_UNIT_ROTATION) && (unit->system_rotation != USER_UNIT_ROT_RADIANS)) { - /* pass (degrees)*/ + /* Pass (degrees). */ } else { softrange = 20.0f; @@ -8219,8 +8219,8 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s data->hold_action_timer = NULL; } - /* add a blocking ui handler at the window handler for blocking, modal states - * but not for popups, because we already have a window level handler*/ + /* Add a blocking ui handler at the window handler for blocking, modal states + * but not for popups, because we already have a window level handler. */ if (!(but->block->handle && but->block->handle->popup)) { if (button_modal_state(state)) { if (!button_modal_state(data->state)) { @@ -10018,7 +10018,7 @@ static int ui_handle_menu_event(bContext *C, } if (!but) { - /* wrap button or no active button*/ + /* Wrap button or no active button. */ uiBut *but_wrap = NULL; if (ELEM(scrolltype, MENU_SCROLL_UP, MENU_SCROLL_BOTTOM)) { but_wrap = ui_but_last(block); @@ -10362,7 +10362,7 @@ static int ui_handle_menu_event(bContext *C, * anymore why it was there? but it meant enter didn't work * for example when mouse was not over submenu */ if ((event->type == TIMER) || - (/*inside &&*/ (!menu->menuretval || (menu->menuretval & UI_RETURN_UPDATE)) && + (/* inside && */ (!menu->menuretval || (menu->menuretval & UI_RETURN_UPDATE)) && retval == WM_UI_HANDLER_CONTINUE)) { retval = ui_handle_menu_button(C, event, menu); } diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index ad0c523a594..88ab6a377d0 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -245,7 +245,7 @@ void UI_fontstyle_draw_rotated(const uiFontStyle *fs, /* ignore UI_STYLE, always aligned to top */ - /* rotate counter-clockwise for now (assumes left-to-right language)*/ + /* Rotate counter-clockwise for now (assumes left-to-right language). */ xofs += height; yofs = BLF_width(fs->uifont_id, str, BLF_DRAW_STR_DUMMY_MAX) + 5; angle = M_PI_2; diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index fc3af525d45..122a43513b1 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -3050,7 +3050,7 @@ static void colorband_flip_cb(bContext *C, ColorBand *coba) coba->data[a] = data_tmp[a]; } - /* may as well flip the cur*/ + /* May as well flip the `cur`. */ coba->cur = coba->tot - (coba->cur + 1); ED_undo_push(C, "Flip Color Ramp"); diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c index e03390780f9..907881a44f3 100644 --- a/source/blender/editors/mesh/editmesh_extrude.c +++ b/source/blender/editors/mesh/editmesh_extrude.c @@ -509,7 +509,7 @@ static int edbm_extrude_context_exec(bContext *C, wmOperator *op) edbm_extrude_mesh(obedit, em, op); /* This normally happens when pushing undo but modal operators - * like this one don't push undo data until after modal mode is done.*/ + * like this one don't push undo data until after modal mode is done. */ EDBM_update(obedit->data, &(const struct EDBMUpdate_Params){ .calc_looptri = true, diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index af4ce0abe5f..0e2dd492e06 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -937,7 +937,7 @@ static KnifeVert *knife_split_edge(KnifeTool_OpData *kcd, static void knife_start_cut(KnifeTool_OpData *kcd) { kcd->prev = kcd->curr; - kcd->curr.is_space = 0; /*TODO: why do we do this? */ + kcd->curr.is_space = 0; /* TODO: why do we do this? */ if (kcd->prev.vert == NULL && kcd->prev.edge == NULL) { float origin[3], origin_ofs[3]; @@ -952,7 +952,7 @@ static void knife_start_cut(KnifeTool_OpData *kcd) zero_v3(kcd->prev.cage); } - copy_v3_v3(kcd->prev.co, kcd->prev.cage); /*TODO: do we need this? */ + copy_v3_v3(kcd->prev.co, kcd->prev.cage); /* TODO: do we need this? */ copy_v3_v3(kcd->curr.cage, kcd->prev.cage); copy_v3_v3(kcd->curr.co, kcd->prev.co); } diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index fc32a2d9bab..4a87266f1c9 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1805,7 +1805,7 @@ static bool mouse_mesh_loop( V3D_PROJ_RET_OK) { tdist = len_squared_v2v2(mvalf, co); if (tdist < best_dist) { - /* printf("Best face: %p (%f)\n", f, tdist);*/ + // printf("Best face: %p (%f)\n", f, tdist); best_dist = tdist; efa = f; } diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index ee520753478..fe9656d277e 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2309,8 +2309,8 @@ static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op) } } - /* ok, we don't have two adjacent faces, but we do have two selected ones. - * that's an error condition.*/ + /* OK, we don't have two adjacent faces, but we do have two selected ones. + * that's an error condition. */ if (tot == 0) { continue; } @@ -3639,7 +3639,7 @@ void MESH_OT_remove_doubles(wmOperatorType *ot) /** \name Shape Key Propagate Operator * \{ */ -/* BMESH_TODO this should be properly encapsulated in a bmop. but later.*/ +/* BMESH_TODO this should be properly encapsulated in a bmop. but later. */ static bool shape_propagate(BMEditMesh *em) { BMIter iter; @@ -3732,7 +3732,7 @@ void MESH_OT_shape_propagate_to_all(wmOperatorType *ot) /** \name Blend from Shape Operator * \{ */ -/* BMESH_TODO this should be properly encapsulated in a bmop. but later.*/ +/* BMESH_TODO this should be properly encapsulated in a bmop. but later. */ static int edbm_blend_from_shape_exec(bContext *C, wmOperator *op) { Object *obedit_ref = CTX_data_edit_object(C); @@ -4139,9 +4139,9 @@ static float bm_edge_seg_isect(const float sco_a[2], yi = (b1 * m2 - m1 * b2) / (m2 - m1); } - /* Intersect inside bounding box of edge?*/ + /* Intersect inside bounding box of edge? */ if ((xi >= x2min) && (xi <= x2max) && (yi <= y2max) && (yi >= y2min)) { - /* test for vertex intersect that may be 'close enough'*/ + /* Test for vertex intersect that may be 'close enough'. */ if (mode != KNIFE_MULTICUT) { if (xi <= (x21 + threshold) && xi >= (x21 - threshold)) { if (yi <= (y21 + threshold) && yi >= (y21 - threshold)) { @@ -4244,7 +4244,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* store percentage of edge cut for KNIFE_EXACT here.*/ + /* Store percentage of edge cut for KNIFE_EXACT here. */ BMOpSlot *slot_edge_percents = BMO_slot_get(bmop.slots_in, "edge_percents"); BM_ITER_MESH (be, &iter, bm, BM_EDGES_OF_MESH) { bool is_cut = false; @@ -6958,9 +6958,9 @@ static void sort_bmelem_flag(bContext *C, } } - /* printf("%d vertices: %d to be affected...\n", totelem[0], affected[0]);*/ - /* printf("%d edges: %d to be affected...\n", totelem[1], affected[1]);*/ - /* printf("%d faces: %d to be affected...\n", totelem[2], affected[2]);*/ + // printf("%d vertices: %d to be affected...\n", totelem[0], affected[0]); + // printf("%d edges: %d to be affected...\n", totelem[1], affected[1]); + // printf("%d faces: %d to be affected...\n", totelem[2], affected[2]); if (affected[0] == 0 && affected[1] == 0 && affected[2] == 0) { for (j = 3; j--;) { if (pblock[j]) { @@ -7221,7 +7221,7 @@ static int edbm_bridge_tag_boundary_edges(BMesh *bm) /* check if its only used by selected faces */ BM_ITER_ELEM (f, &fiter, e, BM_FACES_OF_EDGE) { if (BM_elem_flag_test(f, BM_ELEM_SELECT)) { - /* tag face for removal*/ + /* Tag face for removal. */ if (!BM_elem_flag_test(f, BM_ELEM_TAG)) { BM_elem_flag_enable(f, BM_ELEM_TAG); totface_del++; diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 54a7b0dd22e..141b69f0465 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -1011,7 +1011,7 @@ BMFace *EDBM_uv_active_face_get(BMEditMesh *em, const bool sloppy, const bool se return NULL; } -/* can we edit UV's for this mesh?*/ +/* Can we edit UV's for this mesh? */ bool EDBM_uv_check(BMEditMesh *em) { /* some of these checks could be a touch overkill */ @@ -1689,8 +1689,8 @@ bool BMBVH_EdgeVisible(struct BMBVHTree *tree, scale_point(co1, co2, 0.99); scale_point(co3, co2, 0.99); - /* ok, idea is to generate rays going from the camera origin to the - * three points on the edge (v1, mid, v2)*/ + /* OK, idea is to generate rays going from the camera origin to the + * three points on the edge (v1, mid, v2). */ sub_v3_v3v3(dir1, origin, co1); sub_v3_v3v3(dir2, origin, co2); sub_v3_v3v3(dir3, origin, co3); @@ -1699,8 +1699,8 @@ bool BMBVH_EdgeVisible(struct BMBVHTree *tree, normalize_v3_length(dir2, epsilon); normalize_v3_length(dir3, epsilon); - /* offset coordinates slightly along view vectors, to avoid - * hitting the faces that own the edge.*/ + /* Offset coordinates slightly along view vectors, + * to avoid hitting the faces that own the edge. */ add_v3_v3v3(co1, co1, dir1); add_v3_v3v3(co2, co2, dir2); add_v3_v3v3(co3, co3, dir3); diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 222476e6971..7c6dc6516ed 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -166,7 +166,7 @@ static void mesh_uv_reset_array(float **fuv, const int len) fuv[3][0] = 0.0; fuv[3][1] = 1.0; - /*make sure we ignore 2-sided faces*/ + /* Make sure we ignore 2-sided faces. */ } else if (len > 2) { float fac = 0.0f, dfac = 1.0f / (float)len; diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index 9e2e2786347..f25317e8e85 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -51,7 +51,7 @@ bool EDBM_op_call_and_selectf(struct BMEditMesh *em, const bool select_replace, const char *fmt, ...); -/* Same as above, but doesn't report errors.*/ +/* Same as above, but doesn't report errors. */ bool EDBM_op_call_silentf(struct BMEditMesh *em, const char *fmt, ...); /* these next two functions are the split version of EDBM_op_callf, so you can diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index 7f26d44a4ed..e941b27879b 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -1374,7 +1374,7 @@ static int bake(const BakeAPIRender *bkr, * the cage is supposed to have interpolated normals * between the faces unless the geometry is physically * split. So we create a copy of the low poly mesh without - * the eventual edge split.*/ + * the eventual edge split. */ if (md->type == eModifierType_EdgeSplit) { BLI_remlink(&ob_low_eval->modifiers, md); diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c index 22c9d669ff3..7b7970fbfe5 100644 --- a/source/blender/editors/object/object_data_transfer.c +++ b/source/blender/editors/object/object_data_transfer.c @@ -611,23 +611,23 @@ void OBJECT_OT_data_transfer(wmOperatorType *ot) { PropertyRNA *prop; - /* Identifiers.*/ + /* Identifiers. */ ot->name = "Transfer Mesh Data"; ot->idname = "OBJECT_OT_data_transfer"; ot->description = "Transfer data layer(s) (weights, edge sharp, etc.) from active to selected meshes"; - /* API callbacks.*/ + /* API callbacks. */ ot->poll = data_transfer_poll; ot->poll_property = data_transfer_poll_property; ot->invoke = WM_menu_invoke; ot->exec = data_transfer_exec; ot->check = data_transfer_check; - /* Flags.*/ + /* Flags. */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - /* Properties.*/ + /* Properties. */ prop = RNA_def_boolean(ot->srna, "use_reverse_transfer", false, @@ -886,7 +886,7 @@ void OBJECT_OT_datalayout_transfer(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - /* Properties.*/ + /* Properties. */ edit_modifier_properties(ot); /* Data type to transfer. */ diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 9c2a4fb1880..36c51bcda7c 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -105,7 +105,7 @@ #include "CLG_log.h" -/* for menu/popup icons etc etc*/ +/* For menu/popup icons etc etc. */ #include "UI_interface.h" #include "UI_resources.h" @@ -1990,7 +1990,7 @@ static int move_to_collection_invoke(bContext *C, wmOperator *op, const wmEvent * Technically we could use #wmOperator.customdata. However there is no free callback * called to an operator that exit with OPERATOR_INTERFACE to launch a menu. * - * So we are left with a memory that will necessarily leak. It's a small leak though.*/ + * So we are left with a memory that will necessarily leak. It's a small leak though. */ if (master_collection_menu == NULL) { master_collection_menu = MEM_callocN(sizeof(MoveToCollectionData), "MoveToCollectionData menu - expected eventual memleak"); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index cdf12bcb5df..e2b7a079775 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1931,7 +1931,7 @@ static void single_object_users( } /* not an especially efficient function, only added so the single user - * button can be functional.*/ + * button can be functional. */ void ED_object_single_user(Main *bmain, Scene *scene, Object *ob) { FOREACH_SCENE_OBJECT_BEGIN (scene, ob_iter) { diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 9160190764c..2fcf432bf18 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -579,7 +579,7 @@ static bool object_select_all_by_particle(bContext *C, Object *ob) CTX_DATA_BEGIN (C, Base *, base, visible_bases) { if (((base->flag & BASE_SELECTED) == 0) && ((base->flag & BASE_SELECTABLE) != 0)) { - /* loop through other particles*/ + /* Loop through other particles. */ ParticleSystem *psys; for (psys = base->object->particlesystem.first; psys; psys = psys->next) { diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 94b2f3fd566..28c7ba0a774 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -1255,16 +1255,16 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) } } else if (ob->type == OB_FONT) { - /* get from bb */ + /* Det from bounding-box. */ Curve *cu = ob->data; if (ob->runtime.bb == NULL && (centermode != ORIGIN_TO_CURSOR)) { - /* do nothing*/ + /* Do nothing. */ } else { if (centermode == ORIGIN_TO_CURSOR) { - /* done */ + /* Done. */ } else { /* extra 0.5 is the height o above line */ diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index ae6ccf8d6a7..51a9a3676e7 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -4068,7 +4068,7 @@ static int vgroup_do_remap(Object *ob, const char *name_array, wmOperator *op) bDeformGroup *def; int defbase_tot = BLI_listbase_count(&ob->defbase); - /* needs a dummy index at the start*/ + /* Needs a dummy index at the start. */ int *sort_map_update = MEM_mallocN(sizeof(int) * (defbase_tot + 1), "sort vgroups"); int *sort_map = sort_map_update + 1; @@ -4111,7 +4111,7 @@ static int vgroup_do_remap(Object *ob, const char *name_array, wmOperator *op) BKE_object_defgroup_array_get(ob->data, &dvert, &dvert_tot); - /*create as necessary*/ + /* Create as necessary. */ if (dvert) { while (dvert_tot--) { if (dvert->totweight) { @@ -4186,10 +4186,10 @@ static int vertex_group_sort_exec(bContext *C, wmOperator *op) int ret; int sort_type = RNA_enum_get(op->ptr, "sort_type"); - /*init remapping*/ + /* Init remapping. */ name_array = vgroup_init_remap(ob); - /*sort vgroup names*/ + /* Sort vgroup names. */ switch (sort_type) { case SORT_TYPE_NAME: BLI_listbase_sort(&ob->defbase, vgroup_sort_name); @@ -4199,7 +4199,7 @@ static int vertex_group_sort_exec(bContext *C, wmOperator *op) break; } - /*remap vgroup data to map to correct names*/ + /* Remap vgroup data to map to correct names. */ ret = vgroup_do_remap(ob, name_array, op); if (ret != OPERATOR_CANCELLED) { diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index accb9d9ef14..3f15d572cdd 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1456,7 +1456,7 @@ void recalc_emitter_field(Depsgraph *UNUSED(depsgraph), Object *UNUSED(ob), Part BLI_kdtree_3d_free(edit->emitter_field); totface = mesh->totface; - /*totvert=dm->getNumVerts(dm);*/ /*UNUSED*/ + // totvert = dm->getNumVerts(dm); /* UNUSED */ edit->emitter_cosnos = MEM_callocN(sizeof(float[6]) * totface, "emitter cosnos"); @@ -1564,7 +1564,7 @@ void update_world_cos(Object *ob, PTCacheEdit *edit) } static void update_velocities(PTCacheEdit *edit) { - /*TODO: get frs_sec properly */ + /* TODO: get frs_sec properly. */ float vec1[3], vec2[3], frs_sec, dfra; POINT_P; KEY_K; @@ -3003,7 +3003,7 @@ static void remove_tagged_keys(Depsgraph *depsgraph, Object *ob, ParticleSystem LOOP_TAGGED_KEYS { new_totkey--; } - /* we can't have elements with less than two keys*/ + /* We can't have elements with less than two keys. */ if (new_totkey < 2) { point->flag |= PEP_TAG; } @@ -3142,7 +3142,7 @@ static void subdivide_particle(PEData *data, int pa_index) nkey++; } } - /*tip still not copied*/ + /* Tip still not copied. */ memcpy(nkey, key, sizeof(HairKey)); memcpy(nekey, ekey, sizeof(PTCacheEditKey)); diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h index 4dc3ded9bd7..ef07d73826a 100644 --- a/source/blender/editors/physics/physics_intern.h +++ b/source/blender/editors/physics/physics_intern.h @@ -147,7 +147,7 @@ void RIGIDBODY_OT_mass_calculate(struct wmOperatorType *ot); void RIGIDBODY_OT_constraint_add(struct wmOperatorType *ot); void RIGIDBODY_OT_constraint_remove(struct wmOperatorType *ot); -/*rigidbody_world.c */ +/* rigidbody_world.c */ void RIGIDBODY_OT_world_add(struct wmOperatorType *ot); void RIGIDBODY_OT_world_remove(struct wmOperatorType *ot); void RIGIDBODY_OT_world_export(struct wmOperatorType *ot); diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index aa1a2a6b867..17aaa5aa79d 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -141,7 +141,9 @@ typedef struct OGLRender { wmWindowManager *wm; wmWindow *win; - wmTimer *timer; /* use to check if running modal or not (invoke'd or exec'd)*/ + /** Use to check if running modal or not (invoke'd or exec'd). */ + wmTimer *timer; + void **movie_ctx_arr; TaskPool *task_pool; @@ -461,7 +463,7 @@ static void screen_opengl_render_write(OGLRender *oglrender) static void UNUSED_FUNCTION(addAlphaOverFloat)(float dest[4], const float source[4]) { - /* d = s + (1-alpha_s)d*/ + /* `d = s + (1-alpha_s)d` */ float mul; mul = 1.0f - source[3]; @@ -544,7 +546,7 @@ static void gather_frames_to_render_for_adt(const OGLRender *oglrender, const An continue; } - bool found = false; /* Not interesting, we just want a starting point for the for-loop.*/ + bool found = false; /* Not interesting, we just want a starting point for the for-loop. */ int key_index = BKE_fcurve_bezt_binarysearch_index( fcu->bezt, frame_start, fcu->totvert, &found); for (; key_index < fcu->totvert; key_index++) { diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index b4cac58db1f..36492359d5c 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -227,7 +227,7 @@ static int material_slot_remove_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* Removing material slots in edit mode screws things up, see bug T21822.*/ + /* Removing material slots in edit mode screws things up, see bug T21822. */ if (ob == CTX_data_edit_object(C)) { BKE_report(op->reports, RPT_ERROR, "Unable to remove material slot in edit mode"); return OPERATOR_CANCELLED; diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 299201d3042..175efc5387b 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1461,7 +1461,7 @@ static void region_rect_recursive( } } else if (ELEM(alignment, RGN_ALIGN_VSPLIT, RGN_ALIGN_HSPLIT)) { - /* percentage subdiv*/ + /* Percentage subdiv. */ region->winrct = *remainder; if (alignment == RGN_ALIGN_HSPLIT) { diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 627a67358f2..45cf1775ccb 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -874,7 +874,7 @@ static eContextResult screen_ctx_editable_gpencil_strokes(const bContext *C, } } } - /* if not multiedit out of loop */ + /* If not multi-edit out of loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/screen/screen_draw.c b/source/blender/editors/screen/screen_draw.c index 2c45524ef94..dca464bbf22 100644 --- a/source/blender/editors/screen/screen_draw.c +++ b/source/blender/editors/screen/screen_draw.c @@ -244,7 +244,7 @@ void screen_draw_join_highlight(ScrArea *sa1, ScrArea *sa2) return; } - /* Rect of the combined areas.*/ + /* Rect of the combined areas. */ const bool vertical = SCREEN_DIR_IS_VERTICAL(dir); const rctf combined = { .xmin = vertical ? MAX2(sa1->totrct.xmin, sa2->totrct.xmin) : diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index f0e12ca60e9..159b649ec71 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2117,16 +2117,16 @@ static ScrEdge *area_findsharededge(bScreen *screen, ScrArea *area, ScrArea *sb) ScrVert *sbv3 = sb->v3; ScrVert *sbv4 = sb->v4; - if (sav1 == sbv4 && sav2 == sbv3) { /* area to right of sb = W */ + if (sav1 == sbv4 && sav2 == sbv3) { /* Area to right of sb = W. */ return BKE_screen_find_edge(screen, sav1, sav2); } - if (sav2 == sbv1 && sav3 == sbv4) { /* area to bottom of sb = N */ + if (sav2 == sbv1 && sav3 == sbv4) { /* Area to bottom of sb = N. */ return BKE_screen_find_edge(screen, sav2, sav3); } - if (sav3 == sbv2 && sav4 == sbv1) { /* area to left of sb = E */ + if (sav3 == sbv2 && sav4 == sbv1) { /* Area to left of sb = E. */ return BKE_screen_find_edge(screen, sav3, sav4); } - if (sav1 == sbv2 && sav4 == sbv3) { /* area on top of sb = S*/ + if (sav1 == sbv2 && sav4 == sbv3) { /* Area on top of sb = S. */ return BKE_screen_find_edge(screen, sav1, sav4); } @@ -5598,13 +5598,13 @@ static void SCREEN_OT_workspace_cycle(wmOperatorType *ot) /* called in spacetypes.c */ void ED_operatortypes_screen(void) { - /* generic UI stuff */ + /* Generic UI stuff. */ WM_operatortype_append(SCREEN_OT_actionzone); WM_operatortype_append(SCREEN_OT_repeat_last); WM_operatortype_append(SCREEN_OT_repeat_history); WM_operatortype_append(SCREEN_OT_redo_last); - /* screen tools */ + /* Screen tools. */ WM_operatortype_append(SCREEN_OT_area_move); WM_operatortype_append(SCREEN_OT_area_split); WM_operatortype_append(SCREEN_OT_area_join); @@ -5631,7 +5631,7 @@ void ED_operatortypes_screen(void) WM_operatortype_append(SCREEN_OT_space_context_cycle); WM_operatortype_append(SCREEN_OT_workspace_cycle); - /*frame changes*/ + /* Frame changes. */ WM_operatortype_append(SCREEN_OT_frame_offset); WM_operatortype_append(SCREEN_OT_frame_jump); WM_operatortype_append(SCREEN_OT_keyframe_jump); @@ -5641,7 +5641,7 @@ void ED_operatortypes_screen(void) WM_operatortype_append(SCREEN_OT_animation_play); WM_operatortype_append(SCREEN_OT_animation_cancel); - /* new/delete */ + /* New/delete. */ WM_operatortype_append(SCREEN_OT_new); WM_operatortype_append(SCREEN_OT_delete); } diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index fc08b7cd1b4..88140460f5b 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -391,7 +391,7 @@ typedef struct ProjPaintState { float *cavities; #ifndef PROJ_DEBUG_NOSEAMBLEED - /** store info about faces, if they are initialized etc*/ + /** Store info about faces, if they are initialized etc. */ ushort *faceSeamFlags; /** save the winding of the face in uv space, * helps as an extra validation step for seam detection. */ @@ -1073,7 +1073,7 @@ static bool pixel_bounds_uv(const float uv_quad[4][2], bounds_px->xmax = (int)(ibuf_x * max_uv[0]) + 1; bounds_px->ymax = (int)(ibuf_y * max_uv[1]) + 1; - /*printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]);*/ + // printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]); /* face uses no UV area when quantized to pixels? */ return (bounds_px->xmin == bounds_px->xmax || bounds_px->ymin == bounds_px->ymax) ? false : true; @@ -1103,7 +1103,7 @@ static bool pixel_bounds_array( bounds_px->xmax = (int)(ibuf_x * max_uv[0]) + 1; bounds_px->ymax = (int)(ibuf_y * max_uv[1]) + 1; - /*printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]);*/ + // printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]); /* face uses no UV area when quantized to pixels? */ return (bounds_px->xmin == bounds_px->xmax || bounds_px->ymin == bounds_px->ymax) ? false : true; @@ -1774,7 +1774,7 @@ static float project_paint_uvpixel_mask(const ProjPaintState *ps, } if (angle_cos <= ps->normal_angle__cos) { - /* outsize the normal limit*/ + /* Outsize the normal limit. */ return 0.0f; } if (angle_cos < ps->normal_angle_inner__cos) { @@ -1878,7 +1878,7 @@ static ProjPixel *project_paint_uvpixel_init(const ProjPaintState *ps, int x_tile, y_tile; int x_round, y_round; int tile_offset; - /* volatile is important here to ensure pending check is not optimized away by compiler*/ + /* Volatile is important here to ensure pending check is not optimized away by compiler. */ volatile int tile_index; ProjPaintImage *projima = tinf->pjima; @@ -2063,7 +2063,7 @@ static bool line_clip_rect2f(const rctf *cliprect, return false; } - /* this is a single point (or close to)*/ + /* This is a single point (or close to). */ if (fabsf(l1[0] - l2[0]) < PROJ_PIXEL_TOLERANCE) { if (BLI_rctf_isect_pt_v(rect, l1)) { copy_v2_v2(l1_clip, l1); @@ -2090,7 +2090,7 @@ static bool line_clip_rect2f(const rctf *cliprect, return false; } - /* this is a single point (or close to)*/ + /* This is a single point (or close to). */ if (fabsf(l1[1] - l2[1]) < PROJ_PIXEL_TOLERANCE) { if (BLI_rctf_isect_pt_v(rect, l1)) { copy_v2_v2(l1_clip, l1); @@ -2678,7 +2678,7 @@ static void project_bucket_clip_face(const bool is_ortho, /* calc center */ float cent[2] = {0.0f, 0.0f}; - /*float up[2] = {0.0f, 1.0f};*/ + // float up[2] = {0.0f, 1.0f}; bool doubles; (*tot) = 0; @@ -3065,7 +3065,7 @@ static void project_paint_face_init(const ProjPaintState *ps, v2coSS = ps->screenCoords[lt_vtri[1]]; v3coSS = ps->screenCoords[lt_vtri[2]]; - /* This function gives is a concave polyline in UV space from the clipped tri*/ + /* This function gives is a concave polyline in UV space from the clipped tri. */ project_bucket_clip_face(is_ortho, is_flip_object, clip_rect, @@ -4430,7 +4430,7 @@ static void project_paint_prepare_all_faces(ProjPaintState *ps, } } - /* build an array of images we use*/ + /* Build an array of images we use. */ if (ps->is_shared_user == false) { project_paint_build_proj_ima(ps, arena, &used_images); } @@ -4770,7 +4770,7 @@ static bool project_bucket_iter_next(ProjPaintState *ps, BLI_assert(bucket_y >= ps->bucketMin[1] && bucket_y < ps->bucketMax[1]); if (bucket_x >= ps->bucketMin[0] && bucket_x < ps->bucketMax[0]) { - /* use bucket_bounds for project_bucket_isect_circle and project_bucket_init*/ + /* Use bucket_bounds for #project_bucket_isect_circle and #project_bucket_init. */ project_bucket_bounds(ps, bucket_x, bucket_y, bucket_bounds); if ((ps->source != PROJ_SRC_VIEW) || @@ -5356,7 +5356,7 @@ static void do_projectpaint_thread(TaskPool *__restrict UNUSED(pool), void *ph_v dist_sq = len_squared_v2v2(projPixel->projCoSS, pos); - /*if (dist < radius) {*/ /* correct but uses a sqrtf */ + /* Faster alternative to `dist < radius` without a #sqrtf. */ if (dist_sq <= brush_radius_sq) { dist = sqrtf(dist_sq); @@ -5814,7 +5814,7 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps, int ps->is_maskbrush = (brush->mask_mtex.tex) ? true : false; } else { - /* brush may be NULL*/ + /* Brush may be NULL. */ ps->do_masking = false; ps->is_texbrush = false; ps->is_maskbrush = false; diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index fed89e02e8f..e2b21145c2d 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -62,7 +62,7 @@ /* Brush operators */ static int brush_add_exec(bContext *C, wmOperator *UNUSED(op)) { - /*int type = RNA_enum_get(op->ptr, "type");*/ + // int type = RNA_enum_get(op->ptr, "type"); Paint *paint = BKE_paint_get_active_from_context(C); Brush *br = BKE_paint_brush(paint); Main *bmain = CTX_data_main(C); @@ -97,7 +97,7 @@ static void BRUSH_OT_add(wmOperatorType *ot) static int brush_add_gpencil_exec(bContext *C, wmOperator *UNUSED(op)) { - /*int type = RNA_enum_get(op->ptr, "type");*/ + // int type = RNA_enum_get(op->ptr, "type"); ToolSettings *ts = CTX_data_tool_settings(C); Paint *paint = &ts->gp_paint->paint; Brush *br = BKE_paint_brush(paint); @@ -1385,7 +1385,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf) keymap = WM_keymap_ensure(keyconf, "Weight Paint", 0, 0); keymap->poll = weight_paint_mode_poll; - /*Weight paint's Vertex Selection Mode */ + /* Weight paint's Vertex Selection Mode. */ keymap = WM_keymap_ensure(keyconf, "Paint Vertex Selection (Weight, Vertex)", 0, 0); keymap->poll = vert_paint_poll; diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 0a5f1975361..fe36d62b832 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2750,11 +2750,11 @@ static bool vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const f * if not we can skip face map trickiness */ if (vertex_paint_use_fast_update_check(ob)) { vpd->use_fast_update = true; - /* printf("Fast update!\n");*/ + // printf("Fast update!\n"); } else { vpd->use_fast_update = false; - /* printf("No fast update!\n");*/ + // printf("No fast update!\n"); } /* to keep tracked of modified loops for shared vertex color blending */ diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index b39fbe5ba1a..43704c73faf 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -623,7 +623,7 @@ typedef struct SculptUndoNode { SculptUndoType type; - char idname[MAX_ID_NAME]; /* name instead of pointer*/ + char idname[MAX_ID_NAME]; /* Name instead of pointer. */ void *node; /* only during push, not valid afterwards! */ float (*co)[3]; diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c index 2825639bb3d..771e0e1e47b 100644 --- a/source/blender/editors/sculpt_paint/sculpt_uv.c +++ b/source/blender/editors/sculpt_paint/sculpt_uv.c @@ -92,7 +92,7 @@ typedef struct UVInitialStroke { /* Initial Selection,for grab brushes for instance */ UVInitialStrokeElement *initialSelection; - /* total initially selected UVs*/ + /* Total initially selected UV's. */ int totalInitialSelected; /* initial mouse coordinates */ @@ -505,7 +505,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm bool do_island_optimization = !(ts->uv_sculpt_settings & UV_SCULPT_ALL_ISLANDS); int island_index = 0; - /* Holds, for each UvElement in elementMap, a pointer to its unique uv.*/ + /* Holds, for each UvElement in elementMap, a pointer to its unique UV. */ int *uniqueUv; data->tool = (RNA_enum_get(op->ptr, "mode") == BRUSH_STROKE_SMOOTH) ? UV_SCULPT_TOOL_RELAX : @@ -603,7 +603,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm data->uv[counter].flag = 0; data->uv[counter].uv = luv->uv; } - /* pointer arithmetic to the rescue, as always :)*/ + /* Pointer arithmetic to the rescue, as always :). */ uniqueUv[element - data->elementMap->buf] = counter; } } diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index eea895297f2..ae9d5445e1d 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -163,7 +163,7 @@ void ACTION_OT_markers_make_local(wmOperatorType *ot) /* *************************** Calculate Range ************************** */ -/* Get the min/max keyframes*/ +/* Get the min/max keyframes. */ static bool get_keyframe_extents(bAnimContext *ac, float *min, float *max, const short onlySel) { ListBase anim_data = {NULL, NULL}; diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 2ab109c738d..a51d9086dea 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -1840,7 +1840,7 @@ static int actkeys_clickselect_exec(bContext *C, wmOperator *op) mval[0] = RNA_int_get(op->ptr, "mouse_x"); mval[1] = RNA_int_get(op->ptr, "mouse_y"); - /* select keyframe(s) based upon mouse position*/ + /* Select keyframe(s) based upon mouse position. */ ret_value = mouse_action_keys( &ac, mval, selectmode, deselect_all, column, channel, wait_to_deselect_others); diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 8772af1d98b..222d25b7d75 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -1273,7 +1273,7 @@ ID *buttons_context_id_path(const bContext *C) for (int i = path->len - 1; i >= 0; i--) { PointerRNA *ptr = &path->ptr[i]; - /* pin particle settings instead of system, since only settings are an idblock*/ + /* Pin particle settings instead of system, since only settings are an idblock. */ if (sbuts->mainb == BCONTEXT_PARTICLE && sbuts->flag & SB_PIN_CONTEXT) { if (ptr->type == &RNA_ParticleSystem && ptr->data) { ParticleSystem *psys = ptr->data; @@ -1281,7 +1281,7 @@ ID *buttons_context_id_path(const bContext *C) } } - /* There is no valid image ID panel, Image Empty objects need this workaround.*/ + /* There is no valid image ID panel, Image Empty objects need this workaround. */ if (sbuts->mainb == BCONTEXT_DATA && sbuts->flag & SB_PIN_CONTEXT) { if (ptr->type == &RNA_Image && ptr->data) { continue; diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index 05595e0b393..9b4b020b276 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -747,7 +747,7 @@ static int console_clear_exec(bContext *C, wmOperator *op) const bool scrollback = RNA_boolean_get(op->ptr, "scrollback"); const bool history = RNA_boolean_get(op->ptr, "history"); - /*ConsoleLine *ci = */ console_history_verify(C); + /* ConsoleLine *ci = */ console_history_verify(C); if (scrollback) { /* Last item in history. */ while (sc->scrollback.first) { diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c index afa85d183d8..7032d55b331 100644 --- a/source/blender/editors/space_file/file_panels.c +++ b/source/blender/editors/space_file/file_panels.c @@ -72,7 +72,7 @@ static void file_panel_operator(const bContext *C, Panel *panel) UI_block_func_set(uiLayoutGetBlock(panel->layout), file_draw_check_cb, NULL, NULL); - /* Hack: temporary hide.*/ + /* Hack: temporary hide. */ const char *hide[] = {"filepath", "files", "directory", "filename"}; for (int i = 0; i < ARRAY_SIZE(hide); i++) { PropertyRNA *prop = RNA_struct_find_property(op->ptr, hide[i]); @@ -84,7 +84,7 @@ static void file_panel_operator(const bContext *C, Panel *panel) uiTemplateOperatorPropertyButs( C, panel->layout, op, UI_BUT_LABEL_ALIGN_NONE, UI_TEMPLATE_OP_PROPS_SHOW_EMPTY); - /* Hack: temporary hide.*/ + /* Hack: temporary hide. */ for (int i = 0; i < ARRAY_SIZE(hide); i++) { PropertyRNA *prop = RNA_struct_find_property(op->ptr, hide[i]); if (prop) { diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index dc237c1340a..0d2a436902a 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -1251,7 +1251,7 @@ static void graph_draw_driver_debug(bAnimContext *ac, ID *id, FCurve *fcu) float x = driver->curval; float y = fcu->curval * unitfac; - /* only draw indicators if the point is in range*/ + /* Only draw indicators if the point is in range. */ if (x >= v2d->cur.xmin) { float co[2]; diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index a2e812a4ed1..be577e9ab13 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -3007,7 +3007,7 @@ static int graph_driver_delete_invalid_exec(bContext *C, wmOperator *op) WM_report(RPT_INFO, "No drivers deleted"); } - /* Successful or not?*/ + /* Successful or not? */ if (!ok) { return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_graph/graph_slider_ops.c b/source/blender/editors/space_graph/graph_slider_ops.c index 4174e1c63ae..10629caa8b0 100644 --- a/source/blender/editors/space_graph/graph_slider_ops.c +++ b/source/blender/editors/space_graph/graph_slider_ops.c @@ -50,7 +50,7 @@ /* ******************** GRAPH SLIDER OPERATORS ************************* */ /* This file contains a collection of operators to modify keyframes in the graph editor. All * operators are modal and use a slider that allows the user to define a percentage to modify the - * operator.*/ + * operator. */ /* ******************** Decimate Keyframes Operator ************************* */ @@ -91,7 +91,7 @@ typedef struct tDecimateGraphOp { /** A 0-1 value for determining how much we should decimate. */ PropertyRNA *percentage_prop; - /** The original bezt curve data (used for restoring fcurves).*/ + /** The original bezt curve data (used for restoring fcurves). */ ListBase bezt_arr_list; NumInput num; @@ -318,7 +318,7 @@ static int graphkeys_decimate_modal(bContext *C, wmOperator *op, const wmEvent * /* This assumes that we are in "DECIM_RATIO" mode. This is because the error margin is very hard * and finicky to control with this modal mouse grab method. Therefore, it is expected that the * error margin mode is not adjusted by the modal operator but instead tweaked via the redo - * panel.*/ + * panel. */ tDecimateGraphOp *dgo = op->customdata; const bool has_numinput = hasNumInput(&dgo->num); diff --git a/source/blender/editors/space_graph/graph_view.c b/source/blender/editors/space_graph/graph_view.c index cde0dab3503..ca14f7c5942 100644 --- a/source/blender/editors/space_graph/graph_view.c +++ b/source/blender/editors/space_graph/graph_view.c @@ -137,7 +137,7 @@ void get_graph_keyframe_extents(bAnimContext *ac, } } - /* Ensure that the extents are not too extreme that view implodes...*/ + /* Ensure that the extents are not too extreme that view implodes. */ if (foundBounds) { if ((xmin && xmax) && (fabsf(*xmax - *xmin) < 0.001f)) { *xmin -= 0.0005f; @@ -269,7 +269,7 @@ static int graphkeys_viewall(bContext *C, BLI_rctf_scale(&cur_new, 1.1f); /* Take regions into account, that could block the view. - * Marker region is supposed to be larger than the scroll-bar, so prioritize it.*/ + * Marker region is supposed to be larger than the scroll-bar, so prioritize it. */ float pad_top = UI_TIME_SCRUB_MARGIN_Y; float pad_bottom = BLI_listbase_is_empty(ED_context_get_markers(C)) ? V2D_SCROLL_HANDLE_HEIGHT : UI_MARKER_MARGIN_Y; diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 3ebf58a2119..32496cb8f1f 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -588,7 +588,7 @@ static void graph_listener(const wmSpaceTypeListenerParams *params) ED_area_tag_refresh(area); break; case ND_TRANSFORM: - break; /*do nothing*/ + break; /* Do nothing. */ default: /* just redrawing the view will do */ ED_area_tag_redraw(area); diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 9e2bd1448b2..193c35d10a2 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -3870,7 +3870,7 @@ static void tile_fill_init(PointerRNA *ptr, Image *ima, ImageTile *tile) /* Acquire ibuf to get the default values. * If the specified tile has no ibuf, try acquiring the main tile instead - * (unless the specified tile already was the main tile).*/ + * (unless the specified tile already was the main tile). */ ImBuf *ibuf = BKE_image_acquire_ibuf(ima, &iuser, NULL); if (ibuf == NULL && (tile != NULL) && (tile->tile_number != 1001)) { ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL); diff --git a/source/blender/editors/space_image/image_undo.c b/source/blender/editors/space_image/image_undo.c index 09e30298e79..082f66b57af 100644 --- a/source/blender/editors/space_image/image_undo.c +++ b/source/blender/editors/space_image/image_undo.c @@ -1041,7 +1041,7 @@ ListBase *ED_image_paint_tile_list_get(void) return &us->paint_tiles; } -/* restore painting image to previous state. Used for anchored and drag-dot style brushes*/ +/* Restore painting image to previous state. Used for anchored and drag-dot style brushes. */ void ED_image_undo_restore(UndoStep *us) { ListBase *paint_tiles = &((ImageUndoStep *)us)->paint_tiles; diff --git a/source/blender/editors/space_info/info_report.c b/source/blender/editors/space_info/info_report.c index 7dd8382c8ef..a3da50709df 100644 --- a/source/blender/editors/space_info/info_report.c +++ b/source/blender/editors/space_info/info_report.c @@ -360,7 +360,7 @@ void INFO_OT_report_delete(wmOperatorType *ot) ot->exec = report_delete_exec; /* flags */ - /*ot->flag = OPTYPE_REGISTER;*/ + // ot->flag = OPTYPE_REGISTER; /* properties */ } @@ -404,7 +404,7 @@ void INFO_OT_report_copy(wmOperatorType *ot) ot->exec = report_copy_exec; /* flags */ - /*ot->flag = OPTYPE_REGISTER;*/ + // ot->flag = OPTYPE_REGISTER; /* properties */ } diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc index 72fe786ad83..1c7ee9e622f 100644 --- a/source/blender/editors/space_node/drawnode.cc +++ b/source/blender/editors/space_node/drawnode.cc @@ -217,7 +217,7 @@ static void node_buts_texture(uiLayout *layout, bContext *UNUSED(C), PointerRNA uiItemR(layout, ptr, "texture", DEFAULT_FLAGS, "", ICON_NONE); if (multi) { - /* Number Drawing not optimal here, better have a list*/ + /* Number Drawing not optimal here, better have a list. */ uiItemR(layout, ptr, "node_output", DEFAULT_FLAGS, "", ICON_NONE); } } @@ -1833,9 +1833,11 @@ static void node_composit_buts_chroma_matte(uiLayout *layout, bContext *UNUSED(C uiItemR(col, ptr, "threshold", DEFAULT_FLAGS, nullptr, ICON_NONE); col = uiLayoutColumn(layout, true); - /*uiItemR(col, ptr, "lift", UI_ITEM_R_SLIDER, nullptr, ICON_NONE); Removed for now */ + /* Removed for now. */ + // uiItemR(col, ptr, "lift", UI_ITEM_R_SLIDER, nullptr, ICON_NONE); uiItemR(col, ptr, "gain", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, nullptr, ICON_NONE); - /*uiItemR(col, ptr, "shadow_adjust", UI_ITEM_R_SLIDER, nullptr, ICON_NONE); Removed for now*/ + /* Removed for now. */ + // uiItemR(col, ptr, "shadow_adjust", UI_ITEM_R_SLIDER, nullptr, ICON_NONE); } static void node_composit_buts_color_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) @@ -3528,7 +3530,7 @@ static void std_node_socket_draw( bNode *node = (bNode *)node_ptr->data; bNodeSocket *sock = (bNodeSocket *)ptr->data; int type = sock->typeinfo->type; - /*int subtype = sock->typeinfo->subtype;*/ + // int subtype = sock->typeinfo->subtype; /* XXX not nice, eventually give this node its own socket type ... */ if (node->type == CMP_NODE_OUTPUT_FILE) { diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc index b5ef250f5a9..4bacf319f7c 100644 --- a/source/blender/editors/space_node/node_edit.cc +++ b/source/blender/editors/space_node/node_edit.cc @@ -1130,7 +1130,7 @@ static bool cursor_isect_multi_input_socket(const float cursor[2], const bNodeSo { const float node_socket_height = node_socket_calculate_height(socket); rctf multi_socket_rect; - /*.xmax = socket->locx + NODE_SOCKSIZE * 5.5f + /* `.xmax = socket->locx + NODE_SOCKSIZE * 5.5f` * would be the same behavior as for regular sockets. * But keep it smaller because for multi-input socket you * sometimes want to drag the link to the other side, if you may @@ -2310,7 +2310,7 @@ static int ntree_socket_add_exec(bContext *C, wmOperator *op) sock = ntreeInsertSocketInterface( ntree, in_out, active_sock->idname, active_sock->next, active_sock->name); /* XXX this only works for actual sockets, not interface templates! */ - /*nodeSocketCopyValue(sock, &ntree_ptr, active_sock, &ntree_ptr);*/ + // nodeSocketCopyValue(sock, &ntree_ptr, active_sock, &ntree_ptr); } else { /* XXX TODO define default socket type for a tree! */ diff --git a/source/blender/editors/space_node/node_group.cc b/source/blender/editors/space_node/node_group.cc index 851d386ad0d..d7541d8f512 100644 --- a/source/blender/editors/space_node/node_group.cc +++ b/source/blender/editors/space_node/node_group.cc @@ -926,7 +926,7 @@ static void node_group_make_insert_selected(const bContext *C, bNodeTree *ntree, } } - /* expose all unlinked sockets too but only the visible ones*/ + /* Expose all unlinked sockets too but only the visible ones. */ if (expose_visible) { LISTBASE_FOREACH (bNode *, node, &ngroup->nodes) { if (node_group_make_use_node(node, gnode)) { diff --git a/source/blender/editors/space_outliner/tree/tree_display_libraries.cc b/source/blender/editors/space_outliner/tree/tree_display_libraries.cc index 91b690d35fa..c6b700318dd 100644 --- a/source/blender/editors/space_outliner/tree/tree_display_libraries.cc +++ b/source/blender/editors/space_outliner/tree/tree_display_libraries.cc @@ -138,8 +138,8 @@ TreeElement *TreeDisplayLibraries::add_library_contents(Main &mainvar, } } - /* We always want to create an entry for libraries, even if/when we have no more IDs from - * them. This invalid state is important to show to user as well.*/ + /* We always want to create an entry for libraries, even if/when we have no more IDs from them. + * This invalid state is important to show to user as well. */ if (id != nullptr || is_library) { if (!tenlib) { /* Create library tree element on demand, depending if there are any data-blocks. */ diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c index 4ce0e454df8..897af9ae931 100644 --- a/source/blender/editors/space_script/space_script.c +++ b/source/blender/editors/space_script/space_script.c @@ -81,7 +81,7 @@ static void script_free(SpaceLink *sl) SpaceScript *sscript = (SpaceScript *)sl; #ifdef WITH_PYTHON - /*free buttons references*/ + /* Free buttons references. */ if (sscript->but_refs) { sscript->but_refs = NULL; } diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 17831c95575..1d8bc427212 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -938,7 +938,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *region, rcti *scroll, rcti *b hlstart = barstart + barheight; } else if (lhlend > st->top && lhlstart < st->top && hlstart > barstart) { - /*fill out start */ + /* Fill out start. */ hlstart = barstart; } diff --git a/source/blender/editors/space_text/text_format_pov.c b/source/blender/editors/space_text/text_format_pov.c index a68632c0d56..1200dda7533 100644 --- a/source/blender/editors/space_text/text_format_pov.c +++ b/source/blender/editors/space_text/text_format_pov.c @@ -644,7 +644,7 @@ static int txtfmt_pov_find_specialvar(const char *string) } else if (STR_LITERAL_STARTSWITH(string, "ratio", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "open", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "ior", len)) { i = len; - /* Light Types and options*/ + /* Light Types and options. */ } else if (STR_LITERAL_STARTSWITH(string, "area_light", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "looks_like", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "fade_power", len)) { i = len; @@ -654,7 +654,7 @@ static int txtfmt_pov_find_specialvar(const char *string) } else if (STR_LITERAL_STARTSWITH(string, "point_at", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "falloff", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "radius", len)) { i = len; - /* Camera Types and options*/ + /* Camera Types and options. */ } else if (STR_LITERAL_STARTSWITH(string, "omni_directional_stereo", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "lambert_cylindrical", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "miller_cylindrical", len)) { i = len; diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 9ec759ce4ae..6ca89250cd7 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -2782,8 +2782,7 @@ void TEXT_OT_scroll(wmOperatorType *ot) /* identifiers */ ot->name = "Scroll"; /* don't really see the difference between this and - * scroll_bar. Both do basically the same thing (aside - * from keymaps).*/ + * scroll_bar. Both do basically the same thing (aside from key-maps). */ ot->idname = "TEXT_OT_scroll"; /* api callbacks */ @@ -2889,8 +2888,7 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot) /* identifiers */ ot->name = "Scrollbar"; /* don't really see the difference between this and - * scroll. Both do basically the same thing (aside - * from keymaps).*/ + * scroll. Both do basically the same thing (aside from key-maps). */ ot->idname = "TEXT_OT_scroll_bar"; /* api callbacks */ diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 02ed9f6d791..0e5df3a0cdd 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -1833,7 +1833,7 @@ static bool bone_mouse_select_menu(bContext *C, continue; } /* We can hit a bone multiple times, so make sure we are not adding an already included bone - * to the list.*/ + * to the list. */ const bool is_duplicate_bone = BLI_gset_haskey(added_bones, bone_ptr); if (!is_duplicate_bone) { diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 72c62321e88..6dec3cc818a 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -155,7 +155,7 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op)) /* Get location of grid point in pose space. */ BKE_armature_loc_pose_to_bone(pchan_eval, vec, vec); - /* adjust location on the original pchan*/ + /* Adjust location on the original pchan. */ bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, pchan_eval->name); if ((pchan->protectflag & OB_LOCK_LOCX) == 0) { pchan->loc[0] = vec[0]; diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index e17acd2f9c8..a2d50c43bd2 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -85,7 +85,7 @@ struct SmoothView3DState { }; struct SmoothView3DStore { - /* source*/ + /* Source. */ struct SmoothView3DState src; /* source */ struct SmoothView3DState dst; /* destination */ struct SmoothView3DState org; /* original */ diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 2b26ef3b3e4..2df0d86d02b 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -423,7 +423,7 @@ typedef struct TransCenterData { * (typically in transform_conversion.c). */ typedef struct TransCustomDataContainer { - /** Owned by the mode (grab, scale, bend... ).*/ + /** Owned by the mode (grab, scale, bend... ). */ union { TransCustomData mode, first_elem; }; diff --git a/source/blender/editors/transform/transform_convert_action.c b/source/blender/editors/transform/transform_convert_action.c index 3c302aac954..deb64ca2892 100644 --- a/source/blender/editors/transform/transform_convert_action.c +++ b/source/blender/editors/transform/transform_convert_action.c @@ -191,7 +191,7 @@ static TransData *ActionFCurveToTransData(TransData *td, td->flag |= TD_SELECTED; } - /*set flags to move handles as necessary*/ + /* Set flags to move handles as necessary. */ td->flag |= TD_MOVEHANDLE1 | TD_MOVEHANDLE2; td2d->h1 = bezt->vec[0]; td2d->h2 = bezt->vec[2]; diff --git a/source/blender/editors/transform/transform_convert_gpencil.c b/source/blender/editors/transform/transform_convert_gpencil.c index 4932a5f8d23..f7b78b10868 100644 --- a/source/blender/editors/transform/transform_convert_gpencil.c +++ b/source/blender/editors/transform/transform_convert_gpencil.c @@ -176,7 +176,7 @@ static void createTransGPencil_curves(bContext *C, } } - /* If not multiedit out of loop. */ + /* If not multi-edit out of loop. */ if (!is_multiedit) { break; } @@ -382,7 +382,7 @@ static void createTransGPencil_curves(bContext *C, } } - /* If not multiedit out of loop. */ + /* If not multi-edit out of loop. */ if (!is_multiedit) { break; } @@ -470,7 +470,7 @@ static void createTransGPencil_strokes(bContext *C, } } } - /* If not multiedit out of loop. */ + /* If not multi-edit out of loop. */ if (!is_multiedit) { break; } @@ -674,7 +674,7 @@ static void createTransGPencil_strokes(bContext *C, } } } - /* if not multiedit out of loop */ + /* If not multi-edit out of loop. */ if (!is_multiedit) { break; } diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c index 7a780df0def..080a19cce1f 100644 --- a/source/blender/editors/transform/transform_gizmo_3d.c +++ b/source/blender/editors/transform/transform_gizmo_3d.c @@ -521,7 +521,7 @@ static void protectflag_to_drawflags_pchan(RegionView3D *rv3d, } } -/* for editmode*/ +/* For editmode. */ static void protectflag_to_drawflags_ebone(RegionView3D *rv3d, const EditBone *ebo) { if (ebo->flag & BONE_EDITMODE_LOCKED) { diff --git a/source/blender/editors/transform/transform_mode_edge_slide.c b/source/blender/editors/transform/transform_mode_edge_slide.c index 93d58b8dbe4..6134c8a98f5 100644 --- a/source/blender/editors/transform/transform_mode_edge_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_slide.c @@ -375,8 +375,8 @@ static void calcEdgeSlide_mval_range(TransInfo *t, UNUSED_VARS_NDEBUG(sv_table); /* silence warning */ BLI_assert(i == sv_table[BM_elem_index_get(v)]); - /* search cross edges for visible edge to the mouse cursor, - * then use the shared vertex to calculate screen vector*/ + /* Search cross edges for visible edge to the mouse cursor, + * then use the shared vertex to calculate screen vector. */ BM_ITER_ELEM (e, &iter_other, v, BM_EDGES_OF_VERT) { /* screen-space coords */ float sco_a[3], sco_b[3]; @@ -540,7 +540,7 @@ static EdgeSlideData *createEdgeSlideVerts_double_side(TransInfo *t, TransDataCo sld->curr_sv_index = 0; - /*ensure valid selection*/ + /* Ensure valid selection. */ BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) { if (BM_elem_flag_test(v, BM_ELEM_SELECT)) { BMIter iter2; @@ -548,7 +548,7 @@ static EdgeSlideData *createEdgeSlideVerts_double_side(TransInfo *t, TransDataCo BM_ITER_ELEM (e, &iter2, v, BM_EDGES_OF_VERT) { if (BM_elem_flag_test(e, BM_ELEM_SELECT)) { /* BMESH_TODO: this is probably very evil, - * set v->e to a selected edge*/ + * set `v->e` to a selected edge. */ v->e = e; numsel++; @@ -640,10 +640,10 @@ static EdgeSlideData *createEdgeSlideVerts_double_side(TransInfo *t, TransDataCo v_first = v; - /*walk along the edge loop*/ + /* Walk along the edge loop. */ e = v->e; - /*first, rewind*/ + /* First, rewind. */ do { e = get_other_edge(v, e); if (!e) { @@ -709,7 +709,7 @@ static EdgeSlideData *createEdgeSlideVerts_double_side(TransInfo *t, TransDataCo STACK_PUSH_RET_PTR(sv_array)) : \ (&sv_array[sv_table[BM_elem_index_get(v)]])) - /*iterate over the loop*/ + /* Iterate over the loop. */ v_first = v; do { bool l_a_ok_prev; diff --git a/source/blender/editors/util/ed_transverts.c b/source/blender/editors/util/ed_transverts.c index c1d0dcdb095..b4a93eb996c 100644 --- a/source/blender/editors/util/ed_transverts.c +++ b/source/blender/editors/util/ed_transverts.c @@ -182,8 +182,8 @@ static void set_mapped_co(void *vuserdata, if (BM_elem_index_get(eve) != TM_INDEX_SKIP) { tv = &tv[BM_elem_index_get(eve)]; - /* be clever, get the closest vertex to the original, - * behaves most logically when the mirror modifier is used for eg T33051*/ + /* Be clever, get the closest vertex to the original, + * behaves most logically when the mirror modifier is used for eg T33051. */ if ((tv->flag & TX_VERT_USE_MAPLOC) == 0) { /* first time */ copy_v3_v3(tv->maploc, co); diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index e18bbe0d7c2..2f88e50492f 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -608,7 +608,7 @@ static void uv_weld_align(bContext *C, eUVWeldAlign tool) /* Projection of point (x, y) over line (x1, y1, x2, y2) along X axis: * new_y = (y2 - y1) / (x2 - x1) * (x - x1) + y1 * Maybe this should be a BLI func? Or is it already existing? - * Could use interp_v2_v2v2, but not sure it's worth it here...*/ + * Could use interp_v2_v2v2, but not sure it's worth it here. */ if (tool_local == UV_STRAIGHTEN_X) { luv->uv[0] = a * (luv->uv[1] - uv_start[1]) + uv_start[0]; } @@ -1187,15 +1187,15 @@ static bool uv_snap_uvs_to_adjacent_unselected(Scene *scene, Object *obedit) } BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) { - if (BM_elem_flag_test(f, BM_ELEM_TAG)) { /* face: visible */ + if (BM_elem_flag_test(f, BM_ELEM_TAG)) { /* Face: visible. */ BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) { - if (BM_elem_flag_test(l, BM_ELEM_TAG)) { /* loop: selected*/ + if (BM_elem_flag_test(l, BM_ELEM_TAG)) { /* Loop: selected. */ float uv[2] = {0.0f, 0.0f}; int uv_tot = 0; BM_ITER_ELEM (lsub, &lsubiter, l->v, BM_LOOPS_OF_VERT) { - if (BM_elem_flag_test(lsub->f, BM_ELEM_TAG) && /* face: visible. */ - !BM_elem_flag_test(lsub, BM_ELEM_TAG)) /* loop: unselected. */ + if (BM_elem_flag_test(lsub->f, BM_ELEM_TAG) && /* Face: visible. */ + !BM_elem_flag_test(lsub, BM_ELEM_TAG)) /* Loop: unselected. */ { luv = BM_ELEM_CD_GET_VOID_P(lsub, cd_loop_uv_offset); add_v2_v2(uv, luv->uv); diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index 7d82884760c..eb4ca2e13b2 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -82,10 +82,10 @@ typedef struct PVert { struct PVert *nextlink; union PVertUnion { - PHashKey key; /* construct */ - int id; /* abf/lscm matrix index */ - float distortion; /* area smoothing */ - HeapNode *heaplink; /* edge collapsing */ + PHashKey key; /* Construct. */ + int id; /* ABF/LSCM matrix index. */ + float distortion; /* Area smoothing. */ + HeapNode *heaplink; /* Edge collapsing. */ } u; struct PEdge *edge; @@ -99,10 +99,10 @@ typedef struct PEdge { struct PEdge *nextlink; union PEdgeUnion { - PHashKey key; /* construct */ - int id; /* abf matrix index */ - HeapNode *heaplink; /* fill holes */ - struct PEdge *nextcollapse; /* simplification */ + PHashKey key; /* Construct. */ + int id; /* ABF matrix index. */ + HeapNode *heaplink; /* Fill holes. */ + struct PEdge *nextcollapse; /* Simplification. */ } u; struct PVert *vert; @@ -118,10 +118,10 @@ typedef struct PFace { struct PFace *nextlink; union PFaceUnion { - PHashKey key; /* construct */ - int chart; /* construct splitting*/ - float area3d; /* stretch */ - int id; /* abf matrix index */ + PHashKey key; /* Construct. */ + int chart; /* Construct splitting. */ + float area3d; /* Stretch. */ + int id; /* ABF matrix index. */ } u; struct PEdge *edge; diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 0918717e051..71656784947 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -76,7 +76,7 @@ typedef struct StitchPreviewer { float *preview_polys; /* uvs per polygon. */ uint *uvs_per_polygon; - /*number of preview polygons */ + /* Number of preview polygons. */ uint num_polys; /* preview data. These will be either the previewed vertices or edges * depending on stitch mode settings */ @@ -1817,7 +1817,7 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), void /* Closing line */ GPU_vertbuf_attr_set(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index]); - /* j = uvs_per_polygon[i] - 1*/ + /* `j = uvs_per_polygon[i] - 1` */ GPU_vertbuf_attr_set( vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + j * 2]); @@ -1979,7 +1979,7 @@ static StitchState *stitch_init(bContext *C, counter++; state->uvs[counter] = element; } - /* pointer arithmetic to the rescue, as always :)*/ + /* Pointer arithmetic to the rescue, as always :). */ map[element - state->element_map->buf] = counter; } } diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 87ae112a237..ae02097707c 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -498,7 +498,7 @@ static ParamHandle *construct_param_handle_subsurfed(const Scene *scene, /* pointers to modifier data for unwrap control */ ModifierData *md; SubsurfModifierData *smd_real; - /* modifier initialization data, will control what type of subdivision will happen*/ + /* Modifier initialization data, will control what type of subdivision will happen. */ SubsurfModifierData smd = {{NULL}}; /* Used to hold subsurfed Mesh */ DerivedMesh *derivedMesh, *initialDerived; @@ -509,7 +509,7 @@ static ParamHandle *construct_param_handle_subsurfed(const Scene *scene, MEdge *subsurfedEdges; MPoly *subsurfedPolys; MLoop *subsurfedLoops; - /* number of vertices and faces for subsurfed mesh*/ + /* Number of vertices and faces for subsurfed mesh. */ int numOfEdges, numOfFaces; /* holds a map to editfaces for every subsurfed MFace. @@ -1367,7 +1367,7 @@ static void uv_map_rotation_matrix_ex(float result[4][4], rotup[2][2] = cosf(upangle) / radius; rotup[0][0] = 1.0f / radius; - /* calculate transforms*/ + /* Calculate transforms. */ mul_m4_series(result, rotup, rotside, viewmatrix, rotobj); } @@ -2905,7 +2905,7 @@ void ED_uvedit_add_simple_uvs(Main *bmain, const Scene *scene, Object *ob) /* select all uv loops first - pack parameters needs this to make sure charts are registered */ ED_uvedit_select_all(bm); uvedit_unwrap_cube_project(bm, 1.0, false, NULL); - /* set the margin really quickly before the packing operation*/ + /* Set the margin really quickly before the packing operation. */ scene->toolsettings->uvcalc_margin = 0.001f; uvedit_pack_islands(scene, ob, bm); BM_mesh_bm_to_me(bmain, bm, me, (&(struct BMeshToMeshParams){0})); diff --git a/source/blender/freestyle/intern/geometry/SweepLine.h b/source/blender/freestyle/intern/geometry/SweepLine.h index ac3417a1afe..1beae73b68a 100644 --- a/source/blender/freestyle/intern/geometry/SweepLine.h +++ b/source/blender/freestyle/intern/geometry/SweepLine.h @@ -30,7 +30,7 @@ namespace Freestyle { -/** Class to define the intersection between two segments*/ +/** Class to define the intersection between two segments. */ template class Intersection { public: template Intersection(EdgeClass *eA, real ta, EdgeClass *eB, real tb) diff --git a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h index 2b1adfc179c..17f922de467 100644 --- a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h +++ b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h @@ -33,7 +33,7 @@ namespace Freestyle { class IndexedFaceSet : public Rep { public: - /** Triangles description style:*/ + /** Triangles description style: */ enum TRIANGLES_STYLE { TRIANGLE_STRIP, TRIANGLE_FAN, diff --git a/source/blender/freestyle/intern/scene_graph/LineRep.h b/source/blender/freestyle/intern/scene_graph/LineRep.h index 3a48f175bfd..02725102001 100644 --- a/source/blender/freestyle/intern/scene_graph/LineRep.h +++ b/source/blender/freestyle/intern/scene_graph/LineRep.h @@ -134,7 +134,7 @@ class LineRep : public Rep { v.visitLineRep(*this); } - /** Computes the line bounding box.*/ + /** Computes the line bounding box. */ virtual void ComputeBBox(); private: diff --git a/source/blender/freestyle/intern/scene_graph/TriangleRep.h b/source/blender/freestyle/intern/scene_graph/TriangleRep.h index a29ecbd4979..e3f221567b0 100644 --- a/source/blender/freestyle/intern/scene_graph/TriangleRep.h +++ b/source/blender/freestyle/intern/scene_graph/TriangleRep.h @@ -136,7 +136,7 @@ class TriangleRep : public Rep { v.visitTriangleRep(*this); } - /** Computes the triangle bounding box.*/ + /** Computes the triangle bounding box. */ virtual void ComputeBBox(); }; diff --git a/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.h b/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.h index 07ef0a7039c..486e0fffcdd 100644 --- a/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.h +++ b/source/blender/freestyle/intern/stroke/AdvancedFunctions1D.h @@ -66,13 +66,13 @@ class DensityF1D : public UnaryFunction1D { { } - /** Returns the string "DensityF1D"*/ + /** Returns the string "DensityF1D". */ string getName() const { return "DensityF1D"; } - /** the () operator.*/ + /** the () operator. */ int operator()(Interface1D &inter) { result = integrate( diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.h b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.h index fcf661ea72f..2b578dd963a 100644 --- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.h +++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.h @@ -66,7 +66,7 @@ class ConstantThicknessShader : public StrokeShader { { } - /** Returns the string "ConstantThicknessShader".*/ + /** Returns the string "ConstantThicknessShader". */ virtual string getName() const { return "ConstantThicknessShader"; @@ -126,7 +126,7 @@ class IncreasingThicknessShader : public StrokeShader { _ThicknessMax = iThicknessMax; } - /** Destructor.*/ + /** Destructor. */ virtual ~IncreasingThicknessShader() { } @@ -171,7 +171,7 @@ class ConstrainedIncreasingThicknessShader : public StrokeShader { _ratio = iRatio; } - /** Destructor.*/ + /** Destructor. */ virtual ~ConstrainedIncreasingThicknessShader() { } diff --git a/source/blender/freestyle/intern/stroke/ChainingIterators.h b/source/blender/freestyle/intern/stroke/ChainingIterators.h index c0259471277..93aba258358 100644 --- a/source/blender/freestyle/intern/stroke/ChainingIterators.h +++ b/source/blender/freestyle/intern/stroke/ChainingIterators.h @@ -245,7 +245,7 @@ class ChainingIterator : public ViewEdgeInternal::ViewEdgeIterator { return _increment; } - /* increments.*/ + /* Increments. */ virtual int increment(); virtual int decrement(); }; diff --git a/source/blender/freestyle/intern/stroke/Curve.h b/source/blender/freestyle/intern/stroke/Curve.h index cce5353a5c7..9a05fcd380b 100644 --- a/source/blender/freestyle/intern/stroke/Curve.h +++ b/source/blender/freestyle/intern/stroke/Curve.h @@ -61,7 +61,7 @@ using namespace Geometry; */ class CurvePoint : public Interface0D { public: // Implementation of Interface0D - /** Returns the string "CurvePoint"*/ + /** Returns the string "CurvePoint". */ virtual string getExactTypeName() const { return "CurvePoint"; diff --git a/source/blender/freestyle/intern/stroke/Predicates0D.h b/source/blender/freestyle/intern/stroke/Predicates0D.h index cd00d582b30..11cbfb1b831 100644 --- a/source/blender/freestyle/intern/stroke/Predicates0D.h +++ b/source/blender/freestyle/intern/stroke/Predicates0D.h @@ -137,7 +137,7 @@ class TrueUP0D : public UnaryPredicate0D { { } - /** Returns the string "TrueUP0D"*/ + /** Returns the string "TrueUP0D". */ string getName() const { return "TrueUP0D"; @@ -160,7 +160,7 @@ class FalseUP0D : public UnaryPredicate0D { { } - /** Returns the string "FalseUP0D"*/ + /** Returns the string "FalseUP0D". */ string getName() const { return "FalseUP0D"; diff --git a/source/blender/freestyle/intern/stroke/Predicates1D.h b/source/blender/freestyle/intern/stroke/Predicates1D.h index ceb2e7fcc17..e7be9d863dc 100644 --- a/source/blender/freestyle/intern/stroke/Predicates1D.h +++ b/source/blender/freestyle/intern/stroke/Predicates1D.h @@ -144,7 +144,7 @@ class TrueUP1D : public UnaryPredicate1D { { } - /** Returns the string "TrueUP1D"*/ + /** Returns the string "TrueUP1D". */ string getName() const { return "TrueUP1D"; @@ -167,7 +167,7 @@ class FalseUP1D : public UnaryPredicate1D { { } - /** Returns the string "FalseUP1D"*/ + /** Returns the string "FalseUP1D". */ string getName() const { return "FalseUP1D"; @@ -225,7 +225,7 @@ class ContourUP1D : public UnaryPredicate1D { Functions1D::CurveNatureF1D _getNature; public: - /** Returns the string "ContourUP1D"*/ + /** Returns the string "ContourUP1D". */ string getName() const { return "ContourUP1D"; @@ -300,7 +300,7 @@ class EqualToTimeStampUP1D : public UnaryPredicate1D { _timeStamp = ts; } - /** Returns the string "EqualToTimeStampUP1D"*/ + /** Returns the string "EqualToTimeStampUP1D". */ string getName() const { return "EqualToTimeStampUP1D"; @@ -326,7 +326,7 @@ class EqualToChainingTimeStampUP1D : public UnaryPredicate1D { _timeStamp = ts; } - /** Returns the string "EqualToChainingTimeStampUP1D"*/ + /** Returns the string "EqualToChainingTimeStampUP1D". */ string getName() const { return "EqualToChainingTimeStampUP1D"; @@ -364,7 +364,7 @@ class ShapeUP1D : public UnaryPredicate1D { _id = Id(idFirst, idSecond); } - /** Returns the string "ShapeUP1D"*/ + /** Returns the string "ShapeUP1D". */ string getName() const { return "ShapeUP1D"; diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp index 0de3e03d44a..956ba2743d7 100644 --- a/source/blender/freestyle/intern/stroke/Stroke.cpp +++ b/source/blender/freestyle/intern/stroke/Stroke.cpp @@ -625,7 +625,7 @@ int Stroke::Resample(int iNPoints) // add last: ++it; ++next; - if ((it != itend) && (next == itend) /* && (t == 0.0f)*/) { + if ((it != itend) && (next == itend) /* && (t == 0.0f) */) { newVertices.push_back(&(*it)); } @@ -687,7 +687,7 @@ int Stroke::Resample(float iSampling) ++next; } // add last: - if ((it != itend) && (next == itend) /* && (t == 0.0f)*/) { + if ((it != itend) && (next == itend) /* && (t == 0.0f) */) { newVertices.push_back(&(*it)); } diff --git a/source/blender/freestyle/intern/stroke/Stroke.h b/source/blender/freestyle/intern/stroke/Stroke.h index 96a4d2d61ea..209ec86edef 100644 --- a/source/blender/freestyle/intern/stroke/Stroke.h +++ b/source/blender/freestyle/intern/stroke/Stroke.h @@ -349,7 +349,7 @@ class StrokeVertex : public CurvePoint { /** Builds a stroke vertex from a CurvePoint */ StrokeVertex(CurvePoint *iPoint); - /** Builds Stroke Vertex from 2 stroke vertices and an interpolation parameter*/ + /** Builds Stroke Vertex from 2 stroke vertices and an interpolation parameter. */ StrokeVertex(StrokeVertex *iA, StrokeVertex *iB, float t3); /** Builds a stroke from a view vertex and an attribute */ @@ -378,7 +378,7 @@ class StrokeVertex : public CurvePoint { return getPoint2D(); } - /** Returns the ith 2D point coordinate (i=0 or 1)*/ + /** Returns the ith 2D point coordinate (i=0 or 1). */ inline real operator[](const int i) const { return _Point2d[i]; @@ -516,9 +516,9 @@ class Stroke : public Interface1D { /** The different blending modes available to similate the interaction media-medium. */ typedef enum { - DRY_MEDIUM, /**< To simulate a dry medium such as Pencil or Charcoal.*/ - HUMID_MEDIUM, /**< To simulate ink painting (color subtraction blending).*/ - OPAQUE_MEDIUM, /**< To simulate an opaque medium (oil, spray...).*/ + DRY_MEDIUM, /**< To simulate a dry medium such as Pencil or Charcoal. */ + HUMID_MEDIUM, /**< To simulate ink painting (color subtraction blending). */ + OPAQUE_MEDIUM, /**< To simulate an opaque medium (oil, spray...). */ } MediumType; public: diff --git a/source/blender/freestyle/intern/view_map/Functions1D.h b/source/blender/freestyle/intern/view_map/Functions1D.h index 532e89261ce..e45bc459bf0 100644 --- a/source/blender/freestyle/intern/view_map/Functions1D.h +++ b/source/blender/freestyle/intern/view_map/Functions1D.h @@ -328,7 +328,7 @@ class GetProjectedZF1D : public UnaryFunction1D { }; // Orientation2DF1D -/** Returns the 2D orientation as a Vec2f*/ +/** Returns the 2D orientation as a #Vec2f. */ class Orientation2DF1D : public UnaryFunction1D { private: Functions0D::VertexOrientation2DF0D _func; @@ -525,7 +525,7 @@ class Curvature2DAngleF1D : public UnaryFunction1D { return "Curvature2DAngleF1D"; } - /** the () operator.*/ + /** the () operator. */ int operator()(Interface1D &inter) { result = integrate(_fun, inter.verticesBegin(), inter.verticesEnd(), _integration); @@ -554,7 +554,7 @@ class Normal2DF1D : public UnaryFunction1D { return "Normal2DF1D"; } - /** the () operator.*/ + /** the () operator. */ int operator()(Interface1D &inter) { result = integrate(_fun, inter.verticesBegin(), inter.verticesEnd(), _integration); diff --git a/source/blender/freestyle/intern/view_map/Interface1D.h b/source/blender/freestyle/intern/view_map/Interface1D.h index 8d1879af31b..75ad71a373d 100644 --- a/source/blender/freestyle/intern/view_map/Interface1D.h +++ b/source/blender/freestyle/intern/view_map/Interface1D.h @@ -46,15 +46,15 @@ namespace Freestyle { */ typedef enum { MEAN, /**< The value computed for the 1D element is the mean of the values obtained for the 0D - elements.*/ + elements. */ MIN, /**< The value computed for the 1D element is the minimum of the values obtained for the 0D - elements.*/ + elements. */ MAX, /**< The value computed for the 1D element is the maximum of the values obtained for the 0D - elements.*/ + elements. */ FIRST, /**< The value computed for the 1D element is the first of the values obtained for the 0D - elements.*/ + elements. */ LAST, /**< The value computed for the 1D element is the last of the values obtained for the 0D - elements.*/ + elements. */ } IntegrationType; /** Returns a single value from a set of values evaluated at each 0D element of this 1D element. diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h index 10544f5e883..0ec9144595c 100644 --- a/source/blender/freestyle/intern/view_map/Silhouette.h +++ b/source/blender/freestyle/intern/view_map/Silhouette.h @@ -171,7 +171,7 @@ class SVertex : public Interface0D { */ void *userdata; - /** Default constructor.*/ + /** Default constructor. */ inline SVertex() { _Id = 0; @@ -326,7 +326,7 @@ class SVertex : public Interface0D { } #if 0 - /* Fredo's normal and curvature*/ + /* Fredo's normal and curvature. */ void setCurvatureFredo(real c) { _curvatureFredo = c; @@ -941,7 +941,7 @@ class FEdge : public Interface1D { inline Vec3r curvature2d_as_vector(int iCombination = 0) const; - /* angle in degrees*/ + /* Angle in degrees. */ inline real curvature2d_as_angle(int iCombination = 0) const; #endif @@ -1259,13 +1259,13 @@ class FEdgeSharp : public FEdge { _bNormal = iNormal; } - /** Sets the index of the material lying on the right of the FEdge.*/ + /** Sets the index of the material lying on the right of the FEdge. */ inline void setaFrsMaterialIndex(unsigned i) { _aFrsMaterialIndex = i; } - /** Sets the index of the material lying on the left of the FEdge.*/ + /** Sets the index of the material lying on the left of the FEdge. */ inline void setbFrsMaterialIndex(unsigned i) { _bFrsMaterialIndex = i; @@ -1917,19 +1917,19 @@ class SShape { } /* Modififers */ - /** Sets the Id of the shape.*/ + /** Sets the Id of the shape. */ inline void setId(Id id) { _Id = id; } - /** Sets the name of the shape.*/ + /** Sets the name of the shape. */ inline void setName(const string &name) { _Name = name; } - /** Sets the library path of the shape.*/ + /** Sets the library path of the shape. */ inline void setLibraryPath(const string &path) { _LibraryPath = path; diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp index 8d5955fc0ae..24c56572803 100644 --- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp @@ -601,7 +601,7 @@ OWXEdge ViewEdgeXBuilder::FindNextWEdge(const OWXEdge &iEdge) } if (((WXVertex *)v)->isFeature()) { - return nullptr; /* XXX eeek? NULL? OWXEdge(NULL, true/false)?*/ + return nullptr; /* XXX eeek? NULL? OWXEdge(NULL, true/false)? */ } int faceMarks = retrieveFaceMarks(iEdge.e); diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h index a3ef5eed6d8..bd7edad7642 100644 --- a/source/blender/freestyle/intern/view_map/ViewMap.h +++ b/source/blender/freestyle/intern/view_map/ViewMap.h @@ -56,7 +56,7 @@ class ViewEdge; class ViewShape; class TVertex; -/** Class defining the ViewMap.*/ +/** Class defining the ViewMap. */ class ViewMap { public: typedef vector viewedges_container; @@ -295,7 +295,7 @@ class ViewVertex : public Interface0D { */ void *userdata; - /** Default constructor.*/ + /** Default constructor. */ inline ViewVertex() { userdata = NULL; @@ -483,7 +483,7 @@ class TVertex : public ViewVertex { _sortedEdges; // the list of the four ViewEdges, ordered in CCW order (in the image plan) public: - /** Default constructor.*/ + /** Default constructor. */ inline TVertex() : ViewVertex(Nature::T_VERTEX) { _FrontSVertex = NULL; @@ -758,7 +758,7 @@ class NonTVertex : public ViewVertex { edges_container _ViewEdges; public: - /** Default constructor.*/ + /** Default constructor. */ inline NonTVertex() : ViewVertex(Nature::NON_T_VERTEX) { _SVertex = NULL; @@ -1182,7 +1182,7 @@ class ViewEdge : public Interface1D { _FEdgeB = iFEdge; } - /** Sets the ViewShape to which this ViewEdge belongs to.*/ + /** Sets the ViewShape to which this ViewEdge belongs to. */ inline void setShape(ViewShape *iVShape) { _Shape = iVShape; @@ -1417,7 +1417,7 @@ class ViewShape { */ void *userdata; - /** Default constructor.*/ + /** Default constructor. */ inline ViewShape() { userdata = NULL; diff --git a/source/blender/freestyle/intern/view_map/ViewMapIterators.h b/source/blender/freestyle/intern/view_map/ViewMapIterators.h index 7f98c2745f4..1df78e71d9d 100644 --- a/source/blender/freestyle/intern/view_map/ViewMapIterators.h +++ b/source/blender/freestyle/intern/view_map/ViewMapIterators.h @@ -208,7 +208,7 @@ class orientedViewEdgeIterator : public Iterator { } public: - /** increments.*/ + /** increments. */ virtual inline int increment() { if (_Nature & Nature::T_VERTEX) { diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h index 125dec27b8a..2a2c8754454 100644 --- a/source/blender/freestyle/intern/winged_edge/WEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WEdge.h @@ -156,7 +156,7 @@ class WVertex { } public: - /** Iterator to iterate over a vertex incoming edges in the CCW order*/ + /** Iterator to iterate over a vertex incoming edges in the CCW order. */ #if defined(__GNUC__) && (__GNUC__ < 3) class incoming_edge_iterator : public input_iterator #else diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c index 408e0081990..37ee93b5f0f 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c +++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_chain.c @@ -931,7 +931,7 @@ void MOD_lineart_chain_split_angle(LineartRenderBuffer *rb, float angle_threshol angle = angle_v2v2v2(prev_rlci->pos, eci->pos, next_rlci->pos); } else { - break; /* No need to split at the last point anyway.*/ + break; /* No need to split at the last point anyway. */ } if (angle < angle_threshold_rad) { new_rlc = lineart_chain_create(rb); diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c index ebf9bcc17e2..e156933ddc2 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c +++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c @@ -1273,7 +1273,7 @@ static void lineart_main_cull_triangles(LineartRenderBuffer *rb, bool clip_far) } #define LRT_CULL_DECIDE_INSIDE \ - /* These three represents points that are in the clipping range or not*/ \ + /* These three represents points that are in the clipping range or not. */ \ in0 = 0, in1 = 0, in2 = 0; \ if (clip_far) { \ /* Point outside far plane. */ \ @@ -2249,7 +2249,7 @@ static bool lineart_edge_from_triangle(const LineartTriangle *tri, } /* Sorting three intersection points from min to max, - * the order for each intersection is set in lst[0] to lst[2].*/ + * the order for each intersection is set in `lst[0]` to `lst[2]`. */ #define INTERSECT_SORT_MIN_TO_MAX_3(ia, ib, ic, lst) \ { \ lst[0] = LRT_MIN3_INDEX(ia, ib, ic); \ @@ -2847,7 +2847,7 @@ static void lineart_triangle_intersect_in_bounding_area(LineartRenderBuffer *rb, double *G0 = tri->v[0]->gloc, *G1 = tri->v[1]->gloc, *G2 = tri->v[2]->gloc; - /* If this is not the smallest subdiv bounding area.*/ + /* If this is not the smallest subdiv bounding area. */ if (ba->child) { lineart_triangle_intersect_in_bounding_area(rb, tri, &ba->child[0]); lineart_triangle_intersect_in_bounding_area(rb, tri, &ba->child[1]); @@ -4103,7 +4103,7 @@ bool MOD_lineart_compute_feature_lines(Depsgraph *depsgraph, /* "intersection_only" is preserved for being called in a standalone fashion. * If so the data will already be available at the stage. Otherwise we do the occlusion and - * chaining etc.*/ + * chaining etc. */ if (!intersections_only) { diff --git a/source/blender/gpu/GPU_viewport.h b/source/blender/gpu/GPU_viewport.h index d6c544764fb..8b2a14a1a96 100644 --- a/source/blender/gpu/GPU_viewport.h +++ b/source/blender/gpu/GPU_viewport.h @@ -43,7 +43,7 @@ typedef struct GPUViewport GPUViewport; struct GPUFrameBuffer; -/* Contains memory pools information */ +/* Contains memory pools information. */ typedef struct ViewportMemoryPool { struct BLI_memblock *commands; struct BLI_memblock *commands_small; @@ -62,7 +62,7 @@ typedef struct ViewportMemoryPool { uint ubo_len; } ViewportMemoryPool; -/*eAll FramebufferLists are just the same pointers with different names */ +/* All FramebufferLists are just the same pointers with different names. */ typedef struct FramebufferList { struct GPUFrameBuffer *framebuffers[1]; } FramebufferList; @@ -76,7 +76,7 @@ typedef struct PassList { } PassList; typedef struct StorageList { - void *storage[1]; /* custom structs from the engine */ + void *storage[1]; /* Custom structs from the engine. */ } StorageList; typedef struct ViewportEngineData { @@ -90,10 +90,10 @@ typedef struct ViewportEngineData { TextureList *txl_stereo; StorageList *stl_stereo; - /* we may want to put this elsewhere */ + /* We may want to put this elsewhere. */ struct DRWTextStore *text_draw_cache; - /* Profiling data */ + /* Profiling data. */ double init_time; double render_time; double background_time; @@ -141,7 +141,7 @@ void GPU_viewport_size_get(const GPUViewport *viewport, int size[2]); void GPU_viewport_size_set(GPUViewport *viewport, const int size[2]); void GPU_viewport_active_view_set(GPUViewport *viewport, int view); -/* Profiling */ +/* Profiling. */ double *GPU_viewport_cache_time_get(GPUViewport *viewport); void GPU_viewport_tag_update(GPUViewport *viewport); @@ -149,7 +149,7 @@ bool GPU_viewport_do_update(GPUViewport *viewport); GPUTexture *GPU_viewport_color_texture(GPUViewport *viewport, int view); -/* Texture pool */ +/* Texture pool. */ GPUTexture *GPU_viewport_texture_pool_query( GPUViewport *viewport, void *engine, int width, int height, int format); diff --git a/source/blender/gpu/intern/gpu_select_pick.c b/source/blender/gpu/intern/gpu_select_pick.c index 3f9da50a2eb..7fb704c29dd 100644 --- a/source/blender/gpu/intern/gpu_select_pick.c +++ b/source/blender/gpu/intern/gpu_select_pick.c @@ -55,7 +55,7 @@ * SubRectStride */ -/* For looping over a sub-region of a rect, could be moved into 'rct.c'*/ +/* For looping over a sub-region of a rect, could be moved into 'rct.c'. */ typedef struct SubRectStride { uint start; /* start here */ uint span; /* read these */ @@ -230,7 +230,7 @@ typedef struct GPUPickState { /* cache on initialization */ uint (*buffer)[4]; - /* buffer size (stores number of integers, for actual size multiply by sizeof integer)*/ + /* Buffer size (stores number of integers, for actual size multiply by sizeof integer). */ uint bufsize; /* mode of operation */ char mode; diff --git a/source/blender/gpu/intern/gpu_select_sample_query.cc b/source/blender/gpu/intern/gpu_select_sample_query.cc index 5d8689c0d6a..fc755568687 100644 --- a/source/blender/gpu/intern/gpu_select_sample_query.cc +++ b/source/blender/gpu/intern/gpu_select_sample_query.cc @@ -48,17 +48,17 @@ using namespace blender; using namespace blender::gpu; struct GPUSelectQueryState { - /* Tracks whether a query has been issued so that gpu_load_id can end the previous one */ + /* Tracks whether a query has been issued so that gpu_load_id can end the previous one. */ bool query_issued; /* GPU queries abstraction. Contains an array of queries. */ QueryPool *queries; /* Array holding the id corresponding id to each query. */ Vector *ids; - /* cache on initialization */ + /* Cache on initialization. */ uint (*buffer)[4]; - /* buffer size (stores number of integers, for actual size multiply by sizeof integer)*/ + /* Buffer size (stores number of integers, for actual size multiply by sizeof integer). */ uint bufsize; - /* mode of operation */ + /* Mode of operation. */ char mode; uint index; int oldhits; diff --git a/source/blender/gpu/intern/gpu_texture.cc b/source/blender/gpu/intern/gpu_texture.cc index 997064e82a2..de5a9f95b65 100644 --- a/source/blender/gpu/intern/gpu_texture.cc +++ b/source/blender/gpu/intern/gpu_texture.cc @@ -400,7 +400,7 @@ void GPU_texture_update(GPUTexture *tex, eGPUDataFormat data_format, const void } /* Makes data interpretation aware of the source layout. - * Skipping pixels correctly when changing rows when doing partial update.*/ + * Skipping pixels correctly when changing rows when doing partial update. */ void GPU_unpack_row_length_set(uint len) { Context::get()->state_manager->texture_unpack_row_length_set(len); diff --git a/source/blender/gpu/intern/gpu_vertex_format.cc b/source/blender/gpu/intern/gpu_vertex_format.cc index d36a6761cfc..78a119bcec8 100644 --- a/source/blender/gpu/intern/gpu_vertex_format.cc +++ b/source/blender/gpu/intern/gpu_vertex_format.cc @@ -284,7 +284,7 @@ void GPU_vertformat_safe_attr_name(const char *attr_name, char *r_safe_name, uin data[i] = attr_name[i]; } /* We use a hash to identify each data layer based on its name. - * NOTE: This is still prone to hash collision but the risks are very low.*/ + * NOTE: This is still prone to hash collision but the risks are very low. */ /* Start hashing after the first 2 chars. */ *(uint *)&data[4] = BLI_ghashutil_strhash_p_murmur(attr_name + 4); } diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c index c118145ebd6..ddf31b6ffa7 100644 --- a/source/blender/gpu/intern/gpu_viewport.c +++ b/source/blender/gpu/intern/gpu_viewport.c @@ -284,7 +284,7 @@ static void gpu_viewport_engines_data_free(GPUViewport *viewport) MEM_freeN(data); - /* Mark as unused*/ + /* Mark as unused. */ viewport->engine_data[i].handle = NULL; } diff --git a/source/blender/gpu/opengl/gl_texture.hh b/source/blender/gpu/opengl/gl_texture.hh index 9da27056269..dc048ea05c0 100644 --- a/source/blender/gpu/opengl/gl_texture.hh +++ b/source/blender/gpu/opengl/gl_texture.hh @@ -44,7 +44,7 @@ class GLTexture : public Texture { /** All samplers states. */ static GLuint samplers_[GPU_SAMPLER_MAX]; - /** Target to bind the texture to (GL_TEXTURE_1D, GL_TEXTURE_2D, etc...)*/ + /** Target to bind the texture to (#GL_TEXTURE_1D, #GL_TEXTURE_2D, etc...). */ GLenum target_ = -1; /** opengl identifier for texture. */ GLuint tex_id_ = 0; diff --git a/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_geom.glsl b/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_geom.glsl index da6e6502e62..b937323f62a 100644 --- a/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_geom.glsl +++ b/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_geom.glsl @@ -170,7 +170,7 @@ void main(void) length_b = finalThickness[2]; } - /* generate the start endcap (alpha < 0 used as endcap flag)*/ + /* Generate the start end-cap (alpha < 0 used as end-cap flag). */ float extend = (fill_stroke > 0) ? 2 : 1; if ((caps_start != GPENCIL_FLATCAP) && is_equal(P0, P2)) { mTexCoord = vec2(1, 0.5); @@ -211,7 +211,7 @@ void main(void) gl_Position = vec4((sp2 - length_b * miter_b) / Viewport, getZdepth(P2), 1.0); EmitVertex(); - /* generate the end endcap (alpha < 0 used as endcap flag)*/ + /* Generate the end end-cap (alpha < 0 used as end-cap flag). */ if ((caps_end != GPENCIL_FLATCAP) && is_equal(P1, P3)) { mTexCoord = vec2(0, 1); mColor = vec4(finalColor[2].rgb, finalColor[2].a * -1.0); diff --git a/source/blender/ikplugin/intern/iksolver_plugin.c b/source/blender/ikplugin/intern/iksolver_plugin.c index f569634defc..051bc193a42 100644 --- a/source/blender/ikplugin/intern/iksolver_plugin.c +++ b/source/blender/ikplugin/intern/iksolver_plugin.c @@ -149,7 +149,7 @@ static void initialize_posetree(struct Object *UNUSED(ob), bPoseChannel *pchan_t tree->iterations = MAX2(data->iterations, tree->iterations); tree->stretch = tree->stretch && !(data->flag & CONSTRAINT_IK_STRETCH); - /* skip common pose channels and add remaining*/ + /* Skip common pose channels and add remaining. */ size = MIN2(segcount, tree->totchannel); a = t = 0; while (a < size && t < tree->totchannel) { diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index eb31b0e9f87..b9411f6dd2d 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -315,7 +315,7 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co tree->iterations = MAX2(data->iterations, tree->iterations); tree->stretch = tree->stretch && !(data->flag & CONSTRAINT_IK_STRETCH); - /* skip common pose channels and add remaining*/ + /* Skip common pose channels and add remaining. */ size = MIN2(segcount, tree->totchannel); a = t = 0; while (a < size && t < tree->totchannel) { diff --git a/source/blender/imbuf/intern/dds/ColorBlock.cpp b/source/blender/imbuf/intern/dds/ColorBlock.cpp index 1a67975b5f0..6974e0bf99d 100644 --- a/source/blender/imbuf/intern/dds/ColorBlock.cpp +++ b/source/blender/imbuf/intern/dds/ColorBlock.cpp @@ -154,7 +154,7 @@ void ColorBlock::swizzle(uint x, uint y, uint z, uint w) } /** Returns true if the block has a single color. */ -bool ColorBlock::isSingleColor(Color32 mask /*= Color32(0xFF, 0xFF, 0xFF, 0x00)*/) const +bool ColorBlock::isSingleColor(Color32 mask /*= Color32(0xFF, 0xFF, 0xFF, 0x00) */) const { uint u = m_color[0].u & mask.u; diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.h b/source/blender/imbuf/intern/dds/DirectDrawSurface.h index b63d705dadf..381fa51f75c 100644 --- a/source/blender/imbuf/intern/dds/DirectDrawSurface.h +++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.h @@ -120,7 +120,7 @@ struct DDSHeader { void setHasAlphaFlag(bool b); void setUserVersion(int version); - /*void swapBytes();*/ + // void swapBytes(); bool hasDX10Header() const; uint signature() const; diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index a530acb15b0..71137a408d2 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -1118,7 +1118,7 @@ static AviMovie *alloc_proxy_output_avi( AviFormat format; double framerate; AviMovie *avi; - /* it doesn't really matter for proxies, but sane defaults help anyways...*/ + /* It doesn't really matter for proxies, but sane defaults help anyways. */ short frs_sec = 25; float frs_sec_base = 1.0; diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c index cf27557d043..117e0d97b2e 100644 --- a/source/blender/imbuf/intern/jp2.c +++ b/source/blender/imbuf/intern/jp2.c @@ -41,15 +41,15 @@ static const char J2K_HEAD[] = {0xFF, 0x4F, 0xFF, 0x51, 0x00}; /* We only need this because of how the presets are set */ /* this typedef is copied from 'openjpeg-1.5.0/applications/codec/image_to_j2k.c' */ typedef struct img_folder { - /** The directory path of the folder containing input images*/ + /** The directory path of the folder containing input images. */ char *imgdirpath; - /** Output format*/ + /** Output format. */ char *out_format; - /** Enable option*/ + /** Enable option. */ char set_imgdir; - /** Enable Cod Format for output*/ + /** Enable Cod Format for output. */ char set_out_format; - /** User specified rate stored in case of cinema option*/ + /** User specified rate stored in case of cinema option. */ float *rates; } img_fol_t; @@ -647,10 +647,10 @@ BLI_INLINE int DOWNSAMPLE_FLOAT_TO_16BIT(const float _val) /* ****************************** COPIED FROM image_to_j2k.c */ /* ----------------------------------------------------------------------- */ -#define CINEMA_24_CS 1302083 /*Codestream length for 24fps*/ -#define CINEMA_48_CS 651041 /*Codestream length for 48fps*/ -#define COMP_24_CS 1041666 /*Maximum size per color component for 2K & 4K @ 24fps*/ -#define COMP_48_CS 520833 /*Maximum size per color component for 2K @ 48fps*/ +#define CINEMA_24_CS 1302083 /* Codestream length for 24fps. */ +#define CINEMA_48_CS 651041 /* Codestream length for 48fps. */ +#define COMP_24_CS 1041666 /* Maximum size per color component for 2K & 4K @ 24fps. */ +#define COMP_48_CS 520833 /* Maximum size per color component for 2K @ 48fps. */ static int init_4K_poc(opj_poc_t *POC, int numres) { @@ -677,22 +677,22 @@ static void cinema_parameters(opj_cparameters_t *parameters) parameters->cp_tdx = 1; parameters->cp_tdy = 1; - /*Tile part*/ + /* Tile part. */ parameters->tp_flag = 'C'; parameters->tp_on = 1; - /*Tile and Image shall be at (0, 0)*/ + /* Tile and Image shall be at (0, 0). */ parameters->cp_tx0 = 0; parameters->cp_ty0 = 0; parameters->image_offset_x0 = 0; parameters->image_offset_y0 = 0; - /*Codeblock size = 32 * 32*/ + /* Codeblock size = 32 * 32. */ parameters->cblockw_init = 32; parameters->cblockh_init = 32; parameters->csty |= 0x01; - /*The progression order shall be CPRL*/ + /* The progression order shall be CPRL. */ parameters->prog_order = OPJ_CPRL; /* No ROI */ @@ -1118,7 +1118,7 @@ static opj_image_t *ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters) } } else { - /* just use rect*/ + /* Just use rect. */ switch (prec) { case 8: if (numcomps == 4) { @@ -1223,7 +1223,7 @@ bool imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int UNUSED(fl /* compression ratio */ /* invert range, from 10-100, 100-1 - * where jpeg see's 1 and highest quality (lossless) and 100 is very low quality*/ + * Where jpeg see's 1 and highest quality (lossless) and 100 is very low quality. */ parameters.tcp_rates[0] = ((100 - quality) / 90.0f * 99.0f) + 1; parameters.tcp_numlayers = 1; /* only one resolution */ diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c index 1fde173b4cf..2a7a189dd2b 100644 --- a/source/blender/imbuf/intern/targa.c +++ b/source/blender/imbuf/intern/targa.c @@ -465,7 +465,7 @@ static void decodetarga(struct ImBuf *ibuf, const unsigned char *mem, size_t mem } if (count >= 128) { - /*if (count == 128) printf("TARGA: 128 in file !\n");*/ + // if (count == 128) printf("TARGA: 128 in file !\n"); count -= 127; if (psize & 2) { @@ -475,14 +475,14 @@ static void decodetarga(struct ImBuf *ibuf, const unsigned char *mem, size_t mem cp[1] = mem[0]; cp[2] = mem[1]; cp[3] = mem[2]; - /*col = (mem[3] << 24) + (mem[0] << 16) + (mem[1] << 8) + mem[2];*/ + // col = (mem[3] << 24) + (mem[0] << 16) + (mem[1] << 8) + mem[2]; mem += 4; } else { cp[1] = mem[0]; cp[2] = mem[1]; cp[3] = mem[2]; - /*col = 0xff000000 + (mem[0] << 16) + (mem[1] << 8) + mem[2];*/ + // col = 0xff000000 + (mem[0] << 16) + (mem[1] << 8) + mem[2]; mem += 3; } } @@ -517,14 +517,14 @@ static void decodetarga(struct ImBuf *ibuf, const unsigned char *mem, size_t mem cp[1] = mem[0]; cp[2] = mem[1]; cp[3] = mem[2]; - /*col = (mem[3] << 24) + (mem[0] << 16) + (mem[1] << 8) + mem[2];*/ + // col = (mem[3] << 24) + (mem[0] << 16) + (mem[1] << 8) + mem[2]; mem += 4; } else { cp[1] = mem[0]; cp[2] = mem[1]; cp[3] = mem[2]; - /*col = 0xff000000 + (mem[0] << 16) + (mem[1] << 8) + mem[2];*/ + // col = 0xff000000 + (mem[0] << 16) + (mem[1] << 8) + mem[2]; mem += 3; } } @@ -594,7 +594,7 @@ static void ldtarga(struct ImBuf *ibuf, const unsigned char *mem, size_t mem_siz cp[1] = mem[0]; cp[2] = mem[1]; cp[3] = mem[2]; - /*col = (mem[3] << 24) + (mem[0] << 16) + (mem[1] << 8) + mem[2];*/ + // col = (mem[3] << 24) + (mem[0] << 16) + (mem[1] << 8) + mem[2]; mem += 4; } else { @@ -602,7 +602,7 @@ static void ldtarga(struct ImBuf *ibuf, const unsigned char *mem, size_t mem_siz cp[1] = mem[0]; cp[2] = mem[1]; cp[3] = mem[2]; - /*col = 0xff000000 + (mem[0] << 16) + (mem[1] << 8) + mem[2];*/ + // col = 0xff000000 + (mem[0] << 16) + (mem[1] << 8) + mem[2]; mem += 3; } } @@ -663,8 +663,8 @@ ImBuf *imb_loadtarga(const unsigned char *mem, cp[1] = cp[2] = 0; if (tga.mapsize) { - /* load color map */ - /*mincol = tga.maporig;*/ /*UNUSED*/ + /* Load color map. */ + // mincol = tga.maporig; /* UNUSED */ cmap_max = tga.mapsize; cmap = MEM_callocN(sizeof(unsigned int) * cmap_max, "targa cmap"); diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c index d38c300a4c4..db80d168e53 100644 --- a/source/blender/imbuf/intern/thumbs.c +++ b/source/blender/imbuf/intern/thumbs.c @@ -88,7 +88,7 @@ static bool get_thumb_dir(char *dir, ThumbSize size) const char *subdir; #ifdef WIN32 wchar_t dir_16[MAX_PATH]; - /* yes, applications shouldn't store data there, but so does GIMP :)*/ + /* Yes, applications shouldn't store data there, but so does GIMP :). */ SHGetSpecialFolderPathW(0, dir_16, CSIDL_PROFILE, 0); conv_utf_16_to_8(dir_16, dir, FILE_MAX); s += strlen(dir); diff --git a/source/blender/io/collada/ArmatureImporter.cpp b/source/blender/io/collada/ArmatureImporter.cpp index 5c3d6be589a..f36b9aacd8b 100644 --- a/source/blender/io/collada/ArmatureImporter.cpp +++ b/source/blender/io/collada/ArmatureImporter.cpp @@ -325,7 +325,7 @@ void ArmatureImporter::connect_bone_chains(bArmature *armature, BoneExtended *pbe = extended_bones[parentbone->name]; if (dominant_child != nullptr) { - /* Found a valid chain. Now connect current bone with that chain.*/ + /* Found a valid chain. Now connect current bone with that chain. */ EditBone *pebone = bc_get_edit_bone(armature, parentbone->name); EditBone *cebone = bc_get_edit_bone(armature, dominant_child->get_name()); if (pebone && !(cebone->flag & BONE_CONNECTED)) { @@ -341,7 +341,7 @@ void ArmatureImporter::connect_bone_chains(bArmature *armature, if (len_squared_v3(vec) > MINIMUM_BONE_LENGTH) { copy_v3_v3(pebone->tail, cebone->head); - pbe->set_tail(pebone->tail); /* to make fix_leafbone happy ...*/ + pbe->set_tail(pebone->tail); /* To make fix_leafbone happy. */ if (pbe && pbe->get_chain_length() >= this->import_settings->min_chain_length) { BoneExtended *cbe = extended_bones[cebone->name]; diff --git a/source/blender/io/collada/BCAnimationCurve.cpp b/source/blender/io/collada/BCAnimationCurve.cpp index 5065accf554..0e31e522ec4 100644 --- a/source/blender/io/collada/BCAnimationCurve.cpp +++ b/source/blender/io/collada/BCAnimationCurve.cpp @@ -314,7 +314,7 @@ void BCAnimationCurve::clean_handles() fcurve = get_edit_fcurve(); } - /* Keep old bezt data for copy)*/ + /* Keep old bezt data for copy). */ BezTriple *old_bezts = fcurve->bezt; int totvert = fcurve->totvert; fcurve->bezt = nullptr; diff --git a/source/blender/io/collada/BCAnimationSampler.cpp b/source/blender/io/collada/BCAnimationSampler.cpp index b2a9027380e..02a4e1f3167 100644 --- a/source/blender/io/collada/BCAnimationSampler.cpp +++ b/source/blender/io/collada/BCAnimationSampler.cpp @@ -488,7 +488,7 @@ void BCAnimationSampler::initialize_curves(BCAnimationCurveMap &curves, Object * } } - /* Add curves on Object->material actions*/ + /* Add curves on Object->material actions. */ object_type = BC_ANIMATION_TYPE_MATERIAL; for (int a = 0; a < ob->totcol; a++) { /* Export Material parameter animations. */ @@ -574,7 +574,7 @@ BCSample &BCSampleFrameContainer::add(Object *ob, int frame_index) /* Below are the getters which we need to export the data */ /* ====================================================== */ -/* Return either the BCSampleFrame or NULL if frame does not exist*/ +/* Return either the BCSampleFrame or NULL if frame does not exist. */ BCSampleFrame *BCSampleFrameContainer::get_frame(int frame_index) { BCSampleFrameMap::iterator it = sample_frames.find(frame_index); diff --git a/source/blender/io/collada/BCAnimationSampler.h b/source/blender/io/collada/BCAnimationSampler.h index 52c0c8aa29e..19b1bc35264 100644 --- a/source/blender/io/collada/BCAnimationSampler.h +++ b/source/blender/io/collada/BCAnimationSampler.h @@ -88,7 +88,7 @@ class BCSampleFrame { BCSample &add(Object *ob); - /* Following methods return NULL if object is not in the sampleMap*/ + /* Following methods return NULL if object is not in the sampleMap. */ const BCSample *get_sample(Object *ob) const; const BCMatrix *get_sample_matrix(Object *ob) const; const BCMatrix *get_sample_matrix(Object *ob, Bone *bone) const; diff --git a/source/blender/io/collada/DocumentImporter.h b/source/blender/io/collada/DocumentImporter.h index a6ed014a33c..8e553f1ce7a 100644 --- a/source/blender/io/collada/DocumentImporter.h +++ b/source/blender/io/collada/DocumentImporter.h @@ -77,11 +77,13 @@ class DocumentImporter : COLLADAFW::IWriter { */ void cancel(const COLLADAFW::String &errorMessage); - /** This is the method called. The writer hast to prepare to receive data.*/ + /** This is the method called. The writer hast to prepare to receive data. */ void start(); - /** This method is called after the last write* method. No other methods will be called after - * this.*/ + /** + * This method is called after the last write* method. + * No other methods will be called after this. + */ void finish(); bool writeGlobalAsset(const COLLADAFW::FileInfo *); diff --git a/source/blender/io/collada/GeometryExporter.cpp b/source/blender/io/collada/GeometryExporter.cpp index def7caabf32..382bb8a6e36 100644 --- a/source/blender/io/collada/GeometryExporter.cpp +++ b/source/blender/io/collada/GeometryExporter.cpp @@ -589,7 +589,7 @@ void GeometryExporter::createTexcoordsSource(std::string geom_id, Mesh *me) bool operator<(const Normal &a, const Normal &b) { - /* only needed to sort normal vectors and find() them later in a map.*/ + /* Only needed to sort normal vectors and find() them later in a map. */ return a.x < b.x || (a.x == b.x && (a.y < b.y || (a.y == b.y && a.z < b.z))); } diff --git a/source/blender/io/collada/collada_utils.cpp b/source/blender/io/collada/collada_utils.cpp index bba50064879..d7855d69d99 100644 --- a/source/blender/io/collada/collada_utils.cpp +++ b/source/blender/io/collada/collada_utils.cpp @@ -636,7 +636,7 @@ void BoneExtended::set_bone_layers(std::string layerString, std::vector> layer) { - /* Blender uses numbers to specify layers*/ + /* Blender uses numbers to specify layers. */ if (isInteger(layer)) { pos = atoi(layer.c_str()); if (pos >= 0 && pos < 32) { @@ -645,10 +645,10 @@ void BoneExtended::set_bone_layers(std::string layerString, std::vector= layer_labels.size()) { - layer_labels.push_back(layer); /* remember layer number for future usage*/ + layer_labels.push_back(layer); /* Remember layer number for future usage. */ } if (pos > 31) { diff --git a/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc b/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc index 438263167ca..a9745415d40 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc @@ -295,7 +295,7 @@ void GpencilExporterSVG::export_stroke_to_path(bGPDlayer *gpl, const float2 screen_co = gpencil_3D_point_to_2D(&pt.x); txt.append(std::to_string(screen_co.x) + "," + std::to_string(screen_co.y)); } - /* Close patch (cyclic)*/ + /* Close patch (cyclic). */ if (gps->flag & GP_STROKE_CYCLIC) { txt.append("z"); } diff --git a/source/blender/io/usd/intern/usd_writer_mesh.cc b/source/blender/io/usd/intern/usd_writer_mesh.cc index 17c41e0edc1..54316e56867 100644 --- a/source/blender/io/usd/intern/usd_writer_mesh.cc +++ b/source/blender/io/usd/intern/usd_writer_mesh.cc @@ -165,7 +165,7 @@ void USDGenericMeshWriter::write_mesh(HierarchyContext &context, Mesh *mesh) /* The material path will be of the form , which is outside the * sub-tree pointed to by ref_path. As a result, the referenced data is not allowed to point * out of its own sub-tree. It does work when we override the material with exactly the same - * path, though.*/ + * path, though. */ if (usd_export_context_.export_params.export_materials) { assign_materials(context, usd_mesh, usd_mesh_data.face_groups); } diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index fadf8ba36b0..c02035be4ac 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -324,7 +324,7 @@ typedef struct DriverTarget { * (for vars where DTAR_FLAG_STRUCT_REF is used) - MAX_ID_NAME-2. */ char pchan_name[64]; - /** Transform channel index (for DVAR_TYPE_TRANSFORM_CHAN.)*/ + /** Transform channel index (for #DVAR_TYPE_TRANSFORM_CHAN). */ short transChan; /** Rotation channel calculation type. */ diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 0bb9a0837f1..f397b7f27b4 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -221,7 +221,7 @@ typedef enum eBone_Flag { BONE_TIPSEL = (1 << 2), /** Used instead of BONE_SELECTED during transform (clear before use) */ BONE_TRANSFORM = (1 << 3), - /** when bone has a parent, connect head of bone to parent's tail*/ + /** When bone has a parent, connect head of bone to parent's tail. */ BONE_CONNECTED = (1 << 4), /* 32 used to be quatrot, was always set in files, do not reuse unless you clear it always */ /** hidden Bones when drawing PoseChannels */ diff --git a/source/blender/makesdna/DNA_boid_types.h b/source/blender/makesdna/DNA_boid_types.h index 540446ccd9d..02a4d87498a 100644 --- a/source/blender/makesdna/DNA_boid_types.h +++ b/source/blender/makesdna/DNA_boid_types.h @@ -43,7 +43,7 @@ typedef enum eBoidRuleType { eBoidRuleType_Flock = 5, /** follow a boid or assigned object */ eBoidRuleType_FollowLeader = 6, - /** maintain speed, flight level or wander*/ + /** Maintain speed, flight level or wander. */ eBoidRuleType_AverageSpeed = 7, /** go to closest enemy and attack when in range */ eBoidRuleType_Fight = 8, diff --git a/source/blender/makesdna/DNA_brush_enums.h b/source/blender/makesdna/DNA_brush_enums.h index 093a1a00ece..6563afd2b4a 100644 --- a/source/blender/makesdna/DNA_brush_enums.h +++ b/source/blender/makesdna/DNA_brush_enums.h @@ -25,7 +25,7 @@ extern "C" { #endif /* BrushGpencilSettings->preset_type. - * Use a range for each group and not continuous values.*/ + * Use a range for each group and not continuous values. */ typedef enum eGPBrush_Presets { GP_BRUSH_PRESET_UNKNOWN = 0, diff --git a/source/blender/makesdna/DNA_effect_types.h b/source/blender/makesdna/DNA_effect_types.h index 307a212a139..3de13169616 100644 --- a/source/blender/makesdna/DNA_effect_types.h +++ b/source/blender/makesdna/DNA_effect_types.h @@ -27,30 +27,30 @@ extern "C" { #endif -/* don't forget, new effects also in writefile.c for dna!!! */ +/* Don't forget, new effects also in writefile.c for DNA! */ #define PAF_MAXMULT 4 -/* paf->flag (keep bit 0 free for compatibility) */ +/* paf->flag (keep bit 0 free for compatibility). */ #define PAF_BSPLINE 2 #define PAF_STATIC 4 #define PAF_FACE 8 #define PAF_ANIMATED 16 -/* show particles before they're emitted*/ +/* show particles before they're emitted. */ #define PAF_UNBORN 32 -/* emit only from faces*/ +/* Emit only from faces. */ #define PAF_OFACE 64 -/* show emitter (don't hide actual mesh)*/ +/* show emitter (don't hide actual mesh). */ #define PAF_SHOWE 128 -/* true random emit from faces (not just ordered jitter)*/ +/* true random emit from faces (not just ordered jitter). */ #define PAF_TRAND 256 -/* even distribution in face emission based on face areas*/ +/* even distribution in face emission based on face areas. */ #define PAF_EDISTR 512 -/*show particles after they've died*/ +/* Show particles after they've died. */ #define PAF_DIED 2048 -/*paf->flag2 for pos/neg paf->flag2neg*/ -#define PAF_TEXTIME 1 /*texture timing*/ +/* `paf->flag2` for pos/neg `paf->flag2neg`. */ +#define PAF_TEXTIME 1 /* Texture timing. */ /* eff->type */ #define EFF_BUILD 0 diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h index 74d668a1081..57bfe281c8e 100644 --- a/source/blender/makesdna/DNA_genfile.h +++ b/source/blender/makesdna/DNA_genfile.h @@ -90,7 +90,7 @@ struct SDNA *DNA_sdna_from_data(const void *data, const char **r_error_message); void DNA_sdna_free(struct SDNA *sdna); -/* Access for current Blender versions SDNA*/ +/* Access for current Blender versions SDNA. */ void DNA_sdna_current_init(void); /* borrowed reference */ const struct SDNA *DNA_sdna_current_get(void); diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index 6bedcb648c6..d0ae50d09ef 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -557,7 +557,7 @@ typedef enum eGPDlayer_Flag { /* Unlock color */ GP_LAYER_UNLOCK_COLOR = (1 << 12), /* Mask Layer */ - GP_LAYER_USE_MASK = (1 << 13), /*TODO: DEPRECATED */ + GP_LAYER_USE_MASK = (1 << 13), /* TODO: DEPRECATED */ /* Ruler Layer */ GP_LAYER_IS_RULER = (1 << 14), /* Disable masks in viewlayer render */ diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h index cc467f36666..0552c449819 100644 --- a/source/blender/makesdna/DNA_ipo_types.h +++ b/source/blender/makesdna/DNA_ipo_types.h @@ -432,10 +432,10 @@ typedef struct Ipo { #define PART_TOTNAM 25 #define PART_EMIT_FREQ 1 -/* #define PART_EMIT_LIFE 2 */ /*UNUSED*/ +// #define PART_EMIT_LIFE 2 /* UNUSED */ #define PART_EMIT_VEL 3 #define PART_EMIT_AVE 4 -/* #define PART_EMIT_SIZE 5 */ /*UNUSED*/ +// #define PART_EMIT_SIZE 5 /* UNUSED */ #define PART_AVE 6 #define PART_SIZE 7 diff --git a/source/blender/makesdna/DNA_lightprobe_types.h b/source/blender/makesdna/DNA_lightprobe_types.h index 48e3c44e2c9..038de8e49cc 100644 --- a/source/blender/makesdna/DNA_lightprobe_types.h +++ b/source/blender/makesdna/DNA_lightprobe_types.h @@ -106,7 +106,7 @@ enum { LIGHTPROBE_DISP_REFLECTIVE = 3, }; -/* Probe->parallax && Probe->attenuation_type*/ +/* Probe->parallax && Probe->attenuation_type. */ enum { LIGHTPROBE_SHAPE_ELIPSOID = 0, LIGHTPROBE_SHAPE_BOX = 1, diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 566173aac0f..144e4594c98 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -141,7 +141,7 @@ typedef struct Mesh { struct MSelect *mselect; /* BMESH ONLY */ - /*new face structures*/ + /* New face structures. */ struct MPoly *mpoly; struct MLoop *mloop; struct MLoopUV *mloopuv; diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h index a991f654b09..d257363b6ef 100644 --- a/source/blender/makesdna/DNA_meta_types.h +++ b/source/blender/makesdna/DNA_meta_types.h @@ -106,7 +106,7 @@ typedef struct MetaBall { float thresh; /* used in editmode */ - /*ListBase edit_elems;*/ + // ListBase edit_elems; MetaElem *lastelem; void *batch_cache; diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 158b00b9302..dfe49452636 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -217,7 +217,7 @@ typedef struct LatticeModifierData { char _pad[2]; } LatticeModifierData; -/*Lattice modifier flags */ +/* Lattice modifier flags. */ enum { MOD_LATTICE_INVERT_VGROUP = (1 << 0), }; diff --git a/source/blender/makesdna/DNA_object_fluidsim_types.h b/source/blender/makesdna/DNA_object_fluidsim_types.h index b8848ccc458..1198983c898 100644 --- a/source/blender/makesdna/DNA_object_fluidsim_types.h +++ b/source/blender/makesdna/DNA_object_fluidsim_types.h @@ -44,7 +44,7 @@ typedef struct FluidsimSettings { char _pad1[4]; /* domain, fluid or obstacle */ short type; - /* display advanced options in fluid sim tab (on=1, off=0)*/ + /* Display advanced options in fluid sim tab (on=1, off=0). */ short show_advancedoptions; /* domain object settings */ diff --git a/source/blender/makesdna/DNA_object_force_types.h b/source/blender/makesdna/DNA_object_force_types.h index 3d8418fb734..fcaac4ded76 100644 --- a/source/blender/makesdna/DNA_object_force_types.h +++ b/source/blender/makesdna/DNA_object_force_types.h @@ -279,7 +279,7 @@ typedef struct SoftBody { /* ---------------------------------------------------- */ float secondspring; - /* self collision*/ + /* Self collision. */ /** Fixed collision ball size if > 0. */ float colball; /** Cooling down collision response. */ @@ -319,7 +319,7 @@ typedef struct SoftBody { /* pd->flag: various settings */ #define PFIELD_USEMAX (1 << 0) -/*#define PDEFLE_DEFORM (1 << 1)*/ /*UNUSED*/ +// #define PDEFLE_DEFORM (1 << 1) /* UNUSED */ /** TODO: do_versions for below */ #define PFIELD_GUIDE_PATH_ADD (1 << 2) /** used for do_versions */ diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 527b162a76d..8d861647bd2 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -66,7 +66,7 @@ typedef struct bDeformGroup { char flag, _pad0[7]; } bDeformGroup; -/* Face Maps*/ +/* Face Maps. */ typedef struct bFaceMap { struct bFaceMap *next, *prev; /** MAX_VGROUP_NAME. */ @@ -646,9 +646,9 @@ enum { OB_BOUND_SPHERE = 1, OB_BOUND_CYLINDER = 2, OB_BOUND_CONE = 3, - /* OB_BOUND_TRIANGLE_MESH = 4, */ /* UNUSED */ - /* OB_BOUND_CONVEX_HULL = 5, */ /* UNUSED */ - /* OB_BOUND_DYN_MESH = 6, */ /*UNUSED*/ + // OB_BOUND_TRIANGLE_MESH = 4, /* UNUSED */ + // OB_BOUND_CONVEX_HULL = 5, /* UNUSED */ + // OB_BOUND_DYN_MESH = 6, /* UNUSED */ OB_BOUND_CAPSULE = 7, }; diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 30b1fbe09d3..0253de9f9d1 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -157,7 +157,7 @@ typedef struct ParticleData { } ParticleData; typedef struct SPHFluidSettings { - /*Particle Fluid*/ + /* Particle Fluid. */ float radius, spring_k, rest_length; float plasticity_constant, yield_ratio; float plasticity_balance, yield_balance; @@ -479,8 +479,8 @@ enum { #define PART_HAIR_REGROW 16 /* regrow hair for each frame */ -#define PART_UNBORN 32 /*show unborn particles*/ -#define PART_DIED 64 /*show died particles*/ +#define PART_UNBORN 32 /* Show unborn particles. */ +#define PART_DIED 64 /* Show died particles. */ #define PART_TRAND 128 #define PART_EDISTR 256 /* particle/face from face areas */ @@ -508,7 +508,7 @@ enum { #define PART_CHILD_EFFECT (1 << 27) #define PART_CHILD_LONG_HAIR (1 << 28) -/* #define PART_CHILD_RENDER (1 << 29) */ /*UNUSED*/ +// #define PART_CHILD_RENDER (1 << 29) /* UNUSED */ #define PART_CHILD_GUIDE (1 << 30) #define PART_SELF_EFFECT (1 << 22) @@ -565,7 +565,7 @@ typedef enum eParticleShapeFlag { #define PART_TIME_AUTOSF 1 /* Automatic subframes */ /* part->draw_as */ -/* part->ren_as*/ +/* part->ren_as */ #define PART_DRAW_NOT 0 #define PART_DRAW_DOT 1 #define PART_DRAW_HALO 1 diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index fad3b2a8475..4da2bbb58c0 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -2258,7 +2258,7 @@ enum { #define UVCALC_NO_ASPECT_CORRECT (1 << 1) /** Adjust UV's while transforming with Vert or Edge Slide. */ #define UVCALC_TRANSFORM_CORRECT_SLIDE (1 << 2) -/** Use mesh data after subsurf to compute UVs*/ +/** Use mesh data after subsurf to compute UV's. */ #define UVCALC_USESUBSURF (1 << 3) /** adjust UV's while transforming to avoid distortion */ #define UVCALC_TRANSFORM_CORRECT (1 << 4) diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index 8d3ac3a7814..ce25f8e40b7 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -567,8 +567,8 @@ enum { PNL_SELECT = (1 << 0), PNL_UNUSED_1 = (1 << 1), /* Cleared */ PNL_CLOSED = (1 << 2), - /* PNL_TABBED = (1 << 3), */ /*UNUSED*/ - /* PNL_OVERLAP = (1 << 4), */ /*UNUSED*/ + // PNL_TABBED = (1 << 3), /* UNUSED */ + // PNL_OVERLAP = (1 << 4), /* UNUSED */ PNL_PIN = (1 << 5), PNL_POPOVER = (1 << 6), /** The panel has been drag-drop reordered and the instanced panel list needs to be rebuilt. */ diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index 59b153397c1..1bd4c9233e3 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -545,8 +545,8 @@ enum { /* convenience define for all selection flags */ #define SEQ_ALLSEL (SELECT + SEQ_LEFTSEL + SEQ_RIGHTSEL) -/* deprecated, don't use a flag anymore*/ -/*#define SEQ_ACTIVE 1048576*/ +/* Deprecated, don't use a flag anymore. */ +// #define SEQ_ACTIVE 1048576 #define SEQ_COLOR_BALANCE_INVERSE_GAIN 1 #define SEQ_COLOR_BALANCE_INVERSE_GAMMA 2 diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 2b9a4f7ba1d..9a66d16610d 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -1806,8 +1806,8 @@ typedef enum eSpaceClip_Flag { /* SpaceClip.mode */ typedef enum eSpaceClip_Mode { SC_MODE_TRACKING = 0, - /*SC_MODE_RECONSTRUCTION = 1,*/ /* DEPRECATED */ - /*SC_MODE_DISTORTION = 2,*/ /* DEPRECATED */ + // SC_MODE_RECONSTRUCTION = 1, /* DEPRECATED */ + // SC_MODE_DISTORTION = 2, /* DEPRECATED */ SC_MODE_MASKEDIT = 3, } eSpaceClip_Mode; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 98261dea232..7abd960c467 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -496,7 +496,7 @@ typedef struct bTheme { /* 20 sets of bone colors for this theme */ ThemeWireColor tarm[20]; - /*ThemeWireColor tobj[20];*/ + // ThemeWireColor tobj[20]; /* See COLLECTION_COLOR_TOT for the number of collection colors. */ ThemeCollectionColor collection_color[8]; diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 91c9f3a9204..24cfc1d84f6 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -506,7 +506,7 @@ static int add_name(const char *str) buf[i + 2] = ')'; buf[i + 3] = 0; } - /* now proceed with buf*/ + /* Now proceed with buf. */ DEBUG_PRINTF(3, "\t\t\t\t\tProposing fp name %s\n", buf); name = buf; } @@ -1212,8 +1212,8 @@ static int make_structDNA(const char *base_directory, add_type("ushort", 2); /* SDNA_TYPE_USHORT */ add_type("int", 4); /* SDNA_TYPE_INT */ - /* note, long isn't supported, - * these are place-holders to maintain alignment with eSDNA_Type*/ + /* NOTE: long isn't supported, + * these are place-holders to maintain alignment with #eSDNA_Type. */ add_type("long", 4); /* SDNA_TYPE_LONG */ add_type("ulong", 4); /* SDNA_TYPE_ULONG */ diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index 17396a6a000..96604b8a5fe 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -555,7 +555,7 @@ typedef struct ParameterList { typedef struct ParameterIterator { struct ParameterList *parms; - /* PointerRNA funcptr; */ /*UNUSED*/ + // PointerRNA funcptr; /* UNUSED */ void *data; int size, offset; diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 80d6b11ca3f..6f1f75bd46e 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -3766,16 +3766,16 @@ void RNA_property_pointer_set(PointerRNA *ptr, PointerRNA RNA_property_pointer_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop)) { - /*PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop; */ + // PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop; - /* BLI_assert(RNA_property_type(prop) == PROP_POINTER); */ + // BLI_assert(RNA_property_type(prop) == PROP_POINTER); return PointerRNA_NULL; /* FIXME: there has to be a way... */ } void RNA_property_pointer_add(PointerRNA *ptr, PropertyRNA *prop) { - /*IDProperty *idprop;*/ + // IDProperty *idprop; BLI_assert(RNA_property_type(prop) == PROP_POINTER); @@ -7375,7 +7375,7 @@ int RNA_parameter_list_ret_count(ParameterList *parms) void RNA_parameter_list_begin(ParameterList *parms, ParameterIterator *iter) { /* may be useful but unused now */ - /* RNA_pointer_create(NULL, &RNA_Function, parms->func, &iter->funcptr); */ /*UNUSED*/ + // RNA_pointer_create(NULL, &RNA_Function, parms->func, &iter->funcptr); /* UNUSED */ iter->parms = parms; iter->parm = parms->func->cont.properties.first; diff --git a/source/blender/makesrna/intern/rna_animation_api.c b/source/blender/makesrna/intern/rna_animation_api.c index 95b89e7efe4..fba523c9f89 100644 --- a/source/blender/makesrna/intern/rna_animation_api.c +++ b/source/blender/makesrna/intern/rna_animation_api.c @@ -70,7 +70,7 @@ static float rna_AnimData_nla_tweak_strip_time_to_scene(AnimData *adt, float fra void RNA_api_keyingset(StructRNA *srna) { FunctionRNA *func; - /*PropertyRNA *parm; */ + // PropertyRNA *parm; /* validate relative Keying Set (used to ensure paths are ok for context) */ func = RNA_def_function(srna, "refresh", "rna_KeyingSet_context_refresh"); diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index af0661756db..b3b0d7d13f7 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -1438,7 +1438,7 @@ static void rna_def_armature_edit_bones(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "remove", "rna_Armature_edit_bone_remove"); RNA_def_function_flag(func, FUNC_USE_REPORTS); RNA_def_function_ui_description(func, "Remove an existing bone from the armature"); - /* target to remove*/ + /* Target to remove. */ parm = RNA_def_pointer(func, "bone", "EditBone", "", "EditBone to remove"); RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c index 3e3452af713..40a64ffccd1 100644 --- a/source/blender/makesrna/intern/rna_boid.c +++ b/source/blender/makesrna/intern/rna_boid.c @@ -491,10 +491,12 @@ static void rna_def_boidrule(BlenderRNA *brna) RNA_def_property_ui_text(prop, "On Land", "Use rule when boid is on land"); RNA_def_property_update(prop, 0, "rna_Boids_reset"); - /*prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE); */ - /*RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);*/ - /*RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded); */ - /*RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface"); */ +# if 0 + prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE); + RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded); + RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface"); +# endif /* types */ rna_def_boidrule_goal(brna); diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 2a4cd1d934a..299cd2504a8 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -1418,7 +1418,7 @@ static void rna_def_text(BlenderRNA *brna) static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop) { StructRNA *srna; - /*PropertyRNA *prop; */ + // PropertyRNA *prop; FunctionRNA *func; PropertyRNA *parm; @@ -1448,7 +1448,7 @@ static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop) static void rna_def_curve_spline_bezpoints(BlenderRNA *brna, PropertyRNA *cprop) { StructRNA *srna; - /*PropertyRNA *prop; */ + // PropertyRNA *prop; FunctionRNA *func; PropertyRNA *parm; @@ -1954,14 +1954,14 @@ static void rna_def_curve_nurb(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Curve_update_data"); prop = RNA_def_property(srna, "point_count_u", PROP_INT, PROP_UNSIGNED); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* Editing this needs knot recalc. */ RNA_def_property_int_sdna(prop, NULL, "pntsu"); RNA_def_property_ui_text( prop, "Points U", "Total number points for the curve or surface in the U direction"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); prop = RNA_def_property(srna, "point_count_v", PROP_INT, PROP_UNSIGNED); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* Editing this needs knot recalc. */ RNA_def_property_int_sdna(prop, NULL, "pntsv"); RNA_def_property_ui_text( prop, "Points V", "Total number points for the surface on the V direction"); @@ -2074,7 +2074,7 @@ static void rna_def_curve_nurb(BlenderRNA *brna) prop = RNA_def_property(srna, "character_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "charidx"); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/ + RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* Editing this needs knot recalc. */ RNA_def_property_ui_text(prop, "Character Index", "Location of this character in the text data (only for text curves)"); diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 6a2e23cfbae..0c6c3fd9b0a 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -1281,7 +1281,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, int type, int subtype) { - /*StructRNA *srna = DefRNA.laststruct;*/ /* invalid for python defined props */ + // StructRNA *srna = DefRNA.laststruct; /* Invalid for Python defined props. */ ContainerRNA *cont = cont_; ContainerDefRNA *dcont; PropertyDefRNA *dprop = NULL; diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c index 83df997b3d4..0dfd7d74c25 100644 --- a/source/blender/makesrna/intern/rna_dynamicpaint.c +++ b/source/blender/makesrna/intern/rna_dynamicpaint.c @@ -226,7 +226,7 @@ static bool rna_DynamicPaint_is_cache_user_get(PointerRNA *ptr) return (surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ) ? 1 : 0; } -/* does output layer exist*/ +/* Does output layer exist. */ static bool rna_DynamicPaint_is_output_exists(DynamicPaintSurface *surface, Object *ob, int index) { return dynamicPaint_outputLayerExists(surface, ob, index); diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index b7016bfc1e9..2383bc607a0 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -61,8 +61,8 @@ const EnumPropertyItem rna_enum_fmodifier_type_items[] = { "Reshape F-Curve values, e.g. change amplitude of movements"}, {FMODIFIER_TYPE_CYCLES, "CYCLES", 0, "Cycles", "Cyclic extend/repeat keyframe sequence"}, {FMODIFIER_TYPE_NOISE, "NOISE", 0, "Noise", "Add pseudo-random noise on top of F-Curves"}, - /*{FMODIFIER_TYPE_FILTER, "FILTER", 0, "Filter", ""},*/ /* FIXME: not implemented yet! */ - /*{FMODIFIER_TYPE_PYTHON, "PYTHON", 0, "Python", ""},*/ /* FIXME: not implemented yet! */ + // {FMODIFIER_TYPE_FILTER, "FILTER", 0, "Filter", ""}, /* FIXME: not implemented yet! */ + // {FMODIFIER_TYPE_PYTHON, "PYTHON", 0, "Python", ""}, /* FIXME: not implemented yet! */ {FMODIFIER_TYPE_LIMITS, "LIMITS", 0, @@ -1449,7 +1449,7 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna) static void rna_def_fmodifier_python(BlenderRNA *brna) { StructRNA *srna; - /*PropertyRNA *prop; */ + // PropertyRNA *prop; srna = RNA_def_struct(brna, "FModifierPython", "FModifier"); RNA_def_struct_ui_text( diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index 5d853d74310..24bc5504a58 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -1008,7 +1008,7 @@ static void rna_def_mask_layer(BlenderRNA *brna) RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, -1); RNA_def_property_update(prop, NC_MASK | NA_EDITED, NULL); - /* select (for dopesheet)*/ + /* Select (for dope-sheet). */ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", MASK_LAYERFLAG_SELECT); RNA_def_property_ui_text(prop, "Select", "Layer is selected for editing in the Dope Sheet"); diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 2229fca1b45..81cf1447604 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -2463,7 +2463,7 @@ static void rna_def_mesh_loops(BlenderRNA *brna, PropertyRNA *cprop) { StructRNA *srna; - /*PropertyRNA *prop;*/ + // PropertyRNA *prop; FunctionRNA *func; PropertyRNA *parm; diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index eb7da0d0ce2..30baf01e952 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -287,7 +287,7 @@ static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), P pid2 = pid; } else if (cache->name[0] != '\0' && STREQ(cache->name, pid->cache->name)) { - /*TODO: report "name exists" to user */ + /* TODO: report "name exists" to user. */ BLI_strncpy(cache->name, cache->prev_name, sizeof(cache->name)); use_new_name = false; } @@ -2047,10 +2047,10 @@ static void rna_def_softbody(BlenderRNA *brna) prop, "Estimate Transforms", "Store the estimated transforms in the soft body settings"); /***********************************************************************************/ - /* these are not exactly settings, but reading calculated results*/ - /* but i did not want to start a new property struct */ - /* so rather rename this from SoftBodySettings to SoftBody */ - /* translation */ + /* These are not exactly settings, but reading calculated results + * but i did not want to start a new property struct + * so rather rename this from SoftBodySettings to SoftBody + * translation. */ prop = RNA_def_property(srna, "location_mass_center", PROP_FLOAT, PROP_TRANSLATION); RNA_def_property_float_sdna(prop, NULL, "lcom"); RNA_def_property_ui_text(prop, "Center of Mass", "Location of center of mass"); diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 46f60137ff2..9ab685fa462 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -1361,9 +1361,11 @@ static const EnumPropertyItem *rna_Particle_from_itemf(bContext *UNUSED(C), PropertyRNA *UNUSED(prop), bool *UNUSED(r_free)) { - /*if (part->type==PART_REACTOR) */ - /* return part_reactor_from_items; */ - /*else */ +# if 0 + if (part->type == PART_REACTOR) { + return part_reactor_from_items; + } +# endif return part_from_items; } @@ -1762,7 +1764,7 @@ static void rna_def_particle_key(BlenderRNA *brna) static void rna_def_child_particle(BlenderRNA *brna) { StructRNA *srna; - /*PropertyRNA *prop; */ + // PropertyRNA *prop; srna = RNA_def_struct(brna, "ChildParticle", NULL); RNA_def_struct_ui_text( @@ -1842,8 +1844,8 @@ static void rna_def_particle(BlenderRNA *brna) RNA_def_property_struct_type(prop, "ParticleKey"); RNA_def_property_ui_text(prop, "Keyed States", ""); /* */ - /* float fuv[4], foffset; */ /* coordinates on face/edge number "num" and depth along*/ - /* face normal for volume emission */ + /* float fuv[4], foffset; */ /* Coordinates on face/edge number "num" and depth along. */ + /* Face normal for volume emission. */ prop = RNA_def_property(srna, "birth_time", PROP_FLOAT, PROP_TIME); RNA_def_property_float_sdna(prop, NULL, "time"); @@ -2428,7 +2430,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; - /*TODO: names, tooltips */ + /* TODO: names, tool-tips. */ static const EnumPropertyItem integrator_type_items[] = { {PART_INT_EULER, "EULER", 0, "Euler", ""}, {PART_INT_VERLET, "VERLET", 0, "Verlet", ""}, @@ -2661,7 +2663,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "React On", "The event of target particles to react on"); RNA_def_property_update(prop, 0, "rna_Particle_reset"); - /*draw flag*/ + /* Draw flag. */ prop = RNA_def_property(srna, "show_guide_hairs", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_GUIDE_HAIRS); RNA_def_property_ui_text(prop, "Guide Hairs", "Show guide hairs"); @@ -2808,9 +2810,9 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Random Bending Stiffness", "Random stiffness of hairs"); RNA_def_property_update(prop, 0, "rna_Particle_cloth_update"); - /*TODO: not found in UI, readonly? */ + /* TODO: not found in UI, read-only? */ prop = RNA_def_property(srna, "keys_step", PROP_INT, PROP_NONE); - RNA_def_property_range(prop, 0, SHRT_MAX); /*TODO:min,max */ + RNA_def_property_range(prop, 0, SHRT_MAX); /* TODO: min,max. */ RNA_def_property_ui_text(prop, "Keys Step", ""); /* adaptive path rendering */ @@ -2872,7 +2874,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) /* general values */ prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_TIME); - RNA_def_property_float_sdna(prop, NULL, "sta"); /*optional if prop names are the same */ + RNA_def_property_float_sdna(prop, NULL, "sta"); /* Optional if prop names are the same. */ RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_start_set", NULL); @@ -2961,7 +2963,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Particle_reset"); prop = RNA_def_property( - srna, "userjit", PROP_INT, PROP_UNSIGNED); /*TODO: can we get a better name for userjit? */ + srna, "userjit", PROP_INT, PROP_UNSIGNED); /* TODO: can we get a better name for userjit? */ RNA_def_property_int_sdna(prop, NULL, "userjit"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0, 1000); @@ -2994,7 +2996,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) /* initial velocity factors */ prop = RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_VELOCITY); - RNA_def_property_float_sdna(prop, NULL, "normfac"); /*optional if prop names are the same */ + RNA_def_property_float_sdna(prop, NULL, "normfac"); /* Optional if prop names are the same. */ RNA_def_property_range(prop, -1000.0f, 1000.0f); RNA_def_property_ui_range(prop, 0, 100, 1, 3); RNA_def_property_ui_text( @@ -3010,7 +3012,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Particle_reset"); prop = RNA_def_property(srna, "factor_random", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "randfac"); /*optional if prop names are the same */ + RNA_def_property_float_sdna(prop, NULL, "randfac"); /* Optional if prop names are the same. */ RNA_def_property_range(prop, 0.0f, 200.0f); RNA_def_property_ui_range(prop, 0, 100, 1, 3); RNA_def_property_ui_text(prop, "Random", "Give the starting velocity a random variation"); @@ -3151,7 +3153,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) /* children */ prop = RNA_def_property(srna, "child_nbr", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "child_nbr"); /*optional if prop names are the same */ + RNA_def_property_int_sdna(prop, NULL, "child_nbr"); /* Optional if prop names are the same. */ RNA_def_property_range(prop, 0, 100000); RNA_def_property_ui_range(prop, 0, 1000, 1, -1); RNA_def_property_ui_text(prop, "Children Per Parent", "Number of children per parent"); diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 947776b5088..899c3397361 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -2966,7 +2966,7 @@ static void rna_def_function(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Description", "Description of the Function's purpose"); prop = RNA_def_property(srna, "parameters", PROP_COLLECTION, PROP_NONE); - /*RNA_def_property_clear_flag(prop, PROP_EDITABLE);*/ + // RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "Property"); RNA_def_property_collection_funcs(prop, "rna_Function_parameters_begin", @@ -3270,7 +3270,7 @@ void RNA_def_rna(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - /* Struct*/ + /* Struct */ rna_def_struct(brna); /* Property */ diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index d45339753fe..ceeec13b09d 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -5773,7 +5773,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Lossless Output", "Use lossless output for video streams"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); - /* FFMPEG Audio*/ + /* FFMPEG Audio. */ prop = RNA_def_property(srna, "audio_codec", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio_codec"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c index c5a53d4522d..9dc64fc950c 100644 --- a/source/blender/makesrna/intern/rna_sound.c +++ b/source/blender/makesrna/intern/rna_sound.c @@ -60,7 +60,7 @@ static void rna_def_sound(BlenderRNA *brna) srna, "Sound", "Sound data-block referencing an external or packed sound file"); RNA_def_struct_ui_icon(srna, ICON_SOUND); - /*rna_def_ipo_common(srna); */ + // rna_def_ipo_common(srna); prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "filepath"); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 92d8b299099..3b7af07479c 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2275,7 +2275,7 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna) rna_def_userdef_theme_spaces_edge(srna); rna_def_userdef_theme_spaces_face(srna); - /* Mesh Object specific curves*/ + /* Mesh Object specific curves. */ rna_def_userdef_theme_spaces_curves(srna, true, true, true, false); diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index dfb07560f2b..a563541b968 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -892,7 +892,7 @@ static PointerRNA rna_KeyMapItem_properties_get(PointerRNA *ptr) return *(kmi->ptr); } - /*return rna_pointer_inherit_refine(ptr, &RNA_OperatorProperties, op->properties); */ + // return rna_pointer_inherit_refine(ptr, &RNA_OperatorProperties, op->properties); return PointerRNA_NULL; } diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c index 2874bebe13a..82a6e169a7a 100644 --- a/source/blender/modifiers/intern/MOD_edgesplit.c +++ b/source/blender/modifiers/intern/MOD_edgesplit.c @@ -89,7 +89,7 @@ Mesh *doEdgeSplit(const Mesh *mesh, EdgeSplitModifierData *emd) UNLIKELY(l1 != l2->radial_next) || /* O° angle setting, we want to split on all edges. */ do_split_all || - /* 2 face edge - check angle*/ + /* 2 face edge - check angle. */ (dot_v3v3(l1->f->no, l2->f->no) < threshold)) { BM_elem_flag_enable(e, BM_ELEM_TAG); } diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c index 28fe4376d2c..4e53243d820 100644 --- a/source/blender/modifiers/intern/MOD_explode.c +++ b/source/blender/modifiers/intern/MOD_explode.c @@ -1048,7 +1048,7 @@ static Mesh *explodeMesh(ExplodeModifierData *emd, } BLI_edgehashIterator_free(ehi); - /*map new vertices to faces*/ + /* Map new vertices to faces. */ for (i = 0, u = 0; i < totface; i++) { MFace source; int orig_v4; diff --git a/source/blender/modifiers/intern/MOD_laplaciansmooth.c b/source/blender/modifiers/intern/MOD_laplaciansmooth.c index 78e0bf3fa8f..63495c4104e 100644 --- a/source/blender/modifiers/intern/MOD_laplaciansmooth.c +++ b/source/blender/modifiers/intern/MOD_laplaciansmooth.c @@ -57,18 +57,18 @@ struct BLaplacianSystem { float *eweights; /* Length weights per Edge */ float (*fweights)[3]; /* Cotangent weights per face */ - float *ring_areas; /* Total area per ring*/ - float *vlengths; /* Total sum of lengths(edges) per vertice*/ - float *vweights; /* Total sum of weights per vertice*/ - int numEdges; /* Number of edges*/ - int numLoops; /* Number of edges*/ - int numPolys; /* Number of faces*/ - int numVerts; /* Number of verts*/ - short *numNeFa; /* Number of neighbors faces around vertice*/ - short *numNeEd; /* Number of neighbors Edges around vertice*/ - short *zerola; /* Is zero area or length*/ - - /* Pointers to data*/ + float *ring_areas; /* Total area per ring. */ + float *vlengths; /* Total sum of lengths(edges) per vertex. */ + float *vweights; /* Total sum of weights per vertex. */ + int numEdges; /* Number of edges. */ + int numLoops; /* Number of edges. */ + int numPolys; /* Number of faces. */ + int numVerts; /* Number of verts. */ + short *numNeFa; /* Number of neighbors faces around vertice. */ + short *numNeEd; /* Number of neighbors Edges around vertice. */ + short *zerola; /* Is zero area or length. */ + + /* Pointers to data. */ float (*vertexCos)[3]; const MPoly *mpoly; const MLoop *mloop; @@ -299,7 +299,7 @@ static void fill_laplacian_matrix(LaplacianSystem *sys) for (; l_next != l_term; l_prev = l_curr, l_curr = l_next, l_next++) { const uint l_curr_index = l_curr - sys->mloop; - /* Is ring if number of faces == number of edges around vertice*/ + /* Is ring if number of faces == number of edges around vertice. */ if (sys->numNeEd[l_curr->v] == sys->numNeFa[l_curr->v] && sys->zerola[l_curr->v] == 0) { EIG_linear_solver_matrix_add(sys->context, l_curr->v, diff --git a/source/blender/modifiers/intern/MOD_meshcache.c b/source/blender/modifiers/intern/MOD_meshcache.c index 361454120ca..6ec3277ee7a 100644 --- a/source/blender/modifiers/intern/MOD_meshcache.c +++ b/source/blender/modifiers/intern/MOD_meshcache.c @@ -198,11 +198,11 @@ static void meshcache_do(MeshCacheModifierData *mcmd, me->mloop, me->totvert, - (const float(*)[3])vertexCos_Source, /* from the original Mesh*/ + (const float(*)[3])vertexCos_Source, /* From the original Mesh. */ (const float(*)[3])vertexCos_Real, /* the input we've been given (shape keys!) */ - (const float(*)[3])vertexCos, /* the result of this modifier */ - vertexCos_New /* the result of this function */ + (const float(*)[3])vertexCos, /* The result of this modifier. */ + vertexCos_New /* The result of this function. */ ); /* write the corrected locations back into the result */ diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c index 60c5667472e..62ac9d4452d 100644 --- a/source/blender/modifiers/intern/MOD_particleinstance.c +++ b/source/blender/modifiers/intern/MOD_particleinstance.c @@ -383,7 +383,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * vert_part_value[vindex] = p_random; } - /*change orientation based on object trackflag*/ + /* Change orientation based on object trackflag. */ copy_v3_v3(temp_co, mv->co); mv->co[axis] = temp_co[track]; mv->co[(axis + 1) % 3] = temp_co[(track + 1) % 3]; @@ -490,7 +490,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * mul_m4_v3(spacemat, mv->co); } - /* create edges and adjust edge vertex indices*/ + /* Create edges and adjust edge vertex indices. */ CustomData_copy_data(&mesh->edata, &result->edata, 0, p_skip * totedge, totedge); MEdge *me = &result->medge[p_skip * totedge]; for (k = 0; k < totedge; k++, me++) { diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index b236e0896b7..9c577be1b77 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -518,7 +518,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * } } else { - /*printf("\n\n\n\n\nStarting Modifier\n");*/ + // printf("\n\n\n\n\nStarting Modifier\n"); /* set edge users */ med_new = medge_new; mv_new = mvert_new; @@ -539,7 +539,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * vc->dist = vc->co[other_axis_1] * vc->co[other_axis_1] + vc->co[other_axis_2] * vc->co[other_axis_2]; - /* printf("location %f %f %f -- %f\n", vc->co[0], vc->co[1], vc->co[2], vc->dist);*/ + // printf("location %f %f %f -- %f\n", vc->co[0], vc->co[1], vc->co[2], vc->dist); } } else { @@ -556,7 +556,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * vc->dist = vc->co[other_axis_1] * vc->co[other_axis_1] + vc->co[other_axis_2] * vc->co[other_axis_2]; - /* printf("location %f %f %f -- %f\n", vc->co[0], vc->co[1], vc->co[2], vc->dist);*/ + // printf("location %f %f %f -- %f\n", vc->co[0], vc->co[1], vc->co[2], vc->dist); } } @@ -606,43 +606,43 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * /* compiler complains if not initialized, but it should be initialized below */ bool ed_loop_flip = false; - /*printf("Loop on connected vert: %i\n", i);*/ + // printf("Loop on connected vert: %i\n", i); for (j = 0; j < 2; j++) { - /*printf("\tSide: %i\n", j);*/ + // printf("\tSide: %i\n", j); screwvert_iter_init(<_iter, vert_connect, i, j); if (j == 1) { screwvert_iter_step(<_iter); } while (lt_iter.v_poin) { - /*printf("\t\tVERT: %i\n", lt_iter.v);*/ + // printf("\t\tVERT: %i\n", lt_iter.v); if (lt_iter.v_poin->flag) { - /*printf("\t\t\tBreaking Found end\n");*/ + // printf("\t\t\tBreaking Found end\n"); // endpoints[0] = endpoints[1] = SV_UNUSED; ed_loop_closed = 1; /* circle */ break; } lt_iter.v_poin->flag = 1; vc_tot_linked++; - /*printf("Testing 2 floats %f : %f\n", fl, lt_iter.v_poin->dist);*/ + // printf("Testing 2 floats %f : %f\n", fl, lt_iter.v_poin->dist); if (fl <= lt_iter.v_poin->dist) { fl = lt_iter.v_poin->dist; v_best = lt_iter.v; - /*printf("\t\t\tVERT BEST: %i\n", v_best);*/ + // printf("\t\t\tVERT BEST: %i\n", v_best); } screwvert_iter_step(<_iter); if (!lt_iter.v_poin) { - /*printf("\t\t\tFound End Also Num %i\n", j);*/ - /*endpoints[j] = lt_iter.v_other;*/ /* other is still valid */ + // printf("\t\t\tFound End Also Num %i\n", j); + // endpoints[j] = lt_iter.v_other; /* other is still valid */ break; } } } - /* now we have a collection of used edges. flip their edges the right way*/ - /*if (v_best != SV_UNUSED) - */ + /* Now we have a collection of used edges. flip their edges the right way. */ + /* if (v_best != SV_UNUSED) - */ - /*printf("Done Looking - vc_tot_linked: %i\n", vc_tot_linked);*/ + // printf("Done Looking - vc_tot_linked: %i\n", vc_tot_linked); if (vc_tot_linked > 1) { float vf_1, vf_2, vf_best; @@ -654,8 +654,8 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * /* edge connects on each side! */ if (SV_IS_VALID(vc_tmp->v[0]) && SV_IS_VALID(vc_tmp->v[1])) { - /*printf("Verts on each side (%i %i)\n", vc_tmp->v[0], vc_tmp->v[1]);*/ - /* find out which is higher */ + // printf("Verts on each side (%i %i)\n", vc_tmp->v[0], vc_tmp->v[1]); + /* Find out which is higher. */ vf_1 = tmpf1[ltmd->axis]; vf_2 = tmpf2[ltmd->axis]; @@ -682,8 +682,8 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * } } } - else if (SV_IS_VALID(vc_tmp->v[0])) { /*vertex only connected on 1 side */ - /*printf("Verts on ONE side (%i %i)\n", vc_tmp->v[0], vc_tmp->v[1]);*/ + else if (SV_IS_VALID(vc_tmp->v[0])) { /* Vertex only connected on 1 side. */ + // printf("Verts on ONE side (%i %i)\n", vc_tmp->v[0], vc_tmp->v[1]); if (tmpf1[ltmd->axis] < vc_tmp->co[ltmd->axis]) { /* best is above */ ed_loop_flip = 1; } @@ -697,7 +697,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * } #endif - /*printf("flip direction %i\n", ed_loop_flip);*/ + // printf("flip direction %i\n", ed_loop_flip); /* Switch the flip option if set * NOTE: flip is now done at face level so copying group slices is easier. */ @@ -713,10 +713,10 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * /* if its closed, we only need 1 loop */ for (j = ed_loop_closed; j < 2; j++) { - /*printf("Ordering Side J %i\n", j);*/ + // printf("Ordering Side J %i\n", j); screwvert_iter_init(<_iter, vert_connect, v_best, j); - /*printf("\n\nStarting - Loop\n");*/ + // printf("\n\nStarting - Loop\n"); lt_iter.v_poin->flag = 1; /* so a non loop will traverse the other side */ /* If this is the vert off the best vert and @@ -727,13 +727,13 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * } while (lt_iter.v_poin && lt_iter.v_poin->flag != 2) { - /*printf("\tOrdering Vert V %i\n", lt_iter.v);*/ + // printf("\tOrdering Vert V %i\n", lt_iter.v); lt_iter.v_poin->flag = 2; if (lt_iter.e) { if (lt_iter.v == lt_iter.e->v1) { if (ed_loop_flip == 0) { - /*printf("\t\t\tFlipping 0\n");*/ + // printf("\t\t\tFlipping 0\n"); SWAP(uint, lt_iter.e->v1, lt_iter.e->v2); } #if 0 @@ -744,7 +744,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * } else if (lt_iter.v == lt_iter.e->v2) { if (ed_loop_flip == 1) { - /*printf("\t\t\tFlipping 1\n");*/ + // printf("\t\t\tFlipping 1\n"); SWAP(uint, lt_iter.e->v1, lt_iter.e->v2); } #if 0 diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c index 4dc45ad0324..ce427281db3 100644 --- a/source/blender/modifiers/intern/MOD_subsurf.c +++ b/source/blender/modifiers/intern/MOD_subsurf.c @@ -351,7 +351,7 @@ static bool get_show_adaptive_options(const bContext *C, Panel *panel) return false; } - /* Don't show adaptive options if regular subdivision used*/ + /* Don't show adaptive options if regular subdivision used. */ if (!RNA_boolean_get(ptr, "use_limit_surface")) { return false; } diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c index c6bab89247e..cf4c195c66d 100644 --- a/source/blender/modifiers/intern/MOD_wave.c +++ b/source/blender/modifiers/intern/MOD_wave.c @@ -271,7 +271,7 @@ static void waveModifier_do(WaveModifierData *md, amplit = amplit * wmd->narrow; amplit = (float)(1.0f / expf(amplit * amplit) - minfac); - /*apply texture*/ + /* Apply texture. */ if (tex_co) { Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph); TexResult texres; @@ -280,7 +280,7 @@ static void waveModifier_do(WaveModifierData *md, amplit *= texres.tin; } - /*apply weight & falloff */ + /* Apply weight & falloff. */ amplit *= def_weight * falloff_fac; if (mvert) { diff --git a/source/blender/nodes/composite/nodes/node_composite_channelMatte.c b/source/blender/nodes/composite/nodes/node_composite_channelMatte.c index 29d6335e685..9912c10b368 100644 --- a/source/blender/nodes/composite/nodes/node_composite_channelMatte.c +++ b/source/blender/nodes/composite/nodes/node_composite_channelMatte.c @@ -44,10 +44,10 @@ static void node_composit_init_channel_matte(bNodeTree *UNUSED(ntree), bNode *no c->t3 = 0.0f; c->fsize = 0.0f; c->fstrength = 0.0f; - c->algorithm = 1; /*max channel limiting */ - c->channel = 1; /* limit by red */ - node->custom1 = 1; /* RGB channel */ - node->custom2 = 2; /* Green Channel */ + c->algorithm = 1; /* Max channel limiting. */ + c->channel = 1; /* Limit by red. */ + node->custom1 = 1; /* RGB channel. */ + node->custom2 = 2; /* Green Channel. */ } void register_node_type_cmp_channel_matte(void) diff --git a/source/blender/nodes/composite/nodes/node_composite_levels.c b/source/blender/nodes/composite/nodes/node_composite_levels.c index 5e7a61377fb..7c70ccf412a 100644 --- a/source/blender/nodes/composite/nodes/node_composite_levels.c +++ b/source/blender/nodes/composite/nodes/node_composite_levels.c @@ -37,7 +37,7 @@ static bNodeSocketTemplate cmp_node_view_levels_out[] = { static void node_composit_init_view_levels(bNodeTree *UNUSED(ntree), bNode *node) { - node->custom1 = 1; /*All channels*/ + node->custom1 = 1; /* All channels. */ } void register_node_type_cmp_view_levels(void) diff --git a/source/blender/nodes/composite/nodes/node_composite_rotate.c b/source/blender/nodes/composite/nodes/node_composite_rotate.c index b1ed09966c0..7dd39d5eaa1 100644 --- a/source/blender/nodes/composite/nodes/node_composite_rotate.c +++ b/source/blender/nodes/composite/nodes/node_composite_rotate.c @@ -37,7 +37,7 @@ static bNodeSocketTemplate cmp_node_rotate_out[] = { static void node_composit_init_rotate(bNodeTree *UNUSED(ntree), bNode *node) { - node->custom1 = 1; /* Bilinear Filter*/ + node->custom1 = 1; /* Bilinear Filter. */ } void register_node_type_cmp_rotate(void) diff --git a/source/blender/nodes/shader/nodes/node_shader_hair_info.c b/source/blender/nodes/shader/nodes/node_shader_hair_info.c index fe1361e0d78..843185befb6 100644 --- a/source/blender/nodes/shader/nodes/node_shader_hair_info.c +++ b/source/blender/nodes/shader/nodes/node_shader_hair_info.c @@ -24,7 +24,7 @@ static bNodeSocketTemplate outputs[] = { {SOCK_FLOAT, N_("Intercept"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, {SOCK_FLOAT, N_("Thickness"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, {SOCK_VECTOR, N_("Tangent Normal"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, - /*{ SOCK_FLOAT, 0, N_("Fade"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},*/ + // { SOCK_FLOAT, 0, N_("Fade"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, {SOCK_FLOAT, N_("Random")}, {-1, ""}, }; diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c index e9a58288c5e..22bea8f0273 100644 --- a/source/blender/python/generic/bgl.c +++ b/source/blender/python/generic/bgl.c @@ -41,7 +41,7 @@ /** \name Local utility defines for wrapping OpenGL * \{ */ -/*@ By golly George! It looks like fancy pants macro time!!! */ +/* By golly George! It looks like fancy pants macro time! */ /* TYPE_str is the string to pass to Py_ArgParse (for the format) */ /* TYPE_var is the name to pass to the GL function */ @@ -161,7 +161,7 @@ typedef struct BufferOrOffset { # define buffer_def(number) Buffer *bgl_buffer##number #endif -/*@The standard GL typedefs are used as prototypes, we can't +/* The standard GL typedefs are used as prototypes, we can't * use the GL type directly because Py_ArgParse expects normal * C types. * @@ -505,13 +505,13 @@ static bool compare_dimensions(int ndim, const int *dim1, const Py_ssize_t *dim2 * \{ */ static PySequenceMethods Buffer_SeqMethods = { - (lenfunc)Buffer_len, /*sq_length */ - (binaryfunc)NULL, /*sq_concat */ - (ssizeargfunc)NULL, /*sq_repeat */ - (ssizeargfunc)Buffer_item, /*sq_item */ - (ssizessizeargfunc)NULL, /*sq_slice, deprecated, handled in Buffer_item */ - (ssizeobjargproc)Buffer_ass_item, /*sq_ass_item */ - (ssizessizeobjargproc)NULL, /*sq_ass_slice, deprecated handled in Buffer_ass_item */ + (lenfunc)Buffer_len, /* sq_length */ + (binaryfunc)NULL, /* sq_concat */ + (ssizeargfunc)NULL, /* sq_repeat */ + (ssizeargfunc)Buffer_item, /* sq_item */ + (ssizessizeargfunc)NULL, /* sq_slice, deprecated, handled in Buffer_item */ + (ssizeobjargproc)Buffer_ass_item, /* sq_ass_item */ + (ssizessizeobjargproc)NULL, /* sq_ass_slice, deprecated handled in Buffer_ass_item */ (objobjproc)NULL, /* sq_contains */ (binaryfunc)NULL, /* sq_inplace_concat */ (ssizeargfunc)NULL, /* sq_inplace_repeat */ @@ -582,17 +582,17 @@ static PyGetSetDef Buffer_getseters[] = { }; PyTypeObject BGL_bufferType = { - PyVarObject_HEAD_INIT(NULL, 0) "bgl.Buffer", /*tp_name */ - sizeof(Buffer), /*tp_basicsize */ - 0, /*tp_itemsize */ - (destructor)Buffer_dealloc, /*tp_dealloc */ - (printfunc)NULL, /*tp_print */ - NULL, /*tp_getattr */ - NULL, /*tp_setattr */ - NULL, /*tp_compare */ - (reprfunc)Buffer_repr, /*tp_repr */ - NULL, /*tp_as_number */ - &Buffer_SeqMethods, /*tp_as_sequence */ + PyVarObject_HEAD_INIT(NULL, 0) "bgl.Buffer", /* tp_name */ + sizeof(Buffer), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)Buffer_dealloc, /* tp_dealloc */ + (printfunc)NULL, /* tp_print */ + NULL, /* tp_getattr */ + NULL, /* tp_setattr */ + NULL, /* tp_compare */ + (reprfunc)Buffer_repr, /* tp_repr */ + NULL, /* tp_as_number */ + &Buffer_SeqMethods, /* tp_as_sequence */ &Buffer_AsMapping, /* PyMappingMethods *tp_as_mapping; */ /* More standard operations (here for binary compatibility) */ diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index 8560e7eb663..df6a55fdb9f 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -1305,7 +1305,7 @@ static void BPy_IDGroup_CorrectListLen(IDProperty *prop, PyObject *seq, int len, PyList_SET_ITEM(seq, j, Py_INCREF_RET(Py_None)); } - /*set correct group length*/ + /* Set correct group length. */ prop->len = len; } @@ -1326,8 +1326,8 @@ PyObject *BPy_Wrap_GetKeys(IDProperty *prop) if (i != prop->len) { /* if the loop didn't finish, we know the length is wrong */ BPy_IDGroup_CorrectListLen(prop, list, i, __func__); - Py_DECREF(list); /*free the list*/ - /*call self again*/ + Py_DECREF(list); /* Free the list. */ + /* Call self again. */ return BPy_Wrap_GetKeys(prop); } @@ -1346,8 +1346,8 @@ PyObject *BPy_Wrap_GetValues(ID *id, IDProperty *prop) if (i != prop->len) { BPy_IDGroup_CorrectListLen(prop, list, i, __func__); - Py_DECREF(list); /*free the list*/ - /*call self again*/ + Py_DECREF(list); /* Free the list. */ + /* Call self again. */ return BPy_Wrap_GetValues(id, prop); } @@ -1369,8 +1369,8 @@ PyObject *BPy_Wrap_GetItems(ID *id, IDProperty *prop) if (i != prop->len) { BPy_IDGroup_CorrectListLen(prop, seq, i, __func__); - Py_DECREF(seq); /*free the list*/ - /*call self again*/ + Py_DECREF(seq); /* Free the list. */ + /* Call self again. */ return BPy_Wrap_GetItems(id, prop); } @@ -1557,9 +1557,9 @@ static PySequenceMethods BPy_IDGroup_Seq = { }; static PyMappingMethods BPy_IDGroup_Mapping = { - (lenfunc)BPy_IDGroup_Map_Len, /*inquiry mp_length */ - (binaryfunc)BPy_IDGroup_Map_GetItem, /*binaryfunc mp_subscript */ - (objobjargproc)BPy_IDGroup_Map_SetItem, /*objobjargproc mp_ass_subscript */ + (lenfunc)BPy_IDGroup_Map_Len, /* inquiry mp_length */ + (binaryfunc)BPy_IDGroup_Map_GetItem, /* binaryfunc mp_subscript */ + (objobjargproc)BPy_IDGroup_Map_SetItem, /* objobjargproc mp_ass_subscript */ }; PyTypeObject BPy_IDGroup_Type = { diff --git a/source/blender/python/gpu/gpu_py_buffer.c b/source/blender/python/gpu/gpu_py_buffer.c index e36e3b42617..5c004459b44 100644 --- a/source/blender/python/gpu/gpu_py_buffer.c +++ b/source/blender/python/gpu/gpu_py_buffer.c @@ -577,12 +577,12 @@ static PyGetSetDef pygpu_buffer_getseters[] = { }; static PySequenceMethods pygpu_buffer__tp_as_sequence = { - (lenfunc)pygpu_buffer__sq_length, /*sq_length */ - (binaryfunc)NULL, /*sq_concat */ - (ssizeargfunc)NULL, /*sq_repeat */ - (ssizeargfunc)pygpu_buffer__sq_item, /*sq_item */ - (ssizessizeargfunc)NULL, /*sq_slice, deprecated, handled in pygpu_buffer__sq_item */ - (ssizeobjargproc)pygpu_buffer__sq_ass_item, /*sq_ass_item */ + (lenfunc)pygpu_buffer__sq_length, /* sq_length */ + (binaryfunc)NULL, /* sq_concat */ + (ssizeargfunc)NULL, /* sq_repeat */ + (ssizeargfunc)pygpu_buffer__sq_item, /* sq_item */ + (ssizessizeargfunc)NULL, /* sq_slice, deprecated, handled in pygpu_buffer__sq_item */ + (ssizeobjargproc)pygpu_buffer__sq_ass_item, /* sq_ass_item */ (ssizessizeobjargproc)NULL, /* sq_ass_slice, deprecated handled in pygpu_buffer__sq_ass_item */ (objobjproc)NULL, /* sq_contains */ (binaryfunc)NULL, /* sq_inplace_concat */ diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c index 76fbd8b9920..a7b99f211c2 100644 --- a/source/blender/python/intern/bpy_driver.c +++ b/source/blender/python/intern/bpy_driver.c @@ -86,7 +86,7 @@ int bpy_pydriver_create_dict(void) bpy_pydriver_Dict = d; - /* import some modules: builtins, bpy, math, (Blender.noise)*/ + /* Import some modules: builtins, bpy, math, `Blender.noise`. */ PyDict_SetItemString(d, "__builtins__", PyEval_GetBuiltins()); mod = PyImport_ImportModule("math"); diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 114f9a50813..a3c5d4e9d66 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -6459,11 +6459,11 @@ PyTypeObject pyrna_struct_meta_idprop_Type = { NULL, /* PyMappingMethods *tp_as_mapping; */ /* More standard operations (here for binary compatibility) */ - NULL, /* hashfunc tp_hash; */ - NULL, /* ternaryfunc tp_call; */ - NULL, /* reprfunc tp_str; */ - NULL /*(getattrofunc) pyrna_struct_meta_idprop_getattro*/, /* getattrofunc tp_getattro; */ - (setattrofunc)pyrna_struct_meta_idprop_setattro, /* setattrofunc tp_setattro; */ + NULL, /* hashfunc tp_hash; */ + NULL, /* ternaryfunc tp_call; */ + NULL, /* reprfunc tp_str; */ + NULL /* (getattrofunc) pyrna_struct_meta_idprop_getattro */, /* getattrofunc tp_getattro; */ + (setattrofunc)pyrna_struct_meta_idprop_setattro, /* setattrofunc tp_setattro; */ /* Functions to access object as input/output buffer */ NULL, /* PyBufferProcs *tp_as_buffer; */ @@ -8258,9 +8258,9 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, if (func_arg_count >= 0) { /* -1 if we don't care. */ arg_count = ((PyCodeObject *)PyFunction_GET_CODE(item))->co_argcount; - /* note, the number of args we check for and the number of args we give to + /* NOTE: the number of args we check for and the number of args we give to * '@staticmethods' are different (quirk of Python), - * this is why rna_function_arg_count() doesn't return the value -1*/ + * this is why rna_function_arg_count() doesn't return the value -1. */ if (is_staticmethod) { func_arg_count++; func_arg_min_count++; diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h index c20ceaee4db..75534c05d6c 100644 --- a/source/blender/python/intern/bpy_rna.h +++ b/source/blender/python/intern/bpy_rna.h @@ -183,7 +183,7 @@ StructRNA *pyrna_struct_as_srna(PyObject *self, const bool parent, const char *e void BPY_rna_init(void); PyObject *BPY_rna_module(void); void BPY_update_rna_module(void); -/*PyObject *BPY_rna_doc(void);*/ +// PyObject *BPY_rna_doc(void); PyObject *BPY_rna_types(void); PyObject *pyrna_struct_CreatePyObject(PointerRNA *ptr); diff --git a/source/blender/python/intern/bpy_rna_array.c b/source/blender/python/intern/bpy_rna_array.c index cb3fe9cb600..aafc787b6fc 100644 --- a/source/blender/python/intern/bpy_rna_array.c +++ b/source/blender/python/intern/bpy_rna_array.c @@ -536,11 +536,11 @@ static int py_to_array(PyObject *seq, RNA_SetArrayFunc rna_set_array, const char *error_prefix) { - /*int totdim, dim_size[MAX_ARRAY_DIMENSION];*/ + // int totdim, dim_size[MAX_ARRAY_DIMENSION]; int totitem; char *data = NULL; - /*totdim = RNA_property_array_dimension(ptr, prop, dim_size);*/ /*UNUSED*/ + // totdim = RNA_property_array_dimension(ptr, prop, dim_size); /* UNUSED */ if (validate_array(seq, ptr, prop, 0, check_item_type, item_type_str, &totitem, error_prefix) == -1) { diff --git a/source/blender/python/mathutils/mathutils_Color.h b/source/blender/python/mathutils/mathutils_Color.h index c966bf1e3b2..40de26f01ea 100644 --- a/source/blender/python/mathutils/mathutils_Color.h +++ b/source/blender/python/mathutils/mathutils_Color.h @@ -31,7 +31,7 @@ typedef struct { /* struct data contains a pointer to the actual data that the * object uses. It can use either PyMem allocated data (which will * be stored in py_data) or be a wrapper for data allocated through - * blender (stored in blend_data). This is an either/or struct not both*/ + * Blender (stored in blend_data). This is an either/or struct not both. */ /* prototypes */ PyObject *Color_CreatePyObject(const float col[3], diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index 21f53257154..3dde0177648 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -1339,7 +1339,7 @@ static PyObject *Matrix_to_euler(MatrixObject *self, PyObject *args) copy_v3_v3(eul_compatf, eul_compat->eul); } - /*must be 3-4 cols, 3-4 rows, square matrix */ + /* Must be 3-4 cols, 3-4 rows, square matrix. */ if (self->num_row == 3 && self->num_col == 3) { copy_m3_m3(mat, (const float(*)[3])self->matrix); } @@ -1539,7 +1539,7 @@ static PyObject *Matrix_to_scale(MatrixObject *self) return NULL; } - /*must be 3-4 cols, 3-4 rows, square matrix */ + /* Must be 3-4 cols, 3-4 rows, square matrix. */ if ((self->num_row < 3) || (self->num_col < 3)) { PyErr_SetString(PyExc_ValueError, "Matrix.to_scale(): " @@ -2430,7 +2430,7 @@ static int Matrix_ass_item_col(MatrixObject *self, int col, PyObject *value) } /*----------------------------object[z:y]------------------------ - * sequence slice (get)*/ + * Sequence slice (get). */ static PyObject *Matrix_slice(MatrixObject *self, int begin, int end) { @@ -2456,7 +2456,7 @@ static PyObject *Matrix_slice(MatrixObject *self, int begin, int end) return tuple; } /*----------------------------object[z:y]------------------------ - * sequence slice (set)*/ + * Sequence slice (set). */ static int Matrix_ass_slice(MatrixObject *self, int begin, int end, PyObject *value) { PyObject *value_fast; @@ -2510,7 +2510,7 @@ static int Matrix_ass_slice(MatrixObject *self, int begin, int end, PyObject *va Py_DECREF(value_fast); - /*parsed well - now set in matrix*/ + /* Parsed well - now set in matrix. */ memcpy(self->matrix, mat, self->num_col * self->num_row * sizeof(float)); (void)BaseMath_WriteCallback(self); @@ -2628,7 +2628,7 @@ static PyObject *Matrix_mul(PyObject *m1, PyObject *m2) return Matrix_CreatePyObject(mat, mat2->num_col, mat1->num_row, Py_TYPE(mat1)); } if (mat2) { - /*FLOAT/INT * MATRIX */ + /* FLOAT/INT * MATRIX */ if (((scalar = PyFloat_AsDouble(m1)) == -1.0f && PyErr_Occurred()) == 0) { return matrix_mul_float(mat2, scalar); } @@ -2968,7 +2968,7 @@ static PyObject *Matrix_translation_get(MatrixObject *self, void *UNUSED(closure return NULL; } - /*must be 4x4 square matrix*/ + /* Must be 4x4 square matrix. */ if (self->num_row != 4 || self->num_col != 4) { PyErr_SetString(PyExc_AttributeError, "Matrix.translation: " @@ -2990,7 +2990,7 @@ static int Matrix_translation_set(MatrixObject *self, PyObject *value, void *UNU return -1; } - /*must be 4x4 square matrix*/ + /* Must be 4x4 square matrix. */ if (self->num_row != 4 || self->num_col != 4) { PyErr_SetString(PyExc_AttributeError, "Matrix.translation: " @@ -3034,7 +3034,7 @@ static PyObject *Matrix_median_scale_get(MatrixObject *self, void *UNUSED(closur return NULL; } - /*must be 3-4 cols, 3-4 rows, square matrix*/ + /* Must be 3-4 cols, 3-4 rows, square matrix. */ if ((self->num_row < 3) || (self->num_col < 3)) { PyErr_SetString(PyExc_AttributeError, "Matrix.median_scale: " @@ -3056,7 +3056,7 @@ static PyObject *Matrix_is_negative_get(MatrixObject *self, void *UNUSED(closure return NULL; } - /*must be 3-4 cols, 3-4 rows, square matrix*/ + /* Must be 3-4 cols, 3-4 rows, square matrix. */ if (self->num_row == 4 && self->num_col == 4) { return PyBool_FromLong(is_negative_m4((const float(*)[4])self->matrix)); } @@ -3078,7 +3078,7 @@ static PyObject *Matrix_is_orthogonal_get(MatrixObject *self, void *UNUSED(closu return NULL; } - /*must be 3-4 cols, 3-4 rows, square matrix*/ + /* Must be 3-4 cols, 3-4 rows, square matrix. */ if (self->num_row == 4 && self->num_col == 4) { return PyBool_FromLong(is_orthonormal_m4((const float(*)[4])self->matrix)); } @@ -3101,7 +3101,7 @@ static PyObject *Matrix_is_orthogonal_axis_vectors_get(MatrixObject *self, void return NULL; } - /*must be 3-4 cols, 3-4 rows, square matrix*/ + /* Must be 3-4 cols, 3-4 rows, square matrix. */ if (self->num_row == 4 && self->num_col == 4) { return PyBool_FromLong(is_orthogonal_m4((const float(*)[4])self->matrix)); } @@ -3313,7 +3313,7 @@ PyObject *Matrix_CreatePyObject(const float *mat, self->cb_user = NULL; self->cb_type = self->cb_subtype = 0; - if (mat) { /*if a float array passed*/ + if (mat) { /* If a float array passed. */ memcpy(self->matrix, mat, num_col * num_row * sizeof(float)); } else if (num_col == num_row) { @@ -3655,7 +3655,7 @@ PyTypeObject matrix_access_Type = { NULL, /*tp_compare*/ NULL, /*tp_repr*/ NULL, /*tp_as_number*/ - NULL /*&MatrixAccess_SeqMethods*/ /* TODO */, /*tp_as_sequence*/ + NULL /* &MatrixAccess_SeqMethods */ /* TODO */, /*tp_as_sequence*/ &MatrixAccess_AsMapping, /*tp_as_mapping*/ NULL, /*tp_hash*/ NULL, /*tp_call*/ diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c index 8ecce33d29c..88aa1f146e2 100644 --- a/source/blender/python/mathutils/mathutils_Quaternion.c +++ b/source/blender/python/mathutils/mathutils_Quaternion.c @@ -1113,7 +1113,7 @@ static PyObject *Quaternion_imatmul(PyObject *q1, PyObject *q2) } /* -obj - * returns the negative of this object*/ + * Returns the negative of this object. */ static PyObject *Quaternion_neg(QuaternionObject *self) { float tquat[QUAT_SIZE]; diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index b9c2400767c..a9cb125f715 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -1509,7 +1509,7 @@ static int Vector_ass_slice(VectorObject *self, int begin, int end, PyObject *se return -1; } - /*parsed well - now set in vector*/ + /* Parsed well - now set in vector. */ memcpy(self->vec + begin, vec, size * sizeof(float)); PyMem_Free(vec); @@ -1543,7 +1543,7 @@ static PyObject *Vector_add(PyObject *v1, PyObject *v2) return NULL; } - /*VECTOR + VECTOR*/ + /* VECTOR + VECTOR. */ if (vec1->size != vec2->size) { PyErr_SetString(PyExc_AttributeError, "Vector addition: " @@ -1882,7 +1882,7 @@ static PyObject *Vector_matmul(PyObject *v1, PyObject *v2) return NULL; } - /*dot product*/ + /* Dot product. */ return PyFloat_FromDouble(dot_vn_vn(vec1->vec, vec2->vec, vec1->size)); } if (vec1) { @@ -2007,7 +2007,7 @@ static PyObject *Vector_idiv(PyObject *v1, PyObject *v2) } /* -obj - * returns the negative of this object*/ + * Returns the negative of this object. */ static PyObject *Vector_neg(VectorObject *self) { float *tvec; diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c index 1304447be65..3b1a6524ed9 100644 --- a/source/blender/python/mathutils/mathutils_geometry.c +++ b/source/blender/python/mathutils/mathutils_geometry.c @@ -1213,7 +1213,7 @@ PyDoc_STRVAR(M_Geometry_tessellate_polygon_doc, /* PolyFill function, uses Blenders scanfill to fill multiple poly lines */ static PyObject *M_Geometry_tessellate_polygon(PyObject *UNUSED(self), PyObject *polyLineSeq) { - PyObject *tri_list; /*return this list of tri's */ + PyObject *tri_list; /* Return this list of tri's */ PyObject *polyLine, *polyVec; int i, len_polylines, len_polypoints; bool list_parse_error = false; @@ -1222,7 +1222,7 @@ static PyObject *M_Geometry_tessellate_polygon(PyObject *UNUSED(self), PyObject /* Display #ListBase. */ ListBase dispbase = {NULL, NULL}; DispList *dl; - float *fp; /*pointer to the array of malloced dl->verts to set the points from the vectors */ + float *fp; /* Pointer to the array of malloced dl->verts to set the points from the vectors. */ int totpoints = 0; if (!PySequence_Check(polyLineSeq)) { diff --git a/source/blender/python/mathutils/mathutils_noise.c b/source/blender/python/mathutils/mathutils_noise.c index e37e083d5e1..707fd40e9d0 100644 --- a/source/blender/python/mathutils/mathutils_noise.c +++ b/source/blender/python/mathutils/mathutils_noise.c @@ -230,7 +230,7 @@ static PyC_FlagSet bpy_noise_metrics[] = { {0, NULL}, }; -/* Fills an array of length size with random numbers in the range (-1, 1)*/ +/* Fills an array of length size with random numbers in the range (-1, 1). */ static void rand_vn(float *array_tar, const int size) { float *array_pt = array_tar + (size - 1); diff --git a/source/blender/render/intern/multires_bake.c b/source/blender/render/intern/multires_bake.c index 3fe5ee1100e..0452be68822 100644 --- a/source/blender/render/intern/multires_bake.c +++ b/source/blender/render/intern/multires_bake.c @@ -328,7 +328,7 @@ static void bake_rasterize(const MBakeRast *bake_rast, yhi_beg = (int)ceilf(tmi); yhi = (int)ceilf(thi); - /*if (fTmi>ceilf(fTlo))*/ + // if (fTmi>ceilf(fTlo)) rasterize_half(bake_rast, slo, tlo, smi, tmi, slo, tlo, shi, thi, ylo, yhi_beg, is_mid_right); rasterize_half(bake_rast, smi, tmi, shi, thi, slo, tlo, shi, thi, yhi_beg, yhi, is_mid_right); } diff --git a/source/blender/render/intern/pipeline.c b/source/blender/render/intern/pipeline.c index 20f868ca86f..d3ea27c6bb0 100644 --- a/source/blender/render/intern/pipeline.c +++ b/source/blender/render/intern/pipeline.c @@ -2840,7 +2840,7 @@ RenderPass *RE_create_gp_pass(RenderResult *rr, const char *layername, const cha rl->recty = rr->recty; } - /* clear previous pass if exist or the new image will be over previous one*/ + /* Clear previous pass if exist or the new image will be over previous one. */ RenderPass *rp = RE_pass_find_by_name(rl, RE_PASSNAME_COMBINED, viewname); if (rp) { if (rp->rect) { diff --git a/source/blender/render/intern/render_result.c b/source/blender/render/intern/render_result.c index 74c96392d48..83ed302ea46 100644 --- a/source/blender/render/intern/render_result.c +++ b/source/blender/render/intern/render_result.c @@ -363,7 +363,7 @@ RenderResult *render_result_new( } \ } while (false) - /* a renderlayer should always have a Combined pass*/ + /* A renderlayer should always have a Combined pass. */ render_layer_add_pass(rr, rl, 4, "Combined", view, "RGBA"); if (view_layer->passflag & SCE_PASS_Z) { diff --git a/source/blender/render/intern/texture_pointdensity.c b/source/blender/render/intern/texture_pointdensity.c index 4254f6b0aa6..c0ff00d4f59 100644 --- a/source/blender/render/intern/texture_pointdensity.c +++ b/source/blender/render/intern/texture_pointdensity.c @@ -170,7 +170,7 @@ static void pointdensity_cache_psys( ParticleSimulationData sim = {NULL}; ParticleData *pa = NULL; float cfra = BKE_scene_frame_get(scene); - int i /*, childexists*/ /* UNUSED */; + int i /*, Childexists*/ /* UNUSED */; int total_particles; int data_used; float *data_vel, *data_life; diff --git a/source/blender/sequencer/intern/effects.c b/source/blender/sequencer/intern/effects.c index 1a1136b1de0..1f518a69395 100644 --- a/source/blender/sequencer/intern/effects.c +++ b/source/blender/sequencer/intern/effects.c @@ -3214,7 +3214,7 @@ void seq_effect_speed_rebuild_map(Scene *scene, Sequence *seq, bool force) else { /* if there is no fcurve, use value as simple multiplier */ if (!fcu) { - fallback_fac = seq->speed_fader; /* same as speed_factor in rna*/ + fallback_fac = seq->speed_fader; /* Same as speed_factor in RNA. */ } } diff --git a/source/blender/sequencer/intern/modifier.c b/source/blender/sequencer/intern/modifier.c index b6f56025e6b..75c7d599be5 100644 --- a/source/blender/sequencer/intern/modifier.c +++ b/source/blender/sequencer/intern/modifier.c @@ -1438,7 +1438,7 @@ ImBuf *SEQ_modifier_apply_stack(const SeqRenderData *context, if (smd->mask_time == SEQUENCE_MASK_TIME_RELATIVE) { frame_offset = seq->start; } - else /*if (smd->mask_time == SEQUENCE_MASK_TIME_ABSOLUTE)*/ { + else /* if (smd->mask_time == SEQUENCE_MASK_TIME_ABSOLUTE) */ { frame_offset = smd->mask_id ? ((Mask *)smd->mask_id)->sfra : 0; } diff --git a/source/blender/sequencer/intern/prefetch.c b/source/blender/sequencer/intern/prefetch.c index 4317fa3a850..b7dabda4a34 100644 --- a/source/blender/sequencer/intern/prefetch.c +++ b/source/blender/sequencer/intern/prefetch.c @@ -260,7 +260,7 @@ static void seq_prefetch_update_area(PrefetchJob *pfjob) void SEQ_prefetch_stop_all(void) { - /*TODO(Richard): Use wm_jobs for prefetch, or pass main. */ + /* TODO(Richard): Use wm_jobs for prefetch, or pass main. */ for (Scene *scene = G.main->scenes.first; scene; scene = scene->id.next) { SEQ_prefetch_stop(scene); } @@ -533,7 +533,7 @@ static PrefetchJob *seq_prefetch_start_ex(const SeqRenderData *context, float cf return pfjob; } -/* Start or resume prefetching*/ +/* Start or resume prefetching. */ void seq_prefetch_start(const SeqRenderData *context, float timeline_frame) { Scene *scene = context->scene; diff --git a/source/blender/sequencer/intern/strip_time.c b/source/blender/sequencer/intern/strip_time.c index ecec317ed25..e5eb0b3f00f 100644 --- a/source/blender/sequencer/intern/strip_time.c +++ b/source/blender/sequencer/intern/strip_time.c @@ -60,7 +60,7 @@ float seq_give_frame_index(Sequence *seq, float timeline_frame) } if (seq->flag & SEQ_REVERSE_FRAMES) { - /*reverse frame in this sequence */ + /* Reverse frame in this sequence. */ if (timeline_frame <= sta) { frame_index = end - sta; } diff --git a/source/blender/simulation/intern/SIM_mass_spring.cpp b/source/blender/simulation/intern/SIM_mass_spring.cpp index 3a82c1c2e4e..cf654ebff07 100644 --- a/source/blender/simulation/intern/SIM_mass_spring.cpp +++ b/source/blender/simulation/intern/SIM_mass_spring.cpp @@ -277,10 +277,12 @@ static void cloth_setup_constraints(ClothModifierData *clmd) } } -/* computes where the cloth would be if it were subject to perfectly stiff edges +/** + * Computes where the cloth would be if it were subject to perfectly stiff edges * (edge distance constraints) in a lagrangian solver. then add forces to help * guide the implicit solver to that state. this function is called after - * collisions*/ + * collisions. + */ static int UNUSED_FUNCTION(cloth_calc_helper_forces)(Object *UNUSED(ob), ClothModifierData *clmd, float (*initial_cos)[3], @@ -352,7 +354,7 @@ static int UNUSED_FUNCTION(cloth_calc_helper_forces)(Object *UNUSED(ob), for (i = 0; i < cloth->mvert_num; i++, cv++) { float vec[3]; - /*compute forces*/ + /* Compute forces. */ sub_v3_v3v3(vec, cos[i], cv->tx); mul_v3_fl(vec, cv->mass * dt * 20.0f); add_v3_v3(cv->tv, vec); diff --git a/source/blender/simulation/intern/hair_volume.cpp b/source/blender/simulation/intern/hair_volume.cpp index 08af2344bc4..d954d9b5fff 100644 --- a/source/blender/simulation/intern/hair_volume.cpp +++ b/source/blender/simulation/intern/hair_volume.cpp @@ -722,7 +722,7 @@ bool SIM_hair_volume_solve_divergence(HairGrid *grid, const float flowfac = grid->cellsize; const float inv_flowfac = 1.0f / grid->cellsize; - /*const int num_cells = hair_grid_size(grid->res);*/ + // const int num_cells = hair_grid_size(grid->res); const int res[3] = {grid->res[0], grid->res[1], grid->res[2]}; const int resA[3] = {grid->res[0] + 2, grid->res[1] + 2, grid->res[2] + 2}; @@ -891,7 +891,7 @@ bool SIM_hair_volume_solve_divergence(HairGrid *grid, neighbor_hi_index[neighbors_hi++] = u + strideA2; } - /*int liquid_neighbors = neighbors_lo + neighbors_hi;*/ + // int liquid_neighbors = neighbors_lo + neighbors_hi; non_solid_neighbors = 6; for (n = 0; n < neighbors_lo; n++) { diff --git a/source/blender/simulation/intern/implicit_blender.c b/source/blender/simulation/intern/implicit_blender.c index cf092d7716a..4c01fd3aee0 100644 --- a/source/blender/simulation/intern/implicit_blender.c +++ b/source/blender/simulation/intern/implicit_blender.c @@ -168,7 +168,7 @@ DO_INLINE void zero_lfvector(float (*to)[3], unsigned int verts) { memset(to, 0.0f, verts * sizeof(lfVector)); } -/* multiply long vector with scalar*/ +/* Multiply long vector with scalar. */ DO_INLINE void mul_lfvectorS(float (*to)[3], float (*fLongVector)[3], float scalar, @@ -180,7 +180,7 @@ DO_INLINE void mul_lfvectorS(float (*to)[3], mul_fvector_S(to[i], fLongVector[i], scalar); } } -/* multiply long vector with scalar*/ +/* Multiply long vector with scalar. */ /* A -= B * float */ DO_INLINE void submul_lfvectorS(float (*to)[3], float (*fLongVector)[3], @@ -613,7 +613,7 @@ DO_INLINE void initdiag_bfmatrix(fmatrix3x3 *matrix, float m3[3][3]) } } -/* SPARSE SYMMETRIC multiply big matrix with long vector*/ +/* SPARSE SYMMETRIC multiply big matrix with long vector. */ /* STATUS: verified */ DO_INLINE void mul_bfmatrix_lfvector(float (*to)[3], fmatrix3x3 *from, lfVector *fLongVector) { @@ -644,7 +644,7 @@ DO_INLINE void mul_bfmatrix_lfvector(float (*to)[3], fmatrix3x3 *from, lfVector del_lfvector(temp); } -/* SPARSE SYMMETRIC sub big matrix with big matrix*/ +/* SPARSE SYMMETRIC sub big matrix with big matrix. */ /* A -= B * float + C * float --> for big matrix */ /* VERIFIED */ DO_INLINE void subadd_bfmatrixS_bfmatrixS( diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index cfa7bb7d448..e83e36d7a9b 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -326,7 +326,7 @@ typedef struct wmNotifier { #define ND_LAYOUTDELETE (2 << 16) #define ND_ANIMPLAY (4 << 16) #define ND_GPENCIL (5 << 16) -#define ND_EDITOR_CHANGED (6 << 16) /*sent to new editors after switching to them*/ +#define ND_EDITOR_CHANGED (6 << 16) /* Sent to new editors after switching to them. */ #define ND_LAYOUTSET (7 << 16) #define ND_SKETCH (8 << 16) #define ND_WORKSPACE_SET (9 << 16) @@ -433,7 +433,8 @@ typedef struct wmNotifier { #define ND_SPACE_NLA (16 << 16) #define ND_SPACE_SEQUENCER (17 << 16) #define ND_SPACE_NODE_VIEW (18 << 16) -#define ND_SPACE_CHANGED (19 << 16) /*sent to a new editor type after it's replaced an old one*/ +/* Sent to a new editor type after it's replaced an old one. */ +#define ND_SPACE_CHANGED (19 << 16) #define ND_SPACE_CLIP (20 << 16) #define ND_SPACE_FILE_PREVIEW (21 << 16) #define ND_SPACE_SPREADSHEET (22 << 16) diff --git a/source/blender/windowmanager/intern/wm_keymap_utils.c b/source/blender/windowmanager/intern/wm_keymap_utils.c index 865889e7e64..b0b4f0f5904 100644 --- a/source/blender/windowmanager/intern/wm_keymap_utils.c +++ b/source/blender/windowmanager/intern/wm_keymap_utils.c @@ -247,7 +247,7 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname) else if (STRPREFIX(opname, "MARKER_OT")) { km = WM_keymap_find_all(wm, "Markers", 0, 0); } - /* Import/Export*/ + /* Import/Export */ else if (STRPREFIX(opname, "IMPORT_") || STRPREFIX(opname, "EXPORT_")) { km = WM_keymap_find_all(wm, "Window", 0, 0); } diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index c80e4b26096..a2d783afc32 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -53,7 +53,7 @@ #include "BLI_blenlib.h" #include "BLI_dial_2d.h" -#include "BLI_dynstr.h" /*for WM_operator_pystring */ +#include "BLI_dynstr.h" /* For #WM_operator_pystring. */ #include "BLI_math.h" #include "BLI_utildefines.h" @@ -323,16 +323,16 @@ bool WM_operator_pystring_abbreviate(char *str, int str_len_max) if (parens_len > str_len_max) { const char *comma_first = strchr(parens_start, ','); - /* truncate after the first comma */ + /* Truncate after the first comma. */ if (comma_first) { const char end_str[] = " ... )"; const int end_str_len = sizeof(end_str) - 1; - /* leave a place for the first argument*/ + /* Leave a place for the first argument. */ const int new_str_len = (comma_first - parens_start) + 1; if (str_len >= new_str_len + parens_start_pos + end_str_len + 1) { - /* append " ... )" to the string after the comma */ + /* Append " ... )" to the string after the comma. */ memcpy(str + new_str_len + parens_start_pos, end_str, end_str_len + 1); return true; diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 22fbd277893..1c745ba4c79 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -136,7 +136,7 @@ static void wm_window_set_drawable(wmWindowManager *wm, wmWindow *win, bool acti static bool wm_window_timer(const bContext *C); /* XXX this one should correctly check for apple top header... - * done for Cocoa : returns window contents (and not frame) max size*/ + * done for Cocoa : returns window contents (and not frame) max size. */ void wm_get_screensize(int *r_width, int *r_height) { unsigned int uiwidth; diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h index 223f6cf543d..ccb6e47e7e3 100644 --- a/source/blender/windowmanager/wm_event_types.h +++ b/source/blender/windowmanager/wm_event_types.h @@ -395,7 +395,7 @@ enum { ((ISKEYBOARD(event_type) || ISMOUSE(event_type) || ISNDOF(event_type)) && \ (ISKEYMODIFIER(event_type) == false)) -/* internal helpers*/ +/* Internal helpers. */ #define _VA_IS_EVENT_MOD2(v, a) (CHECK_TYPE_INLINE(v, wmEvent *), ((v)->a)) #define _VA_IS_EVENT_MOD3(v, a, b) (_VA_IS_EVENT_MOD2(v, a) || ((v)->b)) #define _VA_IS_EVENT_MOD4(v, a, b, c) (_VA_IS_EVENT_MOD3(v, a, b) || ((v)->c)) -- cgit v1.2.3