Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-10-10 10:19:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-10 14:04:51 +0300
commit2abfcebb0eb7989e3d1e7d03f37ecf5c088210af (patch)
treee7a1ad5912b4661d4ece743f4f7fd86e6bf4d3c4 /source/blender
parentc735aca42e9f5961fec7e5d5fc196b5bd6b85f56 (diff)
Cleanup: use C comments for descriptive text
Follow our code style guide by using C-comments for text descriptions.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_addon.h2
-rw-r--r--source/blender/blenkernel/BKE_collision.h18
-rw-r--r--source/blender/blenkernel/BKE_scene.h2
-rw-r--r--source/blender/blenkernel/BKE_softbody.h2
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.c2
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf_legacy.c2
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf_util.c2
-rw-r--r--source/blender/blenkernel/intern/action.c16
-rw-r--r--source/blender/blenkernel/intern/anim_data.c10
-rw-r--r--source/blender/blenkernel/intern/armature_test.cc6
-rw-r--r--source/blender/blenkernel/intern/blender_undo.c4
-rw-r--r--source/blender/blenkernel/intern/cloth.c44
-rw-r--r--source/blender/blenkernel/intern/constraint.c8
-rw-r--r--source/blender/blenkernel/intern/curve.c8
-rw-r--r--source/blender/blenkernel/intern/fcurve.c4
-rw-r--r--source/blender/blenkernel/intern/fcurve_test.cc80
-rw-r--r--source/blender/blenkernel/intern/fluid.c2
-rw-r--r--source/blender/blenkernel/intern/fmodifier.c7
-rw-r--r--source/blender/blenkernel/intern/icons.c2
-rw-r--r--source/blender/blenkernel/intern/idprop.c2
-rw-r--r--source/blender/blenkernel/intern/image.c6
-rw-r--r--source/blender/blenkernel/intern/ipo.c47
-rw-r--r--source/blender/blenkernel/intern/key.c6
-rw-r--r--source/blender/blenkernel/intern/layer.c7
-rw-r--r--source/blender/blenkernel/intern/linestyle.c12
-rw-r--r--source/blender/blenkernel/intern/material.c4
-rw-r--r--source/blender/blenkernel/intern/mesh_convert.c2
-rw-r--r--source/blender/blenkernel/intern/mesh_merge.c2
-rw-r--r--source/blender/blenkernel/intern/mesh_validate.c2
-rw-r--r--source/blender/blenkernel/intern/object_update.c2
-rw-r--r--source/blender/blenkernel/intern/outliner_treehash.c2
-rw-r--r--source/blender/blenkernel/intern/particle.c2
-rw-r--r--source/blender/blenkernel/intern/particle_system.c8
-rw-r--r--source/blender/blenkernel/intern/pointcache.c22
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c12
-rw-r--r--source/blender/blenkernel/intern/scene.c8
-rw-r--r--source/blender/blenkernel/intern/shrinkwrap.c22
-rw-r--r--source/blender/blenkernel/intern/softbody.c23
-rw-r--r--source/blender/blenkernel/intern/sound.c10
-rw-r--r--source/blender/blenkernel/intern/text.c2
-rw-r--r--source/blender/blenkernel/intern/texture.c4
-rw-r--r--source/blender/blenkernel/intern/world.c4
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c16
-rw-r--r--source/blender/blenlib/intern/BLI_filelist.c4
-rw-r--r--source/blender/blenlib/intern/fileops.c2
-rw-r--r--source/blender/blenlib/intern/math_color.c2
-rw-r--r--source/blender/blenlib/intern/path_util.c2
-rw-r--r--source/blender/blenlib/intern/system_win32.c2
-rw-r--r--source/blender/blenlib/tests/BLI_path_util_test.cc4
-rw-r--r--source/blender/blenlib/tests/BLI_string_test.cc2
-rw-r--r--source/blender/blenlib/tests/BLI_string_utf8_test.cc146
-rw-r--r--source/blender/blenloader/intern/blend_validate.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c83
-rw-r--r--source/blender/blenloader/intern/versioning_250.c6
-rw-r--r--source/blender/blenloader/intern/versioning_260.c12
-rw-r--r--source/blender/blenloader/intern/versioning_280.c8
-rw-r--r--source/blender/blenloader/intern/versioning_legacy.c10
-rw-r--r--source/blender/blenloader/intern/writefile.c4
-rw-r--r--source/blender/bmesh/operators/bmo_edgenet.c2
-rw-r--r--source/blender/bmesh/tools/bmesh_intersect.c2
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_AlphaOverNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_MixNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ZCombineNode.cpp2
-rw-r--r--source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc20
-rw-r--r--source/blender/depsgraph/intern/depsgraph_query.cc4
-rw-r--r--source/blender/depsgraph/intern/depsgraph_type.cc2
-rw-r--r--source/blender/depsgraph/intern/node/deg_node_operation.h4
-rw-r--r--source/blender/draw/engines/overlay/shaders/edit_uv_verts_frag.glsl22
-rw-r--r--source/blender/draw/engines/overlay/shaders/edit_uv_verts_vert.glsl6
-rw-r--r--source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl8
-rw-r--r--source/blender/draw/intern/shaders/common_fxaa_lib.glsl194
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c104
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c28
-rw-r--r--source/blender/editors/animation/anim_deps.c4
-rw-r--r--source/blender/editors/animation/anim_draw.c16
-rw-r--r--source/blender/editors/animation/anim_filter.c68
-rw-r--r--source/blender/editors/animation/anim_markers.c4
-rw-r--r--source/blender/editors/animation/drivers.c27
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c12
-rw-r--r--source/blender/editors/animation/keyframes_draw.c6
-rw-r--r--source/blender/editors/animation/keyframes_edit.c25
-rw-r--r--source/blender/editors/animation/keyframes_general.c2
-rw-r--r--source/blender/editors/animation/keyframing.c16
-rw-r--r--source/blender/editors/animation/keyingsets.c9
-rw-r--r--source/blender/editors/armature/armature_add.c16
-rw-r--r--source/blender/editors/armature/armature_relations.c2
-rw-r--r--source/blender/editors/armature/meshlaplacian.c2
-rw-r--r--source/blender/editors/armature/pose_edit.c2
-rw-r--r--source/blender/editors/armature/pose_lib.c4
-rw-r--r--source/blender/editors/armature/pose_select.c4
-rw-r--r--source/blender/editors/armature/pose_slide.c8
-rw-r--r--source/blender/editors/armature/pose_transform.c8
-rw-r--r--source/blender/editors/armature/pose_utils.c2
-rw-r--r--source/blender/editors/curve/editcurve.c4
-rw-r--r--source/blender/editors/curve/editcurve_add.c2
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c2
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c2
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c2
-rw-r--r--source/blender/editors/gpencil/annotate_draw.c4
-rw-r--r--source/blender/editors/gpencil/editaction_gpencil.c4
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c8
-rw-r--r--source/blender/editors/gpencil/gpencil_fill.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_sculpt_paint.c6
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c12
-rw-r--r--source/blender/editors/include/ED_anim_api.h6
-rw-r--r--source/blender/editors/include/UI_icons.h6
-rw-r--r--source/blender/editors/include/UI_resources.h46
-rw-r--r--source/blender/editors/interface/interface.c6
-rw-r--r--source/blender/editors/interface/interface_draw.c2
-rw-r--r--source/blender/editors/interface/interface_eyedropper_driver.c4
-rw-r--r--source/blender/editors/interface/interface_handlers.c8
-rw-r--r--source/blender/editors/interface/interface_icons.c6
-rw-r--r--source/blender/editors/interface/interface_templates.c3
-rw-r--r--source/blender/editors/interface/interface_widgets.c2
-rw-r--r--source/blender/editors/interface/view2d.c4
-rw-r--r--source/blender/editors/interface/view2d_ops.c4
-rw-r--r--source/blender/editors/io/io_collada.c4
-rw-r--r--source/blender/editors/mesh/editface.c2
-rw-r--r--source/blender/editors/mesh/editmesh_extrude.c4
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c4
-rw-r--r--source/blender/editors/object/object_add.c4
-rw-r--r--source/blender/editors/object/object_constraint.c10
-rw-r--r--source/blender/editors/object/object_edit.c4
-rw-r--r--source/blender/editors/object/object_remesh.c2
-rw-r--r--source/blender/editors/object/object_select.c2
-rw-r--r--source/blender/editors/object/object_shapekey.c2
-rw-r--r--source/blender/editors/object/object_transform.c2
-rw-r--r--source/blender/editors/physics/particle_edit.c13
-rw-r--r--source/blender/editors/physics/physics_fluid.c2
-rw-r--r--source/blender/editors/physics/physics_ops.c2
-rw-r--r--source/blender/editors/physics/rigidbody_object.c2
-rw-r--r--source/blender/editors/physics/rigidbody_world.c2
-rw-r--r--source/blender/editors/render/render_internal.c12
-rw-r--r--source/blender/editors/render/render_opengl.c4
-rw-r--r--source/blender/editors/render/render_ops.c2
-rw-r--r--source/blender/editors/render/render_preview.c24
-rw-r--r--source/blender/editors/render/render_shading.c4
-rw-r--r--source/blender/editors/render/render_update.c2
-rw-r--r--source/blender/editors/screen/screen_geometry.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c17
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c8
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c2
-rw-r--r--source/blender/editors/sound/sound_ops.c14
-rw-r--r--source/blender/editors/space_action/action_buttons.c4
-rw-r--r--source/blender/editors/space_action/action_data.c4
-rw-r--r--source/blender/editors/space_action/action_edit.c4
-rw-r--r--source/blender/editors/space_action/action_select.c12
-rw-r--r--source/blender/editors/space_action/space_action.c2
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c2
-rw-r--r--source/blender/editors/space_buttons/buttons_texture.c2
-rw-r--r--source/blender/editors/space_clip/clip_dopesheet_ops.c2
-rw-r--r--source/blender/editors/space_clip/clip_draw.c2
-rw-r--r--source/blender/editors/space_clip/clip_editor.c2
-rw-r--r--source/blender/editors/space_clip/clip_graph_draw.c2
-rw-r--r--source/blender/editors/space_clip/clip_graph_ops.c2
-rw-r--r--source/blender/editors/space_clip/clip_ops.c2
-rw-r--r--source/blender/editors/space_clip/clip_utils.c2
-rw-r--r--source/blender/editors/space_clip/tracking_ops_track.c4
-rw-r--r--source/blender/editors/space_clip/tracking_ops_utils.c2
-rw-r--r--source/blender/editors/space_console/console_ops.c7
-rw-r--r--source/blender/editors/space_console/space_console.c2
-rw-r--r--source/blender/editors/space_file/file_draw.c2
-rw-r--r--source/blender/editors/space_file/file_ops.c2
-rw-r--r--source/blender/editors/space_file/filelist.c2
-rw-r--r--source/blender/editors/space_file/space_file.c4
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c10
-rw-r--r--source/blender/editors/space_graph/graph_edit.c29
-rw-r--r--source/blender/editors/space_graph/graph_ops.c2
-rw-r--r--source/blender/editors/space_graph/graph_select.c24
-rw-r--r--source/blender/editors/space_graph/graph_utils.c10
-rw-r--r--source/blender/editors/space_graph/space_graph.c17
-rw-r--r--source/blender/editors/space_image/image_buttons.c3
-rw-r--r--source/blender/editors/space_image/space_image.c2
-rw-r--r--source/blender/editors/space_info/info_ops.c2
-rw-r--r--source/blender/editors/space_info/info_report.c12
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c10
-rw-r--r--source/blender/editors/space_nla/nla_channels.c6
-rw-r--r--source/blender/editors/space_nla/nla_draw.c2
-rw-r--r--source/blender/editors/space_nla/nla_edit.c26
-rw-r--r--source/blender/editors/space_nla/nla_select.c6
-rw-r--r--source/blender/editors/space_nla/space_nla.c2
-rw-r--r--source/blender/editors/space_node/drawnode.c2
-rw-r--r--source/blender/editors/space_node/node_edit.c10
-rw-r--r--source/blender/editors/space_node/node_intern.h6
-rw-r--r--source/blender/editors/space_node/node_relationships.c2
-rw-r--r--source/blender/editors/space_node/node_view.c2
-rw-r--r--source/blender/editors/space_script/script_edit.c2
-rw-r--r--source/blender/editors/space_script/space_script.c12
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c2
-rw-r--r--source/blender/editors/space_text/text_draw.c4
-rw-r--r--source/blender/editors/space_text/text_header.c8
-rw-r--r--source/blender/editors/space_text/text_ops.c9
-rw-r--r--source/blender/editors/space_view3d/view3d_project.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_utils.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_walk.c2
-rw-r--r--source/blender/editors/transform/transform.c40
-rw-r--r--source/blender/editors/transform/transform_convert_action.c4
-rw-r--r--source/blender/editors/transform/transform_convert_armature.c24
-rw-r--r--source/blender/editors/transform/transform_convert_graph.c2
-rw-r--r--source/blender/editors/transform/transform_convert_mesh_edge.c2
-rw-r--r--source/blender/editors/transform/transform_convert_nla.c4
-rw-r--r--source/blender/editors/transform/transform_convert_object.c11
-rw-r--r--source/blender/editors/transform/transform_convert_sequencer.c4
-rw-r--r--source/blender/editors/transform/transform_data.h10
-rw-r--r--source/blender/editors/transform/transform_generics.c10
-rw-r--r--source/blender/editors/transform/transform_gizmo_3d.c8
-rw-r--r--source/blender/editors/transform/transform_mode.c36
-rw-r--r--source/blender/editors/transform/transform_mode_bbone_resize.c2
-rw-r--r--source/blender/editors/transform/transform_mode_resize.c2
-rw-r--r--source/blender/editors/transform/transform_mode_rotate.c2
-rw-r--r--source/blender/editors/transform/transform_mode_shrink_fatten.c2
-rw-r--r--source/blender/editors/transform/transform_mode_timeslide.c2
-rw-r--r--source/blender/editors/transform/transform_mode_tosphere.c2
-rw-r--r--source/blender/editors/transform/transform_mode_trackball.c4
-rw-r--r--source/blender/editors/transform/transform_ops.c10
-rw-r--r--source/blender/editors/transform/transform_snap.c20
-rw-r--r--source/blender/editors/util/ed_util_imbuf.c4
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.h2
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_edituvs_points_vert.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_aa_vert.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_outline_aa_vert.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_varying_color_outline_aa_vert.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl6
-rw-r--r--source/blender/gpu/shaders/gpu_shader_gpencil_stroke_geom.glsl12
-rw-r--r--source/blender/gpu/shaders/gpu_shader_point_uniform_color_aa_frag.glsl14
-rw-r--r--source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl22
-rw-r--r--source/blender/gpu/shaders/gpu_shader_point_varying_color_outline_aa_frag.glsl22
-rw-r--r--source/blender/gpu/shaders/gpu_shader_point_varying_color_varying_outline_aa_frag.glsl22
-rw-r--r--source/blender/ikplugin/intern/iksolver_plugin.c14
-rw-r--r--source/blender/ikplugin/intern/itasc_plugin.cpp490
-rw-r--r--source/blender/imbuf/intern/IMB_anim.h8
-rw-r--r--source/blender/imbuf/intern/anim_movie.c4
-rw-r--r--source/blender/imbuf/intern/cineon/logImageCore.c2
-rw-r--r--source/blender/imbuf/intern/dds/BlockDXT.cpp172
-rw-r--r--source/blender/imbuf/intern/dds/BlockDXT.h82
-rw-r--r--source/blender/imbuf/intern/dds/Color.h2
-rw-r--r--source/blender/imbuf/intern/dds/ColorBlock.cpp30
-rw-r--r--source/blender/imbuf/intern/dds/ColorBlock.h4
-rw-r--r--source/blender/imbuf/intern/dds/DirectDrawSurface.cpp160
-rw-r--r--source/blender/imbuf/intern/dds/DirectDrawSurface.h48
-rw-r--r--source/blender/imbuf/intern/dds/FlipDXT.cpp114
-rw-r--r--source/blender/imbuf/intern/dds/Image.cpp4
-rw-r--r--source/blender/imbuf/intern/dds/Image.h2
-rw-r--r--source/blender/imbuf/intern/dds/PixelFormat.h66
-rw-r--r--source/blender/imbuf/intern/dds/Stream.cpp10
-rw-r--r--source/blender/imbuf/intern/dds/Stream.h8
-rw-r--r--source/blender/imbuf/intern/dds/dds_api.cpp6
-rw-r--r--source/blender/imbuf/intern/oiio/openimageio_api.cpp2
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp29
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_multi.h2
-rw-r--r--source/blender/imbuf/intern/scaling.c2
-rw-r--r--source/blender/io/alembic/exporter/abc_archive.cc8
-rw-r--r--source/blender/io/alembic/exporter/abc_export_capi.cc20
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_transform.cc4
-rw-r--r--source/blender/io/alembic/intern/abc_reader_mesh.cc6
-rw-r--r--source/blender/io/alembic/tests/abc_export_test.cc20
-rw-r--r--source/blender/io/alembic/tests/abc_matrix_test.cc44
-rw-r--r--source/blender/io/collada/AnimationExporter.h10
-rw-r--r--source/blender/io/collada/AnimationImporter.h28
-rw-r--r--source/blender/io/collada/ArmatureExporter.cpp36
-rw-r--r--source/blender/io/collada/ArmatureExporter.h18
-rw-r--r--source/blender/io/collada/ArmatureImporter.cpp8
-rw-r--r--source/blender/io/collada/ArmatureImporter.h25
-rw-r--r--source/blender/io/collada/BCAnimationCurve.cpp6
-rw-r--r--source/blender/io/collada/BCAnimationCurve.h2
-rw-r--r--source/blender/io/collada/BCAnimationSampler.cpp16
-rw-r--r--source/blender/io/collada/BCAnimationSampler.h2
-rw-r--r--source/blender/io/collada/BCMath.cpp3
-rw-r--r--source/blender/io/collada/BCSampleData.h2
-rw-r--r--source/blender/io/collada/BlenderContext.cpp2
-rw-r--r--source/blender/io/collada/ControllerExporter.cpp8
-rw-r--r--source/blender/io/collada/ControllerExporter.h10
-rw-r--r--source/blender/io/collada/DocumentExporter.cpp40
-rw-r--r--source/blender/io/collada/DocumentImporter.cpp16
-rw-r--r--source/blender/io/collada/DocumentImporter.h8
-rw-r--r--source/blender/io/collada/EffectExporter.cpp20
-rw-r--r--source/blender/io/collada/ErrorHandler.h2
-rw-r--r--source/blender/io/collada/ExtraHandler.h2
-rw-r--r--source/blender/io/collada/GeometryExporter.cpp6
-rw-r--r--source/blender/io/collada/LightExporter.cpp12
-rw-r--r--source/blender/io/collada/MaterialExporter.cpp2
-rw-r--r--source/blender/io/collada/MaterialExporter.h6
-rw-r--r--source/blender/io/collada/Materials.cpp50
-rw-r--r--source/blender/io/collada/MeshImporter.cpp186
-rw-r--r--source/blender/io/collada/SkinInfo.h42
-rw-r--r--source/blender/io/collada/TransformReader.cpp10
-rw-r--r--source/blender/io/collada/TransformReader.h2
-rw-r--r--source/blender/io/collada/collada_internal.cpp16
-rw-r--r--source/blender/io/collada/collada_internal.h4
-rw-r--r--source/blender/io/common/IO_abstract_hierarchy_iterator.h12
-rw-r--r--source/blender/io/common/intern/abstract_hierarchy_iterator.cc71
-rw-r--r--source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc34
-rw-r--r--source/blender/io/common/intern/object_identifier_test.cc4
-rw-r--r--source/blender/io/usd/intern/usd_capi.cc14
-rw-r--r--source/blender/io/usd/intern/usd_writer_abstract.cc12
-rw-r--r--source/blender/io/usd/intern/usd_writer_camera.cc2
-rw-r--r--source/blender/io/usd/intern/usd_writer_hair.cc2
-rw-r--r--source/blender/io/usd/intern/usd_writer_mesh.cc8
-rw-r--r--source/blender/io/usd/intern/usd_writer_transform.cc4
-rw-r--r--source/blender/makesdna/DNA_action_types.h4
-rw-r--r--source/blender/makesdna/DNA_anim_types.h10
-rw-r--r--source/blender/makesdna/DNA_node_types.h2
-rw-r--r--source/blender/makesdna/DNA_object_types.h14
-rw-r--r--source/blender/makesdna/DNA_particle_types.h2
-rw-r--r--source/blender/makesdna/DNA_scene_types.h12
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h24
-rw-r--r--source/blender/makesdna/DNA_texture_types.h5
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h8
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c4
-rw-r--r--source/blender/makesrna/RNA_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_fluid.c4
-rw-r--r--source/blender/makesrna/intern/rna_rigidbody.c10
-rw-r--r--source/blender/makesrna/intern/rna_sequencer_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_tonemap.c6
-rw-r--r--source/blender/python/BPY_extern.h2
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_customdata.c2
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.c6
-rw-r--r--source/blender/python/generic/py_capi_utils.c6
-rw-r--r--source/blender/python/intern/bpy.c2
-rw-r--r--source/blender/python/intern/bpy_app_ffmpeg.c2
-rw-r--r--source/blender/python/intern/bpy_app_sdl.c4
-rw-r--r--source/blender/python/intern/bpy_driver.c4
-rw-r--r--source/blender/python/intern/bpy_interface.c2
-rw-r--r--source/blender/python/intern/bpy_rna.c9
-rw-r--r--source/blender/python/mathutils/mathutils.c2
-rw-r--r--source/blender/render/extern/include/RE_engine.h2
-rw-r--r--source/blender/simulation/intern/ConstrainedConjugateGradient.h22
-rw-r--r--source/blender/simulation/intern/SIM_mass_spring.cpp14
-rw-r--r--source/blender/simulation/intern/implicit_blender.c108
-rw-r--r--source/blender/simulation/intern/implicit_eigen.cpp28
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo.c2
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c9
-rw-r--r--source/blender/windowmanager/intern/wm_jobs.c16
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c6
-rw-r--r--source/blender/windowmanager/intern/wm_stereo.c2
-rw-r--r--source/blender/windowmanager/intern/wm_window.c6
341 files changed, 2449 insertions, 2353 deletions
diff --git a/source/blender/blenkernel/BKE_addon.h b/source/blender/blenkernel/BKE_addon.h
index 73e3f6e41dc..03d29d47a83 100644
--- a/source/blender/blenkernel/BKE_addon.h
+++ b/source/blender/blenkernel/BKE_addon.h
@@ -29,7 +29,7 @@ struct bAddon;
#ifdef __RNA_TYPES_H__
typedef struct bAddonPrefType {
/* type info */
- char idname[64]; // best keep the same size as BKE_ST_MAXNAME
+ char idname[64]; /* best keep the same size as #BKE_ST_MAXNAME */
/* RNA integration */
ExtensionRNA rna_ext;
diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h
index 965bb7b737e..3a5328a33e2 100644
--- a/source/blender/blenkernel/BKE_collision.h
+++ b/source/blender/blenkernel/BKE_collision.h
@@ -63,14 +63,14 @@ typedef enum {
////////////////////////////////////////
/* used for collisions in collision.c */
typedef struct CollPair {
- unsigned int face1; // cloth face
- unsigned int face2; // object face
+ unsigned int face1; /* cloth face */
+ unsigned int face2; /* object face */
float distance;
float normal[3];
- float vector[3]; // unnormalized collision vector: p2-p1
- float pa[3], pb[3]; // collision point p1 on face1, p2 on face2
+ float vector[3]; /* unnormalized collision vector: p2-p1 */
+ float pa[3], pb[3]; /* collision point p1 on face1, p2 on face2 */
int flag;
- float time; // collision time, from 0 up to 1
+ 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*/
@@ -90,7 +90,7 @@ typedef struct EdgeCollPair {
float vector[3];
float time;
int lastsign;
- float pa[3], pb[3]; // collision point p1 on face1, p2 on face2
+ float pa[3], pb[3]; /* collision point p1 on face1, p2 on face2 */
} EdgeCollPair;
/* used for collisions in collision.c */
@@ -100,7 +100,7 @@ typedef struct FaceCollPair {
float vector[3];
float time;
int lastsign;
- float pa[3], pb[3]; // collision point p1 on face1, p2 on face2
+ float pa[3], pb[3]; /* collision point p1 on face1, p2 on face2 */
} FaceCollPair;
////////////////////////////////////////
@@ -126,8 +126,8 @@ void bvhtree_update_from_mvert(BVHTree *bvhtree,
/////////////////////////////////////////////////
-// move Collision modifier object inter-frame with step = [0,1]
-// defined in collisions.c
+/* move Collision modifier object inter-frame with step = [0,1]
+ * defined in collisions.c */
void collision_move_object(struct CollisionModifierData *collmd,
const float step,
const float prevstep,
diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h
index 20190817a8e..7ac980e9d94 100644
--- a/source/blender/blenkernel/BKE_scene.h
+++ b/source/blender/blenkernel/BKE_scene.h
@@ -115,7 +115,7 @@ struct Scene *BKE_scene_find_from_collection(const struct Main *bmain,
const struct Collection *collection);
#ifdef DURIAN_CAMERA_SWITCH
-struct Object *BKE_scene_camera_switch_find(struct Scene *scene); // DURIAN_CAMERA_SWITCH
+struct Object *BKE_scene_camera_switch_find(struct Scene *scene); /* DURIAN_CAMERA_SWITCH */
#endif
bool BKE_scene_camera_switch_update(struct Scene *scene);
diff --git a/source/blender/blenkernel/BKE_softbody.h b/source/blender/blenkernel/BKE_softbody.h
index b0923be8434..d1cffd26432 100644
--- a/source/blender/blenkernel/BKE_softbody.h
+++ b/source/blender/blenkernel/BKE_softbody.h
@@ -40,7 +40,7 @@ typedef struct BodyPoint {
int *springs;
float choke, choke2, frozen;
float colball;
- short loc_flag; // reserved by locale module specific states
+ short loc_flag; /* reserved by locale module specific states */
// char octantflag;
float mass;
float springweight;
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index ec2fb5f5bdb..d63c5fe12ab 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
#include <string.h>
-#include "BLI_sys_types.h" // for intptr_t support
+#include "BLI_sys_types.h" /* for intptr_t support */
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h" /* for BLI_assert */
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_legacy.c b/source/blender/blenkernel/intern/CCGSubSurf_legacy.c
index 22a4bf18f7f..99ea1fb9607 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf_legacy.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf_legacy.c
@@ -18,7 +18,7 @@
* \ingroup bke
*/
-#include "BLI_sys_types.h" // for intptr_t support
+#include "BLI_sys_types.h" /* for intptr_t support */
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_util.c b/source/blender/blenkernel/intern/CCGSubSurf_util.c
index bc63d8b97f7..3941b42d4b3 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf_util.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf_util.c
@@ -22,7 +22,7 @@
#include <stdlib.h>
#include <string.h>
-#include "BLI_sys_types.h" // for intptr_t support
+#include "BLI_sys_types.h" /* for intptr_t support */
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h" /* for BLI_assert */
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 9cb03a137a7..8f47739151e 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -199,17 +199,17 @@ static void action_blend_read_data(BlendDataReader *reader, ID *id)
bAction *act = (bAction *)id;
BLO_read_list(reader, &act->curves);
- BLO_read_list(reader, &act->chanbase); // XXX deprecated - old animation system
+ BLO_read_list(reader, &act->chanbase); /* XXX deprecated - old animation system */
BLO_read_list(reader, &act->groups);
BLO_read_list(reader, &act->markers);
- // XXX deprecated - old animation system <<<
+ /* XXX deprecated - old animation system <<< */
LISTBASE_FOREACH (bActionChannel *, achan, &act->chanbase) {
BLO_read_data_address(reader, &achan->grp);
BLO_read_list(reader, &achan->constraintChannels);
}
- // >>> XXX deprecated - old animation system
+ /* >>> XXX deprecated - old animation system */
BKE_fcurve_blend_read_data(reader, &act->curves);
@@ -230,12 +230,12 @@ static void action_blend_read_lib(BlendLibReader *reader, ID *id)
{
bAction *act = (bAction *)id;
- // XXX deprecated - old animation system <<<
+ /* XXX deprecated - old animation system <<< */
LISTBASE_FOREACH (bActionChannel *, chan, &act->chanbase) {
BLO_read_id_address(reader, act->id.lib, &chan->ipo);
blend_read_lib_constraint_channels(reader, &act->id, &chan->constraintChannels);
}
- // >>> XXX deprecated - old animation system
+ /* >>> XXX deprecated - old animation system */
BKE_fcurve_blend_read_lib(reader, &act->id, &act->curves);
@@ -257,12 +257,12 @@ static void action_blend_read_expand(BlendExpander *expander, ID *id)
{
bAction *act = (bAction *)id;
- // XXX deprecated - old animation system --------------
+ /* XXX deprecated - old animation system -------------- */
LISTBASE_FOREACH (bActionChannel *, chan, &act->chanbase) {
BLO_expand(expander, chan->ipo);
blend_read_expand_constraint_channels(expander, &chan->constraintChannels);
}
- // ---------------------------------------------------
+ /* --------------------------------------------------- */
/* F-Curves in Action */
BKE_fcurve_blend_read_expand(expander, &act->curves);
@@ -827,7 +827,7 @@ void BKE_pose_copy_data_ex(bPose **dst,
if (copy_constraints) {
BKE_constraints_copy_ex(
- &listb, &pchan->constraints, flag, true); // BKE_constraints_copy NULLs listb
+ &listb, &pchan->constraints, flag, true); /* BKE_constraints_copy NULLs listb */
pchan->constraints = listb;
/* XXX: This is needed for motionpath drawing to work.
diff --git a/source/blender/blenkernel/intern/anim_data.c b/source/blender/blenkernel/intern/anim_data.c
index 6ff705a0379..4e24fc27be7 100644
--- a/source/blender/blenkernel/intern/anim_data.c
+++ b/source/blender/blenkernel/intern/anim_data.c
@@ -1527,14 +1527,14 @@ void BKE_animdata_blend_write(BlendWriter *writer, struct AnimData *adt)
BKE_fcurve_blend_write(writer, &adt->drivers);
/* write overrides */
- // FIXME: are these needed?
+ /* FIXME: are these needed? */
LISTBASE_FOREACH (AnimOverride *, aor, &adt->overrides) {
/* overrides consist of base data + rna_path */
BLO_write_struct(writer, AnimOverride, aor);
BLO_write_string(writer, aor->rna_path);
}
- // TODO write the remaps (if they are needed)
+ /* TODO write the remaps (if they are needed) */
/* write NLA data */
BKE_nla_blend_write(writer, &adt->nla_tracks);
@@ -1553,7 +1553,7 @@ void BKE_animdata_blend_read_data(BlendDataReader *reader, AnimData *adt)
adt->driver_array = NULL;
/* link overrides */
- // TODO...
+ /* TODO... */
/* link NLA-data */
BLO_read_list(reader, &adt->nla_tracks);
@@ -1563,8 +1563,8 @@ void BKE_animdata_blend_read_data(BlendDataReader *reader, AnimData *adt)
* if we're in 'tweaking mode', we need to be able to have this loaded back for
* undo, but also since users may not exit tweakmode before saving (T24535)
*/
- // TODO: it's not really nice that anyone should be able to save the file in this
- // state, but it's going to be too hard to enforce this single case...
+ /* TODO: it's not really nice that anyone should be able to save the file in this
+ * state, but it's going to be too hard to enforce this single case... */
BLO_read_data_address(reader, &adt->act_track);
BLO_read_data_address(reader, &adt->actstrip);
}
diff --git a/source/blender/blenkernel/intern/armature_test.cc b/source/blender/blenkernel/intern/armature_test.cc
index cf17c37bc69..f3c0d2f407a 100644
--- a/source/blender/blenkernel/intern/armature_test.cc
+++ b/source/blender/blenkernel/intern/armature_test.cc
@@ -34,7 +34,7 @@ TEST(mat3_vec_to_roll, UnitMatrix)
unit_m3(unit_matrix);
- // Any vector with a unit matrix should return zero roll.
+ /* Any vector with a unit matrix should return zero roll. */
mat3_vec_to_roll(unit_matrix, unit_matrix[0], &roll);
EXPECT_FLOAT_EQ(0.0f, roll);
@@ -45,12 +45,12 @@ TEST(mat3_vec_to_roll, UnitMatrix)
EXPECT_FLOAT_EQ(0.0f, roll);
{
- // Non-unit vector.
+ /* Non-unit vector. */
float vector[3] = {1.0f, 1.0f, 1.0f};
mat3_vec_to_roll(unit_matrix, vector, &roll);
EXPECT_NEAR(0.0f, roll, FLOAT_EPSILON);
- // Normalized version of the above vector.
+ /* Normalized version of the above vector. */
normalize_v3(vector);
mat3_vec_to_roll(unit_matrix, vector, &roll);
EXPECT_NEAR(0.0f, roll, FLOAT_EPSILON);
diff --git a/source/blender/blenkernel/intern/blender_undo.c b/source/blender/blenkernel/intern/blender_undo.c
index a6f84f3c3a4..9e061b1ac69 100644
--- a/source/blender/blenkernel/intern/blender_undo.c
+++ b/source/blender/blenkernel/intern/blender_undo.c
@@ -22,9 +22,9 @@
*/
#ifndef _WIN32
-# include <unistd.h> // for read close
+# include <unistd.h> /* for read close */
#else
-# include <io.h> // for open close read
+# include <io.h> /* for open close read */
#endif
#include <errno.h>
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 3d5451125d9..403722b80cf 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -216,7 +216,7 @@ void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr)
BKE_ptcache_id_from_cloth(&pid, ob, clmd);
- // don't do anything as long as we're in editmode!
+ /* don't do anything as long as we're in editmode! */
if (pid.cache->edit && ob->mode & OB_MODE_PARTICLE_EDIT) {
return;
}
@@ -439,7 +439,7 @@ void cloth_free_modifier(ClothModifierData *clmd)
if (cloth) {
SIM_cloth_solver_free(clmd);
- // Free the verts.
+ /* Free the verts. */
if (cloth->verts != NULL) {
MEM_freeN(cloth->verts);
}
@@ -447,7 +447,7 @@ void cloth_free_modifier(ClothModifierData *clmd)
cloth->verts = NULL;
cloth->mvert_num = 0;
- // Free the springs.
+ /* Free the springs. */
if (cloth->springs != NULL) {
LinkNode *search = cloth->springs;
while (search) {
@@ -467,7 +467,7 @@ void cloth_free_modifier(ClothModifierData *clmd)
cloth->springs = NULL;
cloth->numsprings = 0;
- // free BVH collision tree
+ /* free BVH collision tree */
if (cloth->bvhtree) {
BLI_bvhtree_free(cloth->bvhtree);
}
@@ -476,7 +476,7 @@ void cloth_free_modifier(ClothModifierData *clmd)
BLI_bvhtree_free(cloth->bvhselftree);
}
- // we save our faces for collision objects
+ /* we save our faces for collision objects */
if (cloth->tri) {
MEM_freeN(cloth->tri);
}
@@ -521,7 +521,7 @@ void cloth_free_modifier_extern(ClothModifierData *clmd)
SIM_cloth_solver_free(clmd);
- // Free the verts.
+ /* Free the verts. */
if (cloth->verts != NULL) {
MEM_freeN(cloth->verts);
}
@@ -529,7 +529,7 @@ void cloth_free_modifier_extern(ClothModifierData *clmd)
cloth->verts = NULL;
cloth->mvert_num = 0;
- // Free the springs.
+ /* Free the springs. */
if (cloth->springs != NULL) {
LinkNode *search = cloth->springs;
while (search) {
@@ -549,7 +549,7 @@ void cloth_free_modifier_extern(ClothModifierData *clmd)
cloth->springs = NULL;
cloth->numsprings = 0;
- // free BVH collision tree
+ /* free BVH collision tree */
if (cloth->bvhtree) {
BLI_bvhtree_free(cloth->bvhtree);
}
@@ -558,7 +558,7 @@ void cloth_free_modifier_extern(ClothModifierData *clmd)
BLI_bvhtree_free(cloth->bvhselftree);
}
- // we save our faces for collision objects
+ /* we save our faces for collision objects */
if (cloth->tri) {
MEM_freeN(cloth->tri);
}
@@ -655,8 +655,8 @@ static void cloth_apply_vgroup(ClothModifierData *clmd, Mesh *mesh)
/* goalfac= 1.0f; */ /* UNUSED */
- // Kicking goal factor to simplify things...who uses that anyway?
- // ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal );
+ /* Kicking goal factor to simplify things...who uses that anyway? */
+ // ABS (clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal);
verts->goal = pow4f(verts->goal);
if (verts->goal >= SOFTGOALSNAP) {
@@ -727,7 +727,7 @@ static bool cloth_from_object(
float(*shapekey_rest)[3] = NULL;
const float tnull[3] = {0, 0, 0};
- // If we have a clothObject, free it.
+ /* If we have a clothObject, free it. */
if (clmd->clothObject != NULL) {
cloth_free_modifier(clmd);
if (G.debug & G_DEBUG_SIMDATA) {
@@ -735,7 +735,7 @@ static bool cloth_from_object(
}
}
- // Allocate a new cloth object.
+ /* Allocate a new cloth object. */
clmd->clothObject = MEM_callocN(sizeof(Cloth), "cloth");
if (clmd->clothObject) {
clmd->clothObject->old_solver_type = 255;
@@ -746,14 +746,14 @@ static bool cloth_from_object(
return false;
}
- // mesh input objects need Mesh
+ /* mesh input objects need Mesh */
if (!mesh) {
return false;
}
cloth_from_mesh(clmd, mesh);
- // create springs
+ /* create springs */
clmd->clothObject->springs = NULL;
clmd->clothObject->numsprings = -1;
@@ -768,7 +768,7 @@ static bool cloth_from_object(
verts = clmd->clothObject->verts;
- // set initial values
+ /* set initial values */
for (i = 0; i < mesh->totvert; i++, verts++) {
if (first) {
copy_v3_v3(verts->x, mvert[i].co);
@@ -808,8 +808,8 @@ static bool cloth_from_object(
copy_v3_v3(verts->impulse, tnull);
}
- // apply / set vertex groups
- // has to be happen before springs are build!
+ /* apply / set vertex groups */
+ /* has to be happen before springs are build! */
cloth_apply_vgroup(clmd, mesh);
if (!cloth_build_springs(clmd, mesh)) {
@@ -818,7 +818,7 @@ static bool cloth_from_object(
return false;
}
- // init our solver
+ /* init our solver */
SIM_cloth_solver_init(ob, clmd);
if (!first) {
@@ -1471,13 +1471,13 @@ static bool cloth_build_springs(ClothModifierData *clmd, Mesh *mesh)
const MEdge *medge = mesh->medge;
const MPoly *mpoly = mesh->mpoly;
const MLoop *mloop = mesh->mloop;
- int index2 = 0; // our second vertex index
+ int index2 = 0; /* our second vertex index */
LinkNodePair *edgelist = NULL;
EdgeSet *edgeset = NULL;
LinkNode *search = NULL, *search2 = NULL;
BendSpringRef *spring_ref = NULL;
- // error handling
+ /* error handling */
if (numedges == 0) {
return false;
}
@@ -1599,7 +1599,7 @@ static bool cloth_build_springs(ClothModifierData *clmd, Mesh *mesh)
if (spring) {
spring_verts_ordered_set(spring, medge[i].v1, medge[i].v2);
if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SEW && medge[i].flag & ME_LOOSEEDGE) {
- // handle sewing (loose edges will be pulled together)
+ /* handle sewing (loose edges will be pulled together) */
spring->restlen = 0.0f;
spring->lin_stiffness = 1.0f;
spring->type = CLOTH_SPRING_TYPE_SEWING;
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 30e8a7948ba..274546132fb 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -744,7 +744,7 @@ static void default_get_tarmat_full_bbone(struct Depsgraph *UNUSED(depsgraph),
* (Hopefully all compilers will be happy with the lines with just a space on them.
* Those are really just to help this code easier to read).
*/
-// TODO: cope with getting rotation order...
+/* TODO: cope with getting rotation order... */
#define SINGLETARGET_GET_TARS(con, datatar, datasubtarget, ct, list) \
{ \
ct = MEM_callocN(sizeof(bConstraintTarget), "tempConstraintTarget"); \
@@ -779,7 +779,7 @@ static void default_get_tarmat_full_bbone(struct Depsgraph *UNUSED(depsgraph),
* (Hopefully all compilers will be happy with the lines with just a space on them. Those are
* really just to help this code easier to read)
*/
-// TODO: cope with getting rotation order...
+/* TODO: cope with getting rotation order... */
#define SINGLETARGETNS_GET_TARS(con, datatar, ct, list) \
{ \
ct = MEM_callocN(sizeof(bConstraintTarget), "tempConstraintTarget"); \
@@ -4340,7 +4340,7 @@ static void damptrack_do_transform(float matrix[4][4], const float tarvec_in[3],
* we may have destroyed that in the process of multiplying the matrix
*/
unit_m4(tmat);
- mul_m4_m3m4(tmat, rmat, matrix); // m1, m3, m2
+ mul_m4_m3m4(tmat, rmat, matrix); /* m1, m3, m2 */
copy_m4_m4(matrix, tmat);
copy_v3_v3(matrix[3], obloc);
@@ -4577,7 +4577,7 @@ static bConstraintTypeInfo CTI_PIVOT = {
pivotcon_id_looper, /* id looper */
NULL, /* copy data */
NULL,
- /* new data */ // XXX: might be needed to get 'normal' pivot behavior...
+ /* new data */ /* XXX: might be needed to get 'normal' pivot behavior... */
pivotcon_get_tars, /* get constraint targets */
pivotcon_flush_tars, /* flush constraint targets */
default_get_tarmat, /* get target matrix */
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 8a5b60fb0e8..c0da1f41c88 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -21,7 +21,7 @@
* \ingroup bke
*/
-#include <math.h> // floor
+#include <math.h> /* floor */
#include <stdlib.h>
#include <string.h>
@@ -282,7 +282,7 @@ static void curve_blend_read_lib(BlendLibReader *reader, ID *id)
BLO_read_id_address(reader, cu->id.lib, &cu->vfonti);
BLO_read_id_address(reader, cu->id.lib, &cu->vfontbi);
- BLO_read_id_address(reader, cu->id.lib, &cu->ipo); // XXX deprecated - old animation system
+ BLO_read_id_address(reader, cu->id.lib, &cu->ipo); /* XXX deprecated - old animation system */
BLO_read_id_address(reader, cu->id.lib, &cu->key);
}
@@ -298,7 +298,7 @@ static void curve_blend_read_expand(BlendExpander *expander, ID *id)
BLO_expand(expander, cu->vfonti);
BLO_expand(expander, cu->vfontbi);
BLO_expand(expander, cu->key);
- BLO_expand(expander, cu->ipo); // XXX deprecated - old animation system
+ BLO_expand(expander, cu->ipo); /* XXX deprecated - old animation system */
BLO_expand(expander, cu->bevobj);
BLO_expand(expander, cu->taperobj);
BLO_expand(expander, cu->textoncurve);
@@ -3639,7 +3639,7 @@ static bool tridiagonal_solve_with_limits(float *a,
* see if it may be a good idea to unlock some handles. */
if (!locked) {
for (int i = 0; i < solve_count; i++) {
- // to definitely avoid infinite loops limit this to 2 times
+ /* to definitely avoid infinite loops limit this to 2 times */
if (!is_locked[i] || num_unlocks[i] >= 2) {
continue;
}
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 856e0e872b3..d2a9064a373 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -444,8 +444,8 @@ FCurve *BKE_fcurve_find_by_rna_context_ui(bContext *C,
continue;
}
- // XXX: the logic here is duplicated with a function up above
- /* animation takes priority over drivers */
+ /* XXX: the logic here is duplicated with a function up above
+ * animation takes priority over drivers. */
if (adt->action && adt->action->curves.first) {
fcu = BKE_fcurve_find(&adt->action->curves, path, rnaindex);
diff --git a/source/blender/blenkernel/intern/fcurve_test.cc b/source/blender/blenkernel/intern/fcurve_test.cc
index a58f519adfb..f258e2ff28d 100644
--- a/source/blender/blenkernel/intern/fcurve_test.cc
+++ b/source/blender/blenkernel/intern/fcurve_test.cc
@@ -27,7 +27,7 @@
namespace blender::bke::tests {
-// Epsilon for floating point comparisons.
+/* Epsilon for floating point comparisons. */
static const float EPSILON = 1e-7f;
TEST(evaluate_fcurve, EmptyFCurve)
@@ -45,9 +45,9 @@ TEST(evaluate_fcurve, OnKeys)
insert_vert_fcurve(fcu, 2.0f, 13.0f, BEZT_KEYTYPE_KEYFRAME, INSERTKEY_NO_USERPREF);
insert_vert_fcurve(fcu, 3.0f, 19.0f, BEZT_KEYTYPE_KEYFRAME, INSERTKEY_NO_USERPREF);
- EXPECT_NEAR(evaluate_fcurve(fcu, 1.0f), 7.0f, EPSILON); // hits 'on or before first' function
- EXPECT_NEAR(evaluate_fcurve(fcu, 2.0f), 13.0f, EPSILON); // hits 'between' function
- EXPECT_NEAR(evaluate_fcurve(fcu, 3.0f), 19.0f, EPSILON); // hits 'on or after last' function
+ EXPECT_NEAR(evaluate_fcurve(fcu, 1.0f), 7.0f, EPSILON); /* hits 'on or before first' function */
+ EXPECT_NEAR(evaluate_fcurve(fcu, 2.0f), 13.0f, EPSILON); /* hits 'between' function */
+ EXPECT_NEAR(evaluate_fcurve(fcu, 3.0f), 19.0f, EPSILON); /* hits 'on or after last' function */
/* Also test within a specific time epsilon of the keys, as this was an issue in T39207.
* This epsilon is just slightly smaller than the epsilon given to binarysearch_bezt_index_ex()
@@ -102,21 +102,21 @@ TEST(evaluate_fcurve, InterpolationBezier)
EXPECT_EQ(fcu->bezt[0].ipo, BEZT_IPO_BEZ);
EXPECT_EQ(fcu->bezt[1].ipo, BEZT_IPO_BEZ);
- // Test with default handles.
+ /* Test with default handles. */
EXPECT_NEAR(evaluate_fcurve(fcu, 1.25f), 7.8297067f, EPSILON);
EXPECT_NEAR(evaluate_fcurve(fcu, 1.50f), 10.0f, EPSILON);
EXPECT_NEAR(evaluate_fcurve(fcu, 1.75f), 12.170294f, EPSILON);
- // Test with modified handles.
- fcu->bezt[0].vec[0][0] = 0.71855f; // left handle X
- fcu->bezt[0].vec[0][1] = 6.22482f; // left handle Y
- fcu->bezt[0].vec[2][0] = 1.35148f; // right handle X
- fcu->bezt[0].vec[2][1] = 7.96806f; // right handle Y
+ /* Test with modified handles. */
+ fcu->bezt[0].vec[0][0] = 0.71855f; /* left handle X */
+ fcu->bezt[0].vec[0][1] = 6.22482f; /* left handle Y */
+ fcu->bezt[0].vec[2][0] = 1.35148f; /* right handle X */
+ fcu->bezt[0].vec[2][1] = 7.96806f; /* right handle Y */
- fcu->bezt[1].vec[0][0] = 1.66667f; // left handle X
- fcu->bezt[1].vec[0][1] = 10.4136f; // left handle Y
- fcu->bezt[1].vec[2][0] = 2.33333f; // right handle X
- fcu->bezt[1].vec[2][1] = 15.5864f; // right handle Y
+ fcu->bezt[1].vec[0][0] = 1.66667f; /* left handle X */
+ fcu->bezt[1].vec[0][1] = 10.4136f; /* left handle Y */
+ fcu->bezt[1].vec[2][0] = 2.33333f; /* right handle X */
+ fcu->bezt[1].vec[2][1] = 15.5864f; /* right handle Y */
EXPECT_NEAR(evaluate_fcurve(fcu, 1.25f), 7.945497f, EPSILON);
EXPECT_NEAR(evaluate_fcurve(fcu, 1.50f), 9.3495407f, EPSILON);
@@ -155,19 +155,19 @@ TEST(evaluate_fcurve, ExtrapolationLinearKeys)
fcu->bezt[1].ipo = BEZT_IPO_LIN;
fcu->extend = FCURVE_EXTRAPOLATE_LINEAR;
- // Before first keyframe.
+ /* Before first keyframe. */
EXPECT_NEAR(evaluate_fcurve(fcu, 0.75f), 5.5f, EPSILON);
EXPECT_NEAR(evaluate_fcurve(fcu, 0.50f), 4.0f, EPSILON);
EXPECT_NEAR(evaluate_fcurve(fcu, -1.50f), -8.0f, EPSILON);
- // After last keyframe.
+ /* After last keyframe. */
EXPECT_NEAR(evaluate_fcurve(fcu, 2.75f), 17.5f, EPSILON);
EXPECT_NEAR(evaluate_fcurve(fcu, 3.50f), 22.0f, EPSILON);
fcu->extend = FCURVE_EXTRAPOLATE_CONSTANT;
- // Before first keyframe.
+ /* Before first keyframe. */
EXPECT_NEAR(evaluate_fcurve(fcu, 0.75f), 7.0f, EPSILON);
EXPECT_NEAR(evaluate_fcurve(fcu, -1.50f), 7.0f, EPSILON);
- // After last keyframe.
+ /* After last keyframe. */
EXPECT_NEAR(evaluate_fcurve(fcu, 2.75f), 13.0f, EPSILON);
EXPECT_NEAR(evaluate_fcurve(fcu, 3.50f), 13.0f, EPSILON);
@@ -181,29 +181,29 @@ TEST(evaluate_fcurve, ExtrapolationBezierKeys)
EXPECT_EQ(insert_vert_fcurve(fcu, 1.0f, 7.0f, BEZT_KEYTYPE_KEYFRAME, INSERTKEY_NO_USERPREF), 0);
EXPECT_EQ(insert_vert_fcurve(fcu, 2.0f, 13.0f, BEZT_KEYTYPE_KEYFRAME, INSERTKEY_NO_USERPREF), 1);
- fcu->bezt[0].vec[0][0] = 0.71855f; // left handle X
- fcu->bezt[0].vec[0][1] = 6.22482f; // left handle Y
- fcu->bezt[0].vec[2][0] = 1.35148f; // right handle X
- fcu->bezt[0].vec[2][1] = 7.96806f; // right handle Y
+ fcu->bezt[0].vec[0][0] = 0.71855f; /* left handle X */
+ fcu->bezt[0].vec[0][1] = 6.22482f; /* left handle Y */
+ fcu->bezt[0].vec[2][0] = 1.35148f; /* right handle X */
+ fcu->bezt[0].vec[2][1] = 7.96806f; /* right handle Y */
- fcu->bezt[1].vec[0][0] = 1.66667f; // left handle X
- fcu->bezt[1].vec[0][1] = 10.4136f; // left handle Y
- fcu->bezt[1].vec[2][0] = 2.33333f; // right handle X
- fcu->bezt[1].vec[2][1] = 15.5864f; // right handle Y
+ fcu->bezt[1].vec[0][0] = 1.66667f; /* left handle X */
+ fcu->bezt[1].vec[0][1] = 10.4136f; /* left handle Y */
+ fcu->bezt[1].vec[2][0] = 2.33333f; /* right handle X */
+ fcu->bezt[1].vec[2][1] = 15.5864f; /* right handle Y */
fcu->extend = FCURVE_EXTRAPOLATE_LINEAR;
- // Before first keyframe.
+ /* Before first keyframe. */
EXPECT_NEAR(evaluate_fcurve(fcu, 0.75f), 6.3114409f, EPSILON);
EXPECT_NEAR(evaluate_fcurve(fcu, -0.50f), 2.8686447f, EPSILON);
- // After last keyframe.
+ /* After last keyframe. */
EXPECT_NEAR(evaluate_fcurve(fcu, 2.75f), 18.81946f, EPSILON);
EXPECT_NEAR(evaluate_fcurve(fcu, 3.50f), 24.63892f, EPSILON);
fcu->extend = FCURVE_EXTRAPOLATE_CONSTANT;
- // Before first keyframe.
+ /* Before first keyframe. */
EXPECT_NEAR(evaluate_fcurve(fcu, 0.75f), 7.0f, EPSILON);
EXPECT_NEAR(evaluate_fcurve(fcu, -1.50f), 7.0f, EPSILON);
- // After last keyframe.
+ /* After last keyframe. */
EXPECT_NEAR(evaluate_fcurve(fcu, 2.75f), 13.0f, EPSILON);
EXPECT_NEAR(evaluate_fcurve(fcu, 3.50f), 13.0f, EPSILON);
@@ -232,7 +232,7 @@ TEST(fcurve_subdivide, BKE_bezt_subdivide_handles)
/* Create new keyframe point with defaults from insert_vert_fcurve(). */
BezTriple beztr;
- const float x = 7.375f; // at this X-coord, the FCurve should evaluate to 1.000f.
+ const float x = 7.375f; /* at this X-coord, the FCurve should evaluate to 1.000f. */
const float y = 1.000f;
beztr.vec[0][0] = x - 1.0f;
beztr.vec[0][1] = y;
@@ -249,25 +249,25 @@ TEST(fcurve_subdivide, BKE_bezt_subdivide_handles)
EXPECT_FLOAT_EQ(y_delta, 0.0f);
- EXPECT_FLOAT_EQ(fcu->bezt[0].vec[0][0], -5.0f); // Left handle should not be touched.
+ EXPECT_FLOAT_EQ(fcu->bezt[0].vec[0][0], -5.0f); /* Left handle should not be touched. */
EXPECT_FLOAT_EQ(fcu->bezt[0].vec[0][1], 0.0f);
- EXPECT_FLOAT_EQ(fcu->bezt[0].vec[1][0], 1.0f); // Coordinates should not be touched.
+ EXPECT_FLOAT_EQ(fcu->bezt[0].vec[1][0], 1.0f); /* Coordinates should not be touched. */
EXPECT_FLOAT_EQ(fcu->bezt[0].vec[1][1], 0.0f);
- EXPECT_FLOAT_EQ(fcu->bezt[0].vec[2][0], 1.5f); // Right handle should be updated.
+ EXPECT_FLOAT_EQ(fcu->bezt[0].vec[2][0], 1.5f); /* Right handle should be updated. */
EXPECT_FLOAT_EQ(fcu->bezt[0].vec[2][1], 2.0f);
- EXPECT_FLOAT_EQ(fcu->bezt[1].vec[0][0], 13.0f); // Left handle should be updated.
+ EXPECT_FLOAT_EQ(fcu->bezt[1].vec[0][0], 13.0f); /* Left handle should be updated. */
EXPECT_FLOAT_EQ(fcu->bezt[1].vec[0][1], 0.0f);
- EXPECT_FLOAT_EQ(fcu->bezt[1].vec[1][0], 13.0f); // Coordinates should not be touched.
+ EXPECT_FLOAT_EQ(fcu->bezt[1].vec[1][0], 13.0f); /* Coordinates should not be touched. */
EXPECT_FLOAT_EQ(fcu->bezt[1].vec[1][1], 2.0f);
- EXPECT_FLOAT_EQ(fcu->bezt[1].vec[2][0], 16.0f); // Right handle should not be touched
+ EXPECT_FLOAT_EQ(fcu->bezt[1].vec[2][0], 16.0f); /* Right handle should not be touched */
EXPECT_FLOAT_EQ(fcu->bezt[1].vec[2][1], -3.0f);
- EXPECT_FLOAT_EQ(beztr.vec[0][0], 4.5f); // Left handle should be updated.
+ EXPECT_FLOAT_EQ(beztr.vec[0][0], 4.5f); /* Left handle should be updated. */
EXPECT_FLOAT_EQ(beztr.vec[0][1], 1.5f);
- EXPECT_FLOAT_EQ(beztr.vec[1][0], 7.375f); // Coordinates should not be touched.
+ EXPECT_FLOAT_EQ(beztr.vec[1][0], 7.375f); /* Coordinates should not be touched. */
EXPECT_FLOAT_EQ(beztr.vec[1][1], 1.0f);
- EXPECT_FLOAT_EQ(beztr.vec[2][0], 10.250); // Right handle should be updated.
+ EXPECT_FLOAT_EQ(beztr.vec[2][0], 10.250); /* Right handle should be updated. */
EXPECT_FLOAT_EQ(beztr.vec[2][1], 0.5);
BKE_fcurve_free(fcu);
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 92decf000ca..a63e3fda5a3 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -3208,7 +3208,7 @@ static void update_effectors(
effectors = BKE_effectors_create(depsgraph, ob, NULL, fds->effector_weights);
if (effectors) {
- // precalculate wind forces
+ /* Precalculate wind forces. */
UpdateEffectorsData data;
data.scene = scene;
data.fds = fds;
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index 970b5a906e3..d13425f5ec9 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -133,8 +133,8 @@ static void fcm_generator_new_data(void *mdata)
data->poly_order = 1;
data->arraysize = 2;
cp = data->coefficients = MEM_callocN(sizeof(float) * 2, "FMod_Generator_Coefs");
- cp[0] = 0; // y-offset
- cp[1] = 1; // gradient
+ cp[0] = 0; /* y-offset */
+ cp[1] = 1; /* gradient */
}
static void fcm_generator_verify(FModifier *fcm)
@@ -1057,7 +1057,8 @@ static void fmods_init_typeinfo(void)
fmodifiersTypeInfo[3] = &FMI_ENVELOPE; /* Envelope F-Curve Modifier */
fmodifiersTypeInfo[4] = &FMI_CYCLES; /* Cycles F-Curve Modifier */
fmodifiersTypeInfo[5] = &FMI_NOISE; /* Apply-Noise F-Curve Modifier */
- fmodifiersTypeInfo[6] = NULL /*&FMI_FILTER*/; /* Filter F-Curve Modifier */ // XXX unimplemented
+ fmodifiersTypeInfo[6] = NULL /*&FMI_FILTER*/;
+ /* Filter F-Curve Modifier */ /* XXX unimplemented. */
fmodifiersTypeInfo[7] = &FMI_PYTHON; /* Custom Python F-Curve Modifier */
fmodifiersTypeInfo[8] = &FMI_LIMITS; /* Limits F-Curve Modifier */
fmodifiersTypeInfo[9] = &FMI_STEPPED; /* Stepped F-Curve Modifier */
diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c
index 01e3eef4e19..bcec90cf0cf 100644
--- a/source/blender/blenkernel/intern/icons.c
+++ b/source/blender/blenkernel/intern/icons.c
@@ -51,7 +51,7 @@
#include "BKE_icons.h"
#include "BKE_studiolight.h"
-#include "BLI_sys_types.h" // for intptr_t support
+#include "BLI_sys_types.h" /* for intptr_t support */
#include "GPU_texture.h"
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index af15b9143e7..9ad71918242 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -967,7 +967,7 @@ bool IDP_EqualsProperties(IDProperty *prop1, IDProperty *prop2)
* \code{.c}
* IDPropertyTemplate val;
* IDProperty *group, *idgroup, *color;
- * group = IDP_New(IDP_GROUP, val, "group1"); //groups don't need a template.
+ * group = IDP_New(IDP_GROUP, val, "group1"); // groups don't need a template.
*
* val.array.len = 4
* val.array.type = IDP_FLOAT;
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 29cf3cc0a8d..07e31abab48 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -95,7 +95,7 @@
#include "GPU_texture.h"
-#include "BLI_sys_types.h" // for intptr_t support
+#include "BLI_sys_types.h" /* for intptr_t support */
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
@@ -1812,7 +1812,7 @@ void BKE_imbuf_to_image_format(struct ImageFormatData *im_format, const ImBuf *i
im_format->depth = R_IMF_CHAN_DEPTH_16;
}
if (custom_flags & OPENEXR_COMPRESS) {
- im_format->exr_codec = R_IMF_EXR_CODEC_ZIP; // Can't determine compression
+ im_format->exr_codec = R_IMF_EXR_CODEC_ZIP; /* Can't determine compression */
}
if (imbuf->zbuf_float) {
im_format->flag |= R_IMF_FLAG_ZBUF;
@@ -2200,7 +2200,7 @@ void BKE_image_stamp_buf(Scene *scene,
float w, h, pad;
int x, y, y_ofs;
float h_fixed;
- const int mono = blf_mono_font_render; // XXX
+ const int mono = blf_mono_font_render; /* XXX */
struct ColorManagedDisplay *display;
const char *display_device;
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index 17060750ed9..1a87b931689 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -177,7 +177,7 @@ static AdrBit2Path *adrcode_bitmaps_to_paths(int blocktype, int adrcode, int *to
if ((blocktype == ID_OB) && (adrcode == OB_LAY)) {
RET_ABP(ob_layer_bits);
}
- // XXX TODO: add other types...
+ /* XXX TODO: add other types... */
/* Normal curve */
return NULL;
@@ -473,7 +473,7 @@ static const char *mtex_adrcodes_to_paths(int adrcode, int *UNUSED(array_index))
/* property identifier for path */
adrcode = (adrcode & (MA_MAP1 - 1));
switch (adrcode) {
-#if 0 // XXX these are not wrapped in RNA yet!
+#if 0 /* XXX these are not wrapped in RNA yet! */
case MAP_OFS_X:
poin = &(mtex->ofs[0]);
break;
@@ -541,17 +541,17 @@ static const char *texture_adrcodes_to_paths(int adrcode, int *array_index)
case TE_TURB:
return "turbulence";
- case TE_NDEPTH: // XXX texture RNA undefined
+ case TE_NDEPTH: /* XXX texture RNA undefined */
// poin= &(tex->noisedepth); *type= IPO_SHORT; break;
break;
- case TE_NTYPE: // XXX texture RNA undefined
+ case TE_NTYPE: /* XXX texture RNA undefined */
// poin= &(tex->noisetype); *type= IPO_SHORT; break;
break;
case TE_N_BAS1:
return "noise_basis";
case TE_N_BAS2:
- return "noise_basis"; // XXX this is not yet defined in RNA...
+ return "noise_basis"; /* XXX this is not yet defined in RNA... */
/* voronoi */
case TE_VNW1:
@@ -582,7 +582,7 @@ static const char *texture_adrcodes_to_paths(int adrcode, int *array_index)
return "distortion_amount";
/* musgrave */
- case TE_MG_TYP: // XXX texture RNA undefined
+ case TE_MG_TYP: /* XXX texture RNA undefined */
// poin= &(tex->stype); *type= IPO_SHORT; break;
break;
case TE_MGH:
@@ -717,31 +717,31 @@ static const char *camera_adrcodes_to_paths(int adrcode, int *array_index)
/* result depends on adrcode */
switch (adrcode) {
case CAM_LENS:
-#if 0 /* XXX this cannot be resolved easily... \
- * perhaps we assume camera is perspective (works for most cases... */
+#if 0 /* XXX this cannot be resolved easily... \
+ * perhaps we assume camera is perspective (works for most cases... */
if (ca->type == CAM_ORTHO) {
return "ortho_scale";
}
else {
return "lens";
}
-#else // XXX lazy hack for now...
+#else /* XXX lazy hack for now... */
return "lens";
-#endif // XXX this cannot be resolved easily
+#endif /* XXX this cannot be resolved easily */
case CAM_STA:
return "clip_start";
case CAM_END:
return "clip_end";
-#if 0 // XXX these are not defined in RNA
+#if 0 /* XXX these are not defined in RNA */
case CAM_YF_APERT:
poin = &(ca->YF_aperture);
break;
case CAM_YF_FDIST:
poin = &(ca->dof_distance);
break;
-#endif // XXX these are not defined in RNA
+#endif /* XXX these are not defined in RNA */
case CAM_SHIFT_X:
return "shift_x";
@@ -1040,7 +1040,7 @@ static char *get_rna_access(ID *id,
/* XXX problematic blocktypes */
case ID_SEQ: /* sequencer strip */
- // SEQ_FAC1:
+ /* SEQ_FAC1: */
switch (adrcode) {
case SEQ_FAC1:
propname = "effect_fader";
@@ -1052,7 +1052,8 @@ static char *get_rna_access(ID *id,
propname = "blend_opacity";
break;
}
- // poin= &(seq->facf0); // XXX this doesn't seem to be included anywhere in sequencer RNA...
+ /* XXX this doesn't seem to be included anywhere in sequencer RNA... */
+ // poin= &(seq->facf0);
break;
/* special hacks */
@@ -1187,7 +1188,7 @@ static ChannelDriver *idriver_to_cdriver(IpoDriver *idriver)
/* if 'pydriver', just copy data across */
if (idriver->type == IPO_DRIVER_TYPE_PYTHON) {
/* PyDriver only requires the expression to be copied */
- // FIXME: expression will be useless due to API changes, but at least not totally lost
+ /* FIXME: expression will be useless due to API changes, but at least not totally lost */
cdriver->type = DRIVER_TYPE_PYTHON;
if (idriver->name[0]) {
BLI_strncpy(cdriver->expression, idriver->name, sizeof(cdriver->expression));
@@ -1219,7 +1220,7 @@ static ChannelDriver *idriver_to_cdriver(IpoDriver *idriver)
dtar = &dvar->targets[1];
dtar->id = (ID *)idriver->ob;
dtar->idtype = ID_OB;
- if (idriver->name[0]) { // xxx... for safety
+ if (idriver->name[0]) { /* xxx... for safety */
BLI_strncpy(
dtar->pchan_name, idriver->name + DRIVER_NAME_OFFS, sizeof(dtar->pchan_name));
}
@@ -1272,7 +1273,7 @@ static void fcurve_add_to_list(
bActionGroup *agrp = NULL;
/* init the temp action */
- memset(&tmp_act, 0, sizeof(bAction)); // XXX only enable this line if we get errors
+ memset(&tmp_act, 0, sizeof(bAction)); /* XXX only enable this line if we get errors */
tmp_act.groups.first = groups->first;
tmp_act.groups.last = groups->last;
tmp_act.curves.first = list->first;
@@ -1544,7 +1545,7 @@ static void icu_to_fcurves(ID *id,
*/
if (((icu->blocktype == ID_OB) && ELEM(icu->adrcode, OB_ROT_X, OB_ROT_Y, OB_ROT_Z)) ||
((icu->blocktype == ID_PO) && ELEM(icu->adrcode, AC_EUL_X, AC_EUL_Y, AC_EUL_Z))) {
- const float fac = (float)M_PI / 18.0f; // 10.0f * M_PI/180.0f;
+ const float fac = (float)M_PI / 18.0f; /* 10.0f * M_PI/180.0f; */
dst->vec[0][1] *= fac;
dst->vec[1][1] *= fac;
@@ -1719,7 +1720,7 @@ static void action_to_animato(
}
/* get rid of all Action Groups */
- // XXX this is risky if there's some old + some new data in the Action...
+ /* XXX this is risky if there's some old + some new data in the Action... */
if (act->groups.first) {
BLI_freelistN(&act->groups);
}
@@ -1793,7 +1794,7 @@ static void ipo_to_animdata(
/* Convert curves to animato system
* (separated into separate lists of F-Curves for animation and drivers),
* and the try to put these lists in the right places, but do not free the lists here. */
- // XXX there shouldn't be any need for the groups, so don't supply pointer for that now...
+ /* XXX there shouldn't be any need for the groups, so don't supply pointer for that now... */
ipo_to_animato(id, ipo, actname, constname, seq, NULL, &anim, &drivers);
/* deal with animation first */
@@ -1942,7 +1943,7 @@ static void nlastrips_to_animdata(ID *id, ListBase *strips)
}
/* modifiers */
- // FIXME: for now, we just free them...
+ /* FIXME: for now, we just free them... */
if (as->modifiers.first) {
BLI_freelistN(&as->modifiers);
}
@@ -1965,7 +1966,7 @@ static void nlastrips_to_animdata(ID *id, ListBase *strips)
* Data that has been converted should be freed immediately, which means that it is immediately
* clear which data-blocks have yet to be converted, and also prevent freeing errors when we exit.
*/
-// XXX currently done after all file reading...
+/* XXX currently done after all file reading... */
void do_versions_ipos_to_animato(Main *bmain)
{
ListBase drivers = {NULL, NULL};
@@ -2084,7 +2085,7 @@ void do_versions_ipos_to_animato(Main *bmain)
}
/* check for Action Constraint */
- // XXX do we really want to do this here?
+ /* XXX do we really want to do this here? */
}
/* check constraint channels - we need to remove them anyway... */
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index 8d0413f64c5..95a8419b95d 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -183,14 +183,14 @@ static void shapekey_blend_read_lib(BlendLibReader *reader, ID *id)
Key *key = (Key *)id;
BLI_assert((key->id.tag & LIB_TAG_EXTERN) == 0);
- BLO_read_id_address(reader, key->id.lib, &key->ipo); // XXX deprecated - old animation system
+ BLO_read_id_address(reader, key->id.lib, &key->ipo); /* XXX deprecated - old animation system */
BLO_read_id_address(reader, key->id.lib, &key->from);
}
static void shapekey_blend_read_expand(BlendExpander *expander, ID *id)
{
Key *key = (Key *)id;
- BLO_expand(expander, key->ipo); // XXX deprecated - old animation system
+ BLO_expand(expander, key->ipo); /* XXX deprecated - old animation system */
}
IDTypeInfo IDType_ID_KE = {
@@ -922,7 +922,7 @@ static void key_evaluate_relative(const int start,
reffrom = refb->data;
poin += start * poinsize;
- reffrom += key->elemsize * start; // key elemsize yes!
+ reffrom += key->elemsize * start; /* key elemsize yes! */
from += key->elemsize * start;
for (b = start; b < end; b += step) {
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 4ed8a796d5d..6efc9d0753e 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -1631,18 +1631,19 @@ void BKE_view_layer_selected_editable_objects_iterator_begin(BLI_Iterator *iter,
objects_iterator_begin(iter, data_in, BASE_VISIBLE_DEPSGRAPH | BASE_SELECTED);
if (iter->valid) {
if (BKE_object_is_libdata((Object *)iter->current) == false) {
- // First object is valid (selectable and not libdata) -> all good.
+ /* First object is valid (selectable and not libdata) -> all good. */
return;
}
- // Object is selectable but not editable -> search for another one.
+ /* Object is selectable but not editable -> search for another one. */
BKE_view_layer_selected_editable_objects_iterator_next(iter);
}
}
void BKE_view_layer_selected_editable_objects_iterator_next(BLI_Iterator *iter)
{
- // Search while there are objects and the one we have is not editable (editable = not libdata).
+ /* Search while there are objects and the one we have is not editable (editable = not libdata).
+ */
do {
objects_iterator_next(iter, BASE_VISIBLE_DEPSGRAPH | BASE_SELECTED);
} while (iter->valid && BKE_object_is_libdata((Object *)iter->current) != false);
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c
index f32a62376ac..733a2bcd1e1 100644
--- a/source/blender/blenkernel/intern/linestyle.c
+++ b/source/blender/blenkernel/intern/linestyle.c
@@ -2059,7 +2059,7 @@ void BKE_linestyle_default_shader(const bContext *C, FreestyleLineStyle *linesty
uv_along_stroke = nodeAddStaticNode(C, ntree, SH_NODE_UVALONGSTROKE);
uv_along_stroke->locx = 0.0f;
uv_along_stroke->locy = 300.0f;
- uv_along_stroke->custom1 = 0; // use_tips
+ uv_along_stroke->custom1 = 0; /* use_tips */
input_texure = nodeAddStaticNode(C, ntree, SH_NODE_TEX_IMAGE);
input_texure->locx = 200.0f;
@@ -2069,16 +2069,16 @@ void BKE_linestyle_default_shader(const bContext *C, FreestyleLineStyle *linesty
output_linestyle->locx = 400.0f;
output_linestyle->locy = 300.0f;
output_linestyle->custom1 = MA_RAMP_BLEND;
- output_linestyle->custom2 = 0; // use_clamp
+ output_linestyle->custom2 = 0; /* use_clamp */
nodeSetActive(ntree, input_texure);
- fromsock = BLI_findlink(&uv_along_stroke->outputs, 0); // UV
- tosock = BLI_findlink(&input_texure->inputs, 0); // UV
+ fromsock = BLI_findlink(&uv_along_stroke->outputs, 0); /* UV */
+ tosock = BLI_findlink(&input_texure->inputs, 0); /* UV */
nodeAddLink(ntree, uv_along_stroke, fromsock, input_texure, tosock);
- fromsock = BLI_findlink(&input_texure->outputs, 0); // Color
- tosock = BLI_findlink(&output_linestyle->inputs, 0); // Color
+ fromsock = BLI_findlink(&input_texure->outputs, 0); /* Color */
+ tosock = BLI_findlink(&output_linestyle->inputs, 0); /* Color */
nodeAddLink(ntree, input_texure, fromsock, output_linestyle, tosock);
ntreeUpdateTree(CTX_data_main(C), ntree);
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 965fdb53c09..4a85fab4e18 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -225,7 +225,7 @@ static void material_blend_read_data(BlendDataReader *reader, ID *id)
static void material_blend_read_lib(BlendLibReader *reader, ID *id)
{
Material *ma = (Material *)id;
- BLO_read_id_address(reader, ma->id.lib, &ma->ipo); // XXX deprecated - old animation system
+ BLO_read_id_address(reader, ma->id.lib, &ma->ipo); /* XXX deprecated - old animation system */
/* relink grease pencil settings */
if (ma->gp_style != NULL) {
@@ -242,7 +242,7 @@ static void material_blend_read_lib(BlendLibReader *reader, ID *id)
static void material_blend_read_expand(BlendExpander *expander, ID *id)
{
Material *ma = (Material *)id;
- BLO_expand(expander, ma->ipo); // XXX deprecated - old animation system
+ BLO_expand(expander, ma->ipo); /* XXX deprecated - old animation system */
if (ma->gp_style) {
MaterialGPencilStyle *gp_style = ma->gp_style;
diff --git a/source/blender/blenkernel/intern/mesh_convert.c b/source/blender/blenkernel/intern/mesh_convert.c
index c11f9961f67..247ea2975fd 100644
--- a/source/blender/blenkernel/intern/mesh_convert.c
+++ b/source/blender/blenkernel/intern/mesh_convert.c
@@ -317,7 +317,7 @@ int BKE_mesh_nurbs_displist_to_mdata(Object *ob,
*r_allvert = mvert = MEM_calloc_arrayN(totvert, sizeof(MVert), "nurbs_init mvert");
*r_alledge = medge = MEM_calloc_arrayN(totedge, sizeof(MEdge), "nurbs_init medge");
*r_allloop = mloop = MEM_calloc_arrayN(
- totpoly, sizeof(MLoop[4]), "nurbs_init mloop"); // totloop
+ totpoly, sizeof(MLoop[4]), "nurbs_init mloop"); /* totloop */
*r_allpoly = mpoly = MEM_calloc_arrayN(totpoly, sizeof(MPoly), "nurbs_init mloop");
if (r_alluv) {
diff --git a/source/blender/blenkernel/intern/mesh_merge.c b/source/blender/blenkernel/intern/mesh_merge.c
index ef28e9958fc..868694931cb 100644
--- a/source/blender/blenkernel/intern/mesh_merge.c
+++ b/source/blender/blenkernel/intern/mesh_merge.c
@@ -20,7 +20,7 @@
/** \file
* \ingroup bke
*/
-#include <string.h> // for memcpy
+#include <string.h> /* for memcpy */
#include "MEM_guardedalloc.h"
diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c
index 5f11476574e..6fea2cc8bf5 100644
--- a/source/blender/blenkernel/intern/mesh_validate.c
+++ b/source/blender/blenkernel/intern/mesh_validate.c
@@ -701,7 +701,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
/* Test same polys. */
if ((p1_nv == p2_nv) && (memcmp(p1_v, p2_v, p1_nv * sizeof(*p1_v)) == 0)) {
if (do_verbose) {
- // TODO: convert list to string
+ /* TODO: convert list to string */
PRINT_ERR("\tPolys %u and %u use same vertices (%d", prev_sp->index, sp->index, *p1_v);
for (j = 1; j < p1_nv; j++) {
PRINT_ERR(", %d", p1_v[j]);
diff --git a/source/blender/blenkernel/intern/object_update.c b/source/blender/blenkernel/intern/object_update.c
index 7f378e6e80b..915ee56e2f7 100644
--- a/source/blender/blenkernel/intern/object_update.c
+++ b/source/blender/blenkernel/intern/object_update.c
@@ -100,7 +100,7 @@ void BKE_object_eval_parent(Depsgraph *depsgraph, Object *ob)
DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
/* get local matrix (but don't calculate it, as that was done already!) */
- // XXX: redundant?
+ /* XXX: redundant? */
copy_m4_m4(locmat, ob->obmat);
/* get parent effect matrix */
diff --git a/source/blender/blenkernel/intern/outliner_treehash.c b/source/blender/blenkernel/intern/outliner_treehash.c
index 39618c95a68..05873d20f7f 100644
--- a/source/blender/blenkernel/intern/outliner_treehash.c
+++ b/source/blender/blenkernel/intern/outliner_treehash.c
@@ -193,7 +193,7 @@ static TseGroup *BKE_outliner_treehash_lookup_group(GHash *th, short type, short
{
TreeStoreElem tse_template;
tse_template.type = type;
- tse_template.nr = type ? nr : 0; // we're picky! :)
+ tse_template.nr = type ? nr : 0; /* we're picky! :) */
tse_template.id = id;
BLI_assert(th);
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index a4b9508320c..b978236da06 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -4195,7 +4195,7 @@ float psys_get_child_size(ParticleSystem *psys,
float *UNUSED(pa_time))
{
ParticleSettings *part = psys->part;
- float size; // time XXX
+ float size; /* time XXX */
if (part->childtype == PART_CHILD_FACES) {
int w = 0;
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 862ebf43913..060a9b4d794 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -2001,7 +2001,7 @@ static void sphclassical_force_cb(void *sphdata_v,
/* 4.77 is an experimentally determined density factor */
float rest_density = fluid->rest_density * (fluid->flag & SPH_FAC_DENSITY ? 4.77f : 1.0f);
- // Use speed of sound squared
+ /* Use speed of sound squared */
float stiffness = pow2f(fluid->stiffness_k);
ParticleData *npa;
@@ -2118,7 +2118,7 @@ void psys_sph_init(ParticleSimulationData *sim, SPHData *sphdata)
BLI_buffer_field_init(&sphdata->new_springs, ParticleSpring);
- // Add other coupled particle systems.
+ /* Add other coupled particle systems. */
sphdata->psys[0] = sim->psys;
for (i = 1, pt = sim->psys->targets.first; i < 10; i++, pt = (pt ? pt->next : NULL)) {
sphdata->psys[i] = pt ? psys_get_target_system(sim->ob, pt) : NULL;
@@ -2132,8 +2132,8 @@ void psys_sph_init(ParticleSimulationData *sim, SPHData *sphdata)
}
sphdata->eh = sph_springhash_build(sim->psys);
- // These per-particle values should be overridden later, but just for
- // completeness we give them default values now.
+ /* These per-particle values should be overridden later, but just for
+ * completeness we give them default values now. */
sphdata->pa = NULL;
sphdata->mass = 1.0f;
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 9018131af86..9d9e0a9c9cb 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -116,14 +116,14 @@
static CLG_LogRef LOG = {"bke.pointcache"};
static int ptcache_data_size[] = {
- sizeof(unsigned int), // BPHYS_DATA_INDEX
- sizeof(float[3]), // BPHYS_DATA_LOCATION
- sizeof(float[3]), // BPHYS_DATA_VELOCITY
- sizeof(float[4]), // BPHYS_DATA_ROTATION
- sizeof(float[3]), // BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST
- sizeof(float), // BPHYS_DATA_SIZE
- sizeof(float[3]), // BPHYS_DATA_TIMES
- sizeof(BoidData), // case BPHYS_DATA_BOIDS
+ sizeof(unsigned int), /* BPHYS_DATA_INDEX */
+ sizeof(float[3]), /* BPHYS_DATA_LOCATION */
+ sizeof(float[3]), /* BPHYS_DATA_VELOCITY */
+ sizeof(float[4]), /* BPHYS_DATA_ROTATION */
+ sizeof(float[3]), /* BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST */
+ sizeof(float), /* BPHYS_DATA_SIZE */
+ sizeof(float[3]), /* BPHYS_DATA_TIMES */
+ sizeof(BoidData), /* case BPHYS_DATA_BOIDS */
};
static int ptcache_extra_datasize[] = {
@@ -1550,7 +1550,7 @@ static int ptcache_file_compressed_write(
r = LzmaCompress(out,
&out_len,
in,
- in_len, // assume sizeof(char)==1....
+ in_len, /* assume sizeof(char)==1.... */
props,
&sizeOfIt,
5,
@@ -2117,7 +2117,7 @@ static int ptcache_read_stream(PTCacheID *pid, int cfra)
if (!error) {
ptcache_file_pointers_init(pf);
- // we have stream reading here
+ /* We have stream reading here. */
if (!pid->read_stream(pf, pid->calldata)) {
pid->error(pid->calldata, "Failed to read point cache file data");
error = 1;
@@ -3245,7 +3245,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker)
scene, pid->calldata, &cache->startframe, &cache->endframe);
}
- // XXX workaround for regression inroduced in ee3fadd, needs looking into
+ /* XXX workaround for regression inroduced in ee3fadd, needs looking into */
if (pid->type == PTCACHE_TYPE_RIGIDBODY) {
if ((cache->flag & PTCACHE_REDO_NEEDED ||
(cache->flag & PTCACHE_SIMULATION_VALID) == 0) &&
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 6b2b7271c76..586aeb274a5 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -509,7 +509,7 @@ static rbCollisionShape *rigidbody_validate_sim_shape_helper(RigidBodyWorld *rbw
* - assume even distribution of mass around the Object's pivot
* (i.e. Object pivot is centralized in boundbox)
*/
- // XXX: all dimensions are auto-determined now... later can add stored settings for this
+ /* XXX: all dimensions are auto-determined now... later can add stored settings for this */
/* get object dimensions without scaling */
bb = BKE_object_boundbox_get(ob);
if (bb) {
@@ -636,7 +636,7 @@ static void rigidbody_validate_sim_shape(RigidBodyWorld *rbw, Object *ob, bool r
/* --------------------- */
/* helper function to calculate volume of rigidbody object */
-// TODO: allow a parameter to specify method used to calculate this?
+/* TODO: allow a parameter to specify method used to calculate this? */
void BKE_rigidbody_calc_volume(Object *ob, float *r_vol)
{
RigidBodyOb *rbo = ob->rigidbody_object;
@@ -653,7 +653,7 @@ void BKE_rigidbody_calc_volume(Object *ob, float *r_vol)
* (i.e. Object pivot is centralized in boundbox)
* - boundbox gives full width
*/
- // XXX: all dimensions are auto-determined now... later can add stored settings for this
+ /* XXX: all dimensions are auto-determined now... later can add stored settings for this */
BKE_object_dimensions_get(ob, size);
if (ELEM(rbo->shape, RB_SHAPE_CAPSULE, RB_SHAPE_CYLINDER, RB_SHAPE_CONE)) {
@@ -742,7 +742,7 @@ void BKE_rigidbody_calc_center_of_mass(Object *ob, float r_center[3])
* (i.e. Object pivot is centralized in boundbox)
* - boundbox gives full width
*/
- // XXX: all dimensions are auto-determined now... later can add stored settings for this
+ /* XXX: all dimensions are auto-determined now... later can add stored settings for this */
BKE_object_dimensions_get(ob, size);
/* calculate volume as appropriate */
@@ -2034,7 +2034,7 @@ void BKE_rigidbody_sync_transforms(RigidBodyWorld *rbw, Object *ob, float ctime)
!(ob->base_flag & BASE_SELECTED && G.moving & G_TRANSFORM_OBJ)) {
float mat[4][4], size_mat[4][4], size[3];
- normalize_qt(rbo->orn); // RB_TODO investigate why quaternion isn't normalized at this point
+ normalize_qt(rbo->orn); /* RB_TODO investigate why quaternion isn't normalized at this point */
quat_to_mat4(mat, rbo->orn);
copy_v3_v3(mat[3], rbo->pos);
@@ -2200,7 +2200,7 @@ void BKE_rigidbody_do_simulation(Depsgraph *depsgraph, Scene *scene, float ctime
}
/* try to read from cache */
- // RB_TODO deal with interpolated, old and baked results
+ /* RB_TODO deal with interpolated, old and baked results */
bool can_simulate = (ctime == rbw->ltime + 1) && !(cache->flag & PTCACHE_BAKED);
if (BKE_ptcache_read(&pid, ctime, can_simulate) == PTCACHE_READ_EXACT) {
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 3ceac437274..5e5f325d7d8 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -421,10 +421,10 @@ static void scene_free_data(ID *id)
}
/* Master Collection */
- // TODO: what to do with do_id_user? it's also true when just
- // closing the file which seems wrong? should decrement users
- // for objects directly in the master collection? then other
- // collections in the scene need to do it too?
+ /* TODO: what to do with do_id_user? it's also true when just
+ * closing the file which seems wrong? should decrement users
+ * for objects directly in the master collection? then other
+ * collections in the scene need to do it too? */
if (scene->master_collection) {
BKE_collection_free(scene->master_collection);
MEM_freeN(scene->master_collection);
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c
index 9240851c07a..e9cf6421a02 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.c
+++ b/source/blender/blenkernel/intern/shrinkwrap.c
@@ -70,25 +70,25 @@
#define OUT_OF_MEMORY() ((void)printf("Shrinkwrap: Out of memory\n"))
typedef struct ShrinkwrapCalcData {
- ShrinkwrapModifierData *smd; // shrinkwrap modifier data
+ ShrinkwrapModifierData *smd; /* shrinkwrap modifier data */
- struct Object *ob; // object we are applying shrinkwrap to
+ struct Object *ob; /* object we are applying shrinkwrap to */
- struct MVert *vert; // Array of verts being projected (to fetch normals or other data)
- float (*vertexCos)[3]; // vertexs being shrinkwraped
+ struct MVert *vert; /* Array of verts being projected (to fetch normals or other data) */
+ float (*vertexCos)[3]; /* vertexs being shrinkwraped */
int numVerts;
- struct MDeformVert *dvert; // Pointer to mdeform array
- int vgroup; // Vertex group num
- bool invert_vgroup; /* invert vertex group influence */
+ struct MDeformVert *dvert; /* Pointer to mdeform array */
+ int vgroup; /* Vertex group num */
+ bool invert_vgroup; /* invert vertex group influence */
- struct Mesh *target; // mesh we are shrinking to
- struct SpaceTransform local2target; // transform to move between local and target space
- struct ShrinkwrapTreeData *tree; // mesh BVH tree data
+ struct Mesh *target; /* mesh we are shrinking to */
+ struct SpaceTransform local2target; /* transform to move between local and target space */
+ struct ShrinkwrapTreeData *tree; /* mesh BVH tree data */
struct Object *aux_target;
- float keepDist; // Distance to keep above target surface (units are in local space)
+ float keepDist; /* Distance to keep above target surface (units are in local space) */
} ShrinkwrapCalcData;
typedef struct ShrinkwrapCalcCBData {
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 9cf5ef85850..bf61c27ee2f 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -1506,7 +1506,7 @@ static void _scan_for_ext_spring_forces(
madd_v3_v3fl(bs->ext_force, vel, f * (1.0f - fabsf(dot_v3v3(vel, sp))));
}
else {
- madd_v3_v3fl(bs->ext_force, vel, f); // to keep compatible with 2.45 release files
+ madd_v3_v3fl(bs->ext_force, vel, f); /* to keep compatible with 2.45 release files */
}
}
/* --- springs seeing wind */
@@ -1554,7 +1554,7 @@ static void sb_sfesf_threads_run(struct Depsgraph *depsgraph,
for (i = 0; i < totthread; i++) {
sb_threads[i].scene = scene;
sb_threads[i].ob = ob;
- sb_threads[i].forcetime = 0.0; // not used here
+ sb_threads[i].forcetime = 0.0; /* not used here */
sb_threads[i].timenow = timenow;
sb_threads[i].ilast = left;
left = left - dec;
@@ -1565,9 +1565,9 @@ static void sb_sfesf_threads_run(struct Depsgraph *depsgraph,
sb_threads[i].ifirst = 0;
}
sb_threads[i].effectors = effectors;
- sb_threads[i].do_deflector = false; // not used here
- sb_threads[i].fieldfactor = 0.0f; // not used here
- sb_threads[i].windfactor = 0.0f; // not used here
+ sb_threads[i].do_deflector = false; /* not used here */
+ sb_threads[i].fieldfactor = 0.0f; /* not used here */
+ sb_threads[i].windfactor = 0.0f; /* not used here */
sb_threads[i].nr = i;
sb_threads[i].tot = totthread;
}
@@ -1741,8 +1741,7 @@ static int sb_detect_vertex_collisionCached(float opco[3],
cross_v3_v3v3(d_nvect, edge2, edge1);
/* n_mag = */ /* UNUSED */ normalize_v3(d_nvect);
facedist = dot_v3v3(dv1, d_nvect);
- // so rules are
- //
+ /* so rules are */
if ((facedist > innerfacethickness) && (facedist < outerfacethickness)) {
if (isect_point_tri_prism_v3(opco, nv1, nv2, nv3)) {
@@ -1781,7 +1780,7 @@ static int sb_detect_vertex_collisionCached(float opco[3],
}
} /* while () */
- if (deflected == 1) { // no face but 'outer' edge cylinder sees vert
+ if (deflected == 1) { /* no face but 'outer' edge cylinder sees vert */
force_mag_norm = (float)exp(-ee * mindistedge);
if (mindistedge > outerfacethickness * ff) {
force_mag_norm = (float)force_mag_norm * fa * (mindistedge - outerfacethickness) *
@@ -1793,10 +1792,10 @@ static int sb_detect_vertex_collisionCached(float opco[3],
*damp *= (1.0f - mindistedge / outerfacethickness);
}
}
- if (deflected == 2) { // face inner detected
+ if (deflected == 2) { /* face inner detected */
add_v3_v3(force, innerforceaccu);
}
- if (deflected == 3) { // face outer detected
+ if (deflected == 3) { /* face outer detected */
add_v3_v3(force, outerforceaccu);
}
@@ -3496,14 +3495,14 @@ static void softbody_step(
}
else if (sb->solver_ID == 2) {
/* do semi "fake" implicit euler */
- // removed
+ /* removed */
} /*SOLVER SELECT*/
else if (sb->solver_ID == 4) {
/* do semi "fake" implicit euler */
} /*SOLVER SELECT*/
else if (sb->solver_ID == 3) {
/* do "stupid" semi "fake" implicit euler */
- // removed
+ /* removed */
} /*SOLVER SELECT*/
else {
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index dbcc2482f5a..0f1b341a606 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -180,13 +180,13 @@ static void sound_blend_read_lib(BlendLibReader *reader, ID *id)
{
bSound *sound = (bSound *)id;
BLO_read_id_address(
- reader, sound->id.lib, &sound->ipo); // XXX deprecated - old animation system
+ reader, sound->id.lib, &sound->ipo); /* XXX deprecated - old animation system */
}
static void sound_blend_read_expand(BlendExpander *expander, ID *id)
{
bSound *snd = (bSound *)id;
- BLO_expand(expander, snd->ipo); // XXX deprecated - old animation system
+ BLO_expand(expander, snd->ipo); /* XXX deprecated - old animation system */
}
IDTypeInfo IDType_ID_SO = {
@@ -957,7 +957,7 @@ double BKE_sound_sync_scene(Scene *scene)
{
sound_verify_evaluated_id(&scene->id);
- // Ugly: Blender doesn't like it when the animation is played back during rendering
+ /* Ugly: Blender doesn't like it when the animation is played back during rendering */
if (G.is_rendering) {
return NAN_FLT;
}
@@ -976,12 +976,12 @@ int BKE_sound_scene_playing(Scene *scene)
{
sound_verify_evaluated_id(&scene->id);
- // Ugly: Blender doesn't like it when the animation is played back during rendering
+ /* Ugly: Blender doesn't like it when the animation is played back during rendering */
if (G.is_rendering) {
return -1;
}
- // in case of a "Null" audio device, we have no playback information
+ /* In case of a "Null" audio device, we have no playback information. */
if (AUD_Device_getRate(sound_device) == AUD_RATE_INVALID) {
return -1;
}
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index abc5c78d1d3..93306703686 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -906,7 +906,7 @@ void txt_move_left(Text *text, const bool sel)
}
else {
/* do nice left only if there are only spaces */
- // TXT_TABSIZE hardcoded in DNA_text_types.h
+ /* #TXT_TABSIZE hard-coded in DNA_text_types.h */
if (text->flags & TXT_TABSTOSPACES) {
tabsize = txt_calc_tab_left(*linep, *charp);
}
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 077fab60546..90c4f71ce7a 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -193,14 +193,14 @@ static void texture_blend_read_lib(BlendLibReader *reader, ID *id)
{
Tex *tex = (Tex *)id;
BLO_read_id_address(reader, tex->id.lib, &tex->ima);
- BLO_read_id_address(reader, tex->id.lib, &tex->ipo); // XXX deprecated - old animation system
+ BLO_read_id_address(reader, tex->id.lib, &tex->ipo); /* XXX deprecated - old animation system */
}
static void texture_blend_read_expand(BlendExpander *expander, ID *id)
{
Tex *tex = (Tex *)id;
BLO_expand(expander, tex->ima);
- BLO_expand(expander, tex->ipo); // XXX deprecated - old animation system
+ BLO_expand(expander, tex->ipo); /* XXX deprecated - old animation system */
}
IDTypeInfo IDType_ID_TE = {
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index 019cb9e2cf5..094557502a3 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -174,13 +174,13 @@ static void world_blend_read_data(BlendDataReader *reader, ID *id)
static void world_blend_read_lib(BlendLibReader *reader, ID *id)
{
World *wrld = (World *)id;
- BLO_read_id_address(reader, wrld->id.lib, &wrld->ipo); // XXX deprecated - old animation system
+ BLO_read_id_address(reader, wrld->id.lib, &wrld->ipo); /* XXX deprecated, old animation system */
}
static void world_blend_read_expand(BlendExpander *expander, ID *id)
{
World *wrld = (World *)id;
- BLO_expand(expander, wrld->ipo); // XXX deprecated - old animation system
+ BLO_expand(expander, wrld->ipo); /* XXX deprecated, old animation system */
}
IDTypeInfo IDType_ID_WO = {
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 0073a3692ee..7a8fd2dc43b 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -249,7 +249,7 @@ static int write_audio_frame(FFMpegContext *context)
return 0;
}
-# endif // #ifdef WITH_AUDASPACE
+# endif /* #ifdef WITH_AUDASPACE */
/* Allocate a temporary frame */
static AVFrame *alloc_picture(int pix_fmt, int width, int height)
@@ -878,9 +878,9 @@ static AVStream *alloc_audio_stream(FFMpegContext *context,
# endif
if (c->frame_size == 0) {
- // used to be if ((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD))
- // not sure if that is needed anymore, so let's try out if there are any
- // complaints regarding some ffmpeg versions users might have
+ /* Used to be if ((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD))
+ * not sure if that is needed anymore, so let's try out if there are any
+ * complaints regarding some FFmpeg versions users might have. */
context->audio_input_samples = FF_MIN_BUFFER_SIZE * 8 / c->bits_per_coded_sample / c->channels;
}
else {
@@ -1675,9 +1675,9 @@ static void ffmpeg_set_expert_options(RenderData *rd)
/* This breaks compatibility for QT. */
// BKE_ffmpeg_property_add_string(rd, "video", "flags:loop");
BKE_ffmpeg_property_add_string(rd, "video", "cmp:chroma");
- BKE_ffmpeg_property_add_string(rd, "video", "partitions:parti4x4"); // Deprecated.
- BKE_ffmpeg_property_add_string(rd, "video", "partitions:partp8x8"); // Deprecated.
- BKE_ffmpeg_property_add_string(rd, "video", "partitions:partb8x8"); // Deprecated.
+ BKE_ffmpeg_property_add_string(rd, "video", "partitions:parti4x4"); /* Deprecated. */
+ BKE_ffmpeg_property_add_string(rd, "video", "partitions:partp8x8"); /* Deprecated. */
+ BKE_ffmpeg_property_add_string(rd, "video", "partitions:partb8x8"); /* Deprecated. */
BKE_ffmpeg_property_add_string(rd, "video", "me:hex");
BKE_ffmpeg_property_add_string(rd, "video", "subq:6");
BKE_ffmpeg_property_add_string(rd, "video", "me_range:16");
@@ -1787,7 +1787,7 @@ void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
rd->ffcodecdata.codec = AV_CODEC_ID_MPEG4;
}
else if (preset == FFMPEG_PRESET_THEORA) {
- rd->ffcodecdata.type = FFMPEG_OGG; // XXX broken
+ rd->ffcodecdata.type = FFMPEG_OGG; /* XXX broken */
rd->ffcodecdata.codec = AV_CODEC_ID_THEORA;
}
diff --git a/source/blender/blenlib/intern/BLI_filelist.c b/source/blender/blenlib/intern/BLI_filelist.c
index 26f1de33aa9..fe3ec368379 100644
--- a/source/blender/blenlib/intern/BLI_filelist.c
+++ b/source/blender/blenlib/intern/BLI_filelist.c
@@ -248,8 +248,8 @@ unsigned int BLI_filelist_dir_contents(const char *dirname, struct direntry **r_
*r_filelist = dir_ctx.files;
}
else {
- // keep blender happy. Blender stores this in a variable
- // where 0 has special meaning.....
+ /* Keep Blender happy. Blender stores this in a variable
+ * where 0 has special meaning..... */
*r_filelist = MEM_mallocN(sizeof(**r_filelist), __func__);
}
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 014c5217896..413c2007b1b 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -58,7 +58,7 @@
#include "BLI_fileops.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
-#include "BLI_sys_types.h" // for intptr_t support
+#include "BLI_sys_types.h" /* for intptr_t support */
#include "BLI_utildefines.h"
#if 0 /* UNUSED */
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c
index 132aeb3ace2..31ee81de40e 100644
--- a/source/blender/blenlib/intern/math_color.c
+++ b/source/blender/blenlib/intern/math_color.c
@@ -264,7 +264,7 @@ void rgb_to_hsl(float r, float g, float b, float *r_h, float *r_s, float *r_l)
float h, s, l = min_ff(1.0, (cmax + cmin) / 2.0f);
if (cmax == cmin) {
- h = s = 0.0f; // achromatic
+ h = s = 0.0f; /* achromatic */
}
else {
float d = cmax - cmin;
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index d4f0467b31b..f3afef80c3e 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1026,7 +1026,7 @@ bool BLI_path_abs(char *path, const char *basepath)
if (!wasrelative && !BLI_path_is_abs(path)) {
char *p = path;
BLI_windows_get_default_root_dir(tmp);
- // get rid of the slashes at the beginning of the path
+ /* Get rid of the slashes at the beginning of the path. */
while (ELEM(*p, '\\', '/')) {
p++;
}
diff --git a/source/blender/blenlib/intern/system_win32.c b/source/blender/blenlib/intern/system_win32.c
index d60f54ebe67..be2195d679d 100644
--- a/source/blender/blenlib/intern/system_win32.c
+++ b/source/blender/blenlib/intern/system_win32.c
@@ -244,7 +244,7 @@ static void bli_windows_system_backtrace_modules(FILE *fp)
me32.dwSize = sizeof(MODULEENTRY32);
if (!Module32First(hModuleSnap, &me32)) {
- CloseHandle(hModuleSnap); // Must clean up the snapshot object!
+ CloseHandle(hModuleSnap); /* Must clean up the snapshot object! */
fprintf(fp, " Error getting module list.\n");
return;
}
diff --git a/source/blender/blenlib/tests/BLI_path_util_test.cc b/source/blender/blenlib/tests/BLI_path_util_test.cc
index 6cfebd0ea05..5556062233e 100644
--- a/source/blender/blenlib/tests/BLI_path_util_test.cc
+++ b/source/blender/blenlib/tests/BLI_path_util_test.cc
@@ -284,9 +284,9 @@ TEST(path_util, JoinTruncateLong)
JOIN("//longer/p", 11, "//", "//longer", "path");
JOIN("//longer/pa", 12, "//", "//longer", "path");
JOIN("//longer/pat", 13, "//", "//longer", "path");
- JOIN("//longer/path", 14, "//", "//longer", "path"); // not truncated
+ JOIN("//longer/path", 14, "//", "//longer", "path"); /* not truncated. */
JOIN("//longer/path", 14, "//", "//longer", "path/");
- JOIN("//longer/path/", 15, "//", "//longer", "path/"); // not truncated
+ JOIN("//longer/path/", 15, "//", "//longer", "path/"); /* not truncated. */
JOIN("//longer/path/", 15, "//", "//longer", "path/", "trunc");
JOIN("//longer/path/t", 16, "//", "//longer", "path/", "trunc");
}
diff --git a/source/blender/blenlib/tests/BLI_string_test.cc b/source/blender/blenlib/tests/BLI_string_test.cc
index 12f0fd5ac62..e8fe505a6c9 100644
--- a/source/blender/blenlib/tests/BLI_string_test.cc
+++ b/source/blender/blenlib/tests/BLI_string_test.cc
@@ -4,7 +4,7 @@
#include <array>
#include <initializer_list>
-#include <ostream> // NOLINT
+#include <ostream> /* NOLINT */
#include <string>
#include <utility>
#include <vector>
diff --git a/source/blender/blenlib/tests/BLI_string_utf8_test.cc b/source/blender/blenlib/tests/BLI_string_utf8_test.cc
index 96df4d2b71a..f0b6ab9cd2a 100644
--- a/source/blender/blenlib/tests/BLI_string_utf8_test.cc
+++ b/source/blender/blenlib/tests/BLI_string_utf8_test.cc
@@ -23,14 +23,14 @@
* by Markus Kuhn <http://www.cl.cam.ac.uk/~mgk25/> - 2015-08-28 - CC BY 4.0
*/
const char *utf8_invalid_tests[][3] = {
-// 1 Some correct UTF-8 text
+/* 1 Some correct UTF-8 text. */
{"You should see the Greek word 'kosme': \"\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5\" |",
"You should see the Greek word 'kosme': \"\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5\" |", "\x00"},
-// 2 Boundary condition test cases
-// Note that those will pass for us, those are not erronéous unicode code points
-// (asside from \x00, which is only valid as string terminator).
-// 2.1 First possible sequence of a certain length
+/* 2 Boundary condition test cases
+ * Note that those will pass for us, those are not erronéous unicode code points
+ * (asside from \x00, which is only valid as string terminator).
+ * 2.1 First possible sequence of a certain length */
{"2.1.1 1 byte (U-00000000): \"\x00\" |",
"2.1.1 1 byte (U-00000000): \"\" |", "\x01"},
{"2.1.2 2 bytes (U-00000080): \"\xc2\x80\" |",
@@ -43,7 +43,7 @@ const char *utf8_invalid_tests[][3] = {
"2.1.5 5 bytes (U-00200000): \"\xf8\x88\x80\x80\x80\" |", "\x00"},
{"2.1.6 6 bytes (U-04000000): \"\xfc\x84\x80\x80\x80\x80\" |",
"2.1.6 6 bytes (U-04000000): \"\xfc\x84\x80\x80\x80\x80\" |", "\x00"},
-// 2.2 Last possible sequence of a certain length
+/* 2.2 Last possible sequence of a certain length */
{"2.2.1 1 byte (U-0000007F): \"\x7f\" |",
"2.2.1 1 byte (U-0000007F): \"\x7f\" |", "\x00"},
{"2.2.2 2 bytes (U-000007FF): \"\xdf\xbf\" |",
@@ -56,7 +56,7 @@ const char *utf8_invalid_tests[][3] = {
"2.2.5 5 bytes (U-03FFFFFF): \"\xfb\xbf\xbf\xbf\xbf\" |", "\x00"},
{"2.2.6 6 bytes (U-7FFFFFFF): \"\xfd\xbf\xbf\xbf\xbf\xbf\" |",
"2.2.6 6 bytes (U-7FFFFFFF): \"\xfd\xbf\xbf\xbf\xbf\xbf\" |", "\x00"},
-// 2.3 Other boundary conditions
+/* 2.3 Other boundary conditions */
{"2.3.1 U-0000D7FF = ed 9f bf = \"\xed\x9f\xbf\" |",
"2.3.1 U-0000D7FF = ed 9f bf = \"\xed\x9f\xbf\" |", "\x00"},
{"2.3.2 U-0000E000 = ee 80 80 = \"\xee\x80\x80\" |",
@@ -68,9 +68,9 @@ const char *utf8_invalid_tests[][3] = {
{"2.3.5 U-00110000 = f4 90 80 80 = \"\xf4\x90\x80\x80\" |",
"2.3.5 U-00110000 = f4 90 80 80 = \"\xf4\x90\x80\x80\" |", "\x00"},
-// 3 Malformed sequences
-// 3.1 Unexpected continuation bytes
-// Each unexpected continuation byte should be separately signaled as a malformed sequence of its own.
+/* 3 Malformed sequences
+ * 3.1 Unexpected continuation bytes
+ * Each unexpected continuation byte should be separately signaled as a malformed sequence of its own. */
{"3.1.1 First continuation byte 0x80: \"\x80\" |",
"3.1.1 First continuation byte 0x80: \"\" |", "\x01"},
{"3.1.2 Last continuation byte 0xbf: \"\xbf\" |",
@@ -87,33 +87,33 @@ const char *utf8_invalid_tests[][3] = {
"3.1.7 6 continuation bytes: \"\" |", "\x06"},
{"3.1.8 7 continuation bytes: \"\x80\xbf\x80\xbf\x80\xbf\x80\" |",
"3.1.8 7 continuation bytes: \"\" |", "\x07"},
-// 3.1.9 Sequence of all 64 possible continuation bytes (0x80-0xbf): |
+/* 3.1.9 Sequence of all 64 possible continuation bytes (0x80-0xbf): | */
{"3.1.9 \"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
"\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
"\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
"\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\" |",
"3.1.9 \"\" |", "\x40"},
-// 3.2 Lonely start characters
-// 3.2.1 All 32 first bytes of 2-byte sequences (0xc0-0xdf), each followed by a space character:
+/* 3.2 Lonely start characters
+ * 3.2.1 All 32 first bytes of 2-byte sequences (0xc0-0xdf), each followed by a space character: */
{"3.2.1 \"\xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf "
"\xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf \" |",
"3.2.1 \" \" |", "\x20"},
-// 3.2.2 All 16 first bytes of 3-byte sequences (0xe0-0xef), each followed by a space character:
+/* 3.2.2 All 16 first bytes of 3-byte sequences (0xe0-0xef), each followed by a space character: */
{"3.2.2 \"\xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee \xef \" |",
"3.2.2 \" \" |", "\x10"},
-// 3.2.3 All 8 first bytes of 4-byte sequences (0xf0-0xf7), each followed by a space character:
+/* 3.2.3 All 8 first bytes of 4-byte sequences (0xf0-0xf7), each followed by a space character: */
{"3.2.3 \"\xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \" |",
"3.2.3 \" \" |", "\x08"},
-// 3.2.4 All 4 first bytes of 5-byte sequences (0xf8-0xfb), each followed by a space character:
+/* 3.2.4 All 4 first bytes of 5-byte sequences (0xf8-0xfb), each followed by a space character: */
{"3.2.4 \"\xf8 \xf9 \xfa \xfb \" |",
"3.2.4 \" \" |", "\x04"},
-// 3.2.5 All 2 first bytes of 6-byte sequences (0xfc-0xfd), each followed by a space character:
+/* 3.2.5 All 2 first bytes of 6-byte sequences (0xfc-0xfd), each followed by a space character: */
{"3.2.4 \"\xfc \xfd \" |",
"3.2.4 \" \" |", "\x02"},
-// 3.3 Sequences with last continuation byte missing
-// All bytes of an incomplete sequence should be signaled as a single malformed sequence,
-// i.e., you should see only a single replacement character in each of the next 10 tests.
-// (Characters as in section 2)
+/* 3.3 Sequences with last continuation byte missing
+ * All bytes of an incomplete sequence should be signaled as a single malformed sequence,
+ * i.e., you should see only a single replacement character in each of the next 10 tests.
+ * (Characters as in section 2) */
{"3.3.1 2-byte sequence with last byte missing (U+0000): \"\xc0\" |",
"3.3.1 2-byte sequence with last byte missing (U+0000): \"\" |", "\x01"},
{"3.3.2 3-byte sequence with last byte missing (U+0000): \"\xe0\x80\" |",
@@ -134,14 +134,14 @@ const char *utf8_invalid_tests[][3] = {
"3.3.9 5-byte sequence with last byte missing (U-03FFFFFF): \"\" |", "\x04"},
{"3.3.10 6-byte sequence with last byte missing (U-7FFFFFFF): \"\xfd\xbf\xbf\xbf\xbf\" |",
"3.3.10 6-byte sequence with last byte missing (U-7FFFFFFF): \"\" |", "\x05"},
-// 3.4 Concatenation of incomplete sequences
-// All the 10 sequences of 3.3 concatenated, you should see 10 malformed sequences being signaled:
+/* 3.4 Concatenation of incomplete sequences
+ * All the 10 sequences of 3.3 concatenated, you should see 10 malformed sequences being signaled: */
{"3.4 \"\xc0\xe0\x80\xf0\x80\x80\xf8\x80\x80\x80\xfc\x80\x80\x80\x80"
"\xdf\xef\xbf\xf7\xbf\xbf\xfb\xbf\xbf\xbf\xfd\xbf\xbf\xbf\xbf\""
" |",
"3.4 \"\" |", "\x1e"},
-// 3.5 Impossible bytes
-// The following two bytes cannot appear in a correct UTF-8 string
+/* 3.5 Impossible bytes
+ * The following two bytes cannot appear in a correct UTF-8 string */
{"3.5.1 fe = \"\xfe\" |",
"3.5.1 fe = \"\" |", "\x01"},
{"3.5.2 ff = \"\xff\" |",
@@ -149,24 +149,24 @@ const char *utf8_invalid_tests[][3] = {
{"3.5.3 fe fe ff ff = \"\xfe\xfe\xff\xff\" |",
"3.5.3 fe fe ff ff = \"\" |", "\x04"},
-// 4 Overlong sequences
-// The following sequences are not malformed according to the letter of the Unicode 2.0 standard.
-// However, they are longer then necessary and a correct UTF-8 encoder is not allowed to produce them.
-// A "safe UTF-8 decoder" should reject them just like malformed sequences for two reasons:
-// (1) It helps to debug applications if overlong sequences are not treated as valid representations
-// of characters, because this helps to spot problems more quickly. (2) Overlong sequences provide
-// alternative representations of characters, that could maliciously be used to bypass filters that check
-// only for ASCII characters. For instance, a 2-byte encoded line feed (LF) would not be caught by a
-// line counter that counts only 0x0a bytes, but it would still be processed as a line feed by an unsafe
-// UTF-8 decoder later in the pipeline. From a security point of view, ASCII compatibility of UTF-8
-// sequences means also, that ASCII characters are *only* allowed to be represented by ASCII bytes
-// in the range 0x00-0x7f. To ensure this aspect of ASCII compatibility, use only "safe UTF-8 decoders"
-// that reject overlong UTF-8 sequences for which a shorter encoding exists.
-//
-// 4.1 Examples of an overlong ASCII character
-// With a safe UTF-8 decoder, all of the following five overlong representations of the ASCII character
-// slash ("/") should be rejected like a malformed UTF-8 sequence, for instance by substituting it with
-// a replacement character. If you see a slash below, you do not have a safe UTF-8 decoder!
+/* 4 Overlong sequences
+ * The following sequences are not malformed according to the letter of the Unicode 2.0 standard.
+ * However, they are longer then necessary and a correct UTF-8 encoder is not allowed to produce them.
+ * A "safe UTF-8 decoder" should reject them just like malformed sequences for two reasons:
+ * (1) It helps to debug applications if overlong sequences are not treated as valid representations
+ * of characters, because this helps to spot problems more quickly. (2) Overlong sequences provide
+ * alternative representations of characters, that could maliciously be used to bypass filters that check
+ * only for ASCII characters. For instance, a 2-byte encoded line feed (LF) would not be caught by a
+ * line counter that counts only 0x0a bytes, but it would still be processed as a line feed by an unsafe
+ * UTF-8 decoder later in the pipeline. From a security point of view, ASCII compatibility of UTF-8
+ * sequences means also, that ASCII characters are *only* allowed to be represented by ASCII bytes
+ * in the range 0x00-0x7f. To ensure this aspect of ASCII compatibility, use only "safe UTF-8 decoders"
+ * that reject overlong UTF-8 sequences for which a shorter encoding exists.
+ *
+ * 4.1 Examples of an overlong ASCII character
+ * With a safe UTF-8 decoder, all of the following five overlong representations of the ASCII character
+ * slash ("/") should be rejected like a malformed UTF-8 sequence, for instance by substituting it with
+ * a replacement character. If you see a slash below, you do not have a safe UTF-8 decoder! */
{"4.1.1 U+002F = c0 af = \"\xc0\xaf\" |",
"4.1.1 U+002F = c0 af = \"\" |", "\x02"},
{"4.1.2 U+002F = e0 80 af = \"\xe0\x80\xaf\" |",
@@ -177,10 +177,10 @@ const char *utf8_invalid_tests[][3] = {
"4.1.4 U+002F = f8 80 80 80 af = \"\" |", "\x05"},
{"4.1.5 U+002F = fc 80 80 80 80 af = \"\xfc\x80\x80\x80\x80\xaf\" |",
"4.1.5 U+002F = fc 80 80 80 80 af = \"\" |", "\x06"},
-// 4.2 Maximum overlong sequences
-// Below you see the highest Unicode value that is still resulting in an overlong sequence if represented
-// with the given number of bytes. This is a boundary test for safe UTF-8 decoders. All five characters
-// should be rejected like malformed UTF-8 sequences.
+/* 4.2 Maximum overlong sequences
+ * Below you see the highest Unicode value that is still resulting in an overlong sequence if represented
+ * with the given number of bytes. This is a boundary test for safe UTF-8 decoders. All five characters
+ * should be rejected like malformed UTF-8 sequences. */
{"4.2.1 U-0000007F = c1 bf = \"\xc1\xbf\" |",
"4.2.1 U-0000007F = c1 bf = \"\" |", "\x02"},
{"4.2.2 U-000007FF = e0 9f bf = \"\xe0\x9f\xbf\" |",
@@ -191,9 +191,9 @@ const char *utf8_invalid_tests[][3] = {
"4.2.4 U-001FFFFF = f8 87 bf bf bf = \"\" |", "\x05"},
{"4.2.5 U+0000 = fc 83 bf bf bf bf = \"\xfc\x83\xbf\xbf\xbf\xbf\" |",
"4.2.5 U+0000 = fc 83 bf bf bf bf = \"\" |", "\x06"},
-// 4.3 Overlong representation of the NUL character
-// The following five sequences should also be rejected like malformed UTF-8 sequences and should not be
-// treated like the ASCII NUL character.
+/* 4.3 Overlong representation of the NUL character
+ * The following five sequences should also be rejected like malformed UTF-8 sequences and should not be
+ * treated like the ASCII NUL character. */
{"4.3.1 U+0000 = c0 80 = \"\xc0\x80\" |",
"4.3.1 U+0000 = c0 80 = \"\" |", "\x02"},
{"4.3.2 U+0000 = e0 80 80 = \"\xe0\x80\x80\" |",
@@ -205,11 +205,11 @@ const char *utf8_invalid_tests[][3] = {
{"4.3.5 U+0000 = fc 80 80 80 80 80 = \"\xfc\x80\x80\x80\x80\x80\" |",
"4.3.5 U+0000 = fc 80 80 80 80 80 = \"\" |", "\x06"},
-// 5 Illegal code positions
-// The following UTF-8 sequences should be rejected like malformed sequences, because they never represent
-// valid ISO 10646 characters and a UTF-8 decoder that accepts them might introduce security problems
-// comparable to overlong UTF-8 sequences.
-// 5.1 Single UTF-16 surrogates
+/* 5 Illegal code positions
+ * The following UTF-8 sequences should be rejected like malformed sequences, because they never represent
+ * valid ISO 10646 characters and a UTF-8 decoder that accepts them might introduce security problems
+ * comparable to overlong UTF-8 sequences.
+ * 5.1 Single UTF-16 surrogates */
{"5.1.1 U+D800 = ed a0 80 = \"\xed\xa0\x80\" |",
"5.1.1 U+D800 = ed a0 80 = \"\" |", "\x03"},
{"5.1.2 U+DB7F = ed ad bf = \"\xed\xad\xbf\" |",
@@ -224,7 +224,7 @@ const char *utf8_invalid_tests[][3] = {
"5.1.6 U+DF80 = ed be 80 = \"\" |", "\x03"},
{"5.1.7 U+DFFF = ed bf bf = \"\xed\xbf\xbf\" |",
"5.1.7 U+DFFF = ed bf bf = \"\" |", "\x03"},
-// 5.2 Paired UTF-16 surrogates
+/* 5.2 Paired UTF-16 surrogates */
{"5.2.1 U+D800 U+DC00 = ed a0 80 ed b0 80 = \"\xed\xa0\x80\xed\xb0\x80\" |",
"5.2.1 U+D800 U+DC00 = ed a0 80 ed b0 80 = \"\" |", "\x06"},
{"5.2.2 U+D800 U+DFFF = ed a0 80 ed bf bf = \"\xed\xa0\x80\xed\xbf\xbf\" |",
@@ -241,27 +241,27 @@ const char *utf8_invalid_tests[][3] = {
"5.2.7 U+DBFF U+DC00 = ed af bf ed b0 80 = \"\" |", "\x06"},
{"5.2.8 U+DBFF U+DFFF = ed af bf ed bf bf = \"\xed\xaf\xbf\xed\xbf\xbf\" |",
"5.2.8 U+DBFF U+DFFF = ed af bf ed bf bf = \"\" |", "\x06"},
-// 5.3 Noncharacter code positions
-// The following "noncharacters" are "reserved for internal use" by applications, and according to older versions
-// of the Unicode Standard "should never be interchanged". Unicode Corrigendum #9 dropped the latter restriction.
-// Nevertheless, their presence in incoming UTF-8 data can remain a potential security risk, depending
-// on what use is made of these codes subsequently. Examples of such internal use:
-// - Some file APIs with 16-bit characters may use the integer value -1 = U+FFFF to signal
-// an end-of-file (EOF) or error condition.
-// - In some UTF-16 receivers, code point U+FFFE might trigger a byte-swap operation
-// (to convert between UTF-16LE and UTF-16BE).
-// With such internal use of noncharacters, it may be desirable and safer to block those code points in
-// UTF-8 decoders, as they should never occur legitimately in incoming UTF-8 data, and could trigger
-// unsafe behavior in subsequent processing.
-//
-// Particularly problematic noncharacters in 16-bit applications:
+/* 5.3 Noncharacter code positions
+ * The following "noncharacters" are "reserved for internal use" by applications, and according to older versions
+ * of the Unicode Standard "should never be interchanged". Unicode Corrigendum #9 dropped the latter restriction.
+ * Nevertheless, their presence in incoming UTF-8 data can remain a potential security risk, depending
+ * on what use is made of these codes subsequently. Examples of such internal use:
+ * - Some file APIs with 16-bit characters may use the integer value -1 = U+FFFF to signal
+ * an end-of-file (EOF) or error condition.
+ * - In some UTF-16 receivers, code point U+FFFE might trigger a byte-swap operation
+ * (to convert between UTF-16LE and UTF-16BE).
+ * With such internal use of noncharacters, it may be desirable and safer to block those code points in
+ * UTF-8 decoders, as they should never occur legitimately in incoming UTF-8 data, and could trigger
+ * unsafe behavior in subsequent processing.
+ *
+ * Particularly problematic noncharacters in 16-bit applications: */
{"5.3.1 U+FFFE = ef bf be = \"\xef\xbf\xbe\" |",
"5.3.1 U+FFFE = ef bf be = \"\" |", "\x03"},
{"5.3.2 U+FFFF = ef bf bf = \"\xef\xbf\xbf\" |",
"5.3.2 U+FFFF = ef bf bf = \"\" |", "\x03"},
- /* Fo now, we ignore those, they do not seem to be crucial anyway... */
-// 5.3.3 U+FDD0 .. U+FDEF
-// 5.3.4 U+nFFFE U+nFFFF (for n = 1..10)
+ /* For now, we ignore those, they do not seem to be crucial anyway... */
+/* 5.3.3 U+FDD0 .. U+FDEF
+ * 5.3.4 U+nFFFE U+nFFFF (for n = 1..10) */
{NULL, NULL, NULL},
};
/* clang-format on */
diff --git a/source/blender/blenloader/intern/blend_validate.c b/source/blender/blenloader/intern/blend_validate.c
index 0a5d8d332aa..2848aac2c77 100644
--- a/source/blender/blenloader/intern/blend_validate.c
+++ b/source/blender/blenloader/intern/blend_validate.c
@@ -23,7 +23,7 @@
* \note Does not *fix* anything, only reports found errors.
*/
-#include <string.h> // for strrchr strncmp strstr
+#include <string.h> /* for strrchr strncmp strstr */
#include "BLI_utildefines.h"
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 9465819a2d8..ccf4e08b5b7 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -33,11 +33,11 @@
#include "BLI_utildefines.h"
#ifndef WIN32
-# include <unistd.h> // for read close
+# include <unistd.h> /* for read close */
#else
# include "BLI_winstuff.h"
# include "winsock2.h"
-# include <io.h> // for open close read
+# include <io.h> /* for open close read */
#endif
/* allow readfile to use deprecated functionality */
@@ -126,7 +126,7 @@
#include "BKE_fcurve.h"
#include "BKE_fcurve_driver.h"
#include "BKE_fluid.h"
-#include "BKE_global.h" // for G
+#include "BKE_global.h" /* for G */
#include "BKE_gpencil.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_hair.h"
@@ -138,15 +138,15 @@
#include "BKE_lib_id.h"
#include "BKE_lib_override.h"
#include "BKE_lib_query.h"
-#include "BKE_main.h" // for Main
+#include "BKE_main.h" /* for Main */
#include "BKE_main_idmap.h"
#include "BKE_material.h"
-#include "BKE_mesh.h" // for ME_ defines (patching)
+#include "BKE_mesh.h" /* for ME_ defines (patching) */
#include "BKE_mesh_runtime.h"
#include "BKE_modifier.h"
#include "BKE_multires.h"
#include "BKE_nla.h"
-#include "BKE_node.h" // for tree type defines
+#include "BKE_node.h" /* for tree type defines */
#include "BKE_object.h"
#include "BKE_packedFile.h"
#include "BKE_paint.h"
@@ -1490,7 +1490,7 @@ static ssize_t fd_read_gzip_from_memory(FileData *filedata,
filedata->strm.next_out = (Bytef *)buffer;
filedata->strm.avail_out = (uint)size;
- // Inflate another chunk.
+ /* Inflate another chunk. */
err = inflate(&filedata->strm, Z_SYNC_FLUSH);
if (err == Z_STREAM_END) {
@@ -2490,7 +2490,7 @@ static void direct_link_id_common(
/** \name Read Animation (legacy for version patching)
* \{ */
-// XXX deprecated - old animation system
+/* XXX deprecated - old animation system */
static void lib_link_ipo(BlendLibReader *reader, Ipo *ipo)
{
LISTBASE_FOREACH (IpoCurve *, icu, &ipo->curve) {
@@ -2500,7 +2500,7 @@ static void lib_link_ipo(BlendLibReader *reader, Ipo *ipo)
}
}
-// XXX deprecated - old animation system
+/* XXX deprecated - old animation system */
static void direct_link_ipo(BlendDataReader *reader, Ipo *ipo)
{
BLO_read_list(reader, &(ipo->curve));
@@ -2538,7 +2538,7 @@ static void direct_link_ipo(BlendDataReader *reader, Ipo *ipo)
}
}
-// XXX deprecated - old animation system
+/* XXX deprecated - old animation system */
static void lib_link_nlastrips(BlendLibReader *reader, ID *id, ListBase *striplist)
{
LISTBASE_FOREACH (bActionStrip *, strip, striplist) {
@@ -2551,7 +2551,7 @@ static void lib_link_nlastrips(BlendLibReader *reader, ID *id, ListBase *stripli
}
}
-// XXX deprecated - old animation system
+/* XXX deprecated - old animation system */
static void direct_link_nlastrips(BlendDataReader *reader, ListBase *strips)
{
BLO_read_list(reader, strips);
@@ -2561,7 +2561,7 @@ static void direct_link_nlastrips(BlendDataReader *reader, ListBase *strips)
}
}
-// XXX deprecated - old animation system
+/* XXX deprecated - old animation system */
static void lib_link_constraint_channels(BlendLibReader *reader, ID *id, ListBase *chanbase)
{
LISTBASE_FOREACH (bConstraintChannel *, chan, chanbase) {
@@ -2680,7 +2680,7 @@ static void lib_link_constraints(BlendLibReader *reader, ID *id, ListBase *conli
con->type = CONSTRAINT_TYPE_NULL;
}
/* own ipo, all constraints have it */
- BLO_read_id_address(reader, id->lib, &con->ipo); // XXX deprecated - old animation system
+ BLO_read_id_address(reader, id->lib, &con->ipo); /* XXX deprecated - old animation system */
/* If linking from a library, clear 'local' library override flag. */
if (id->lib != NULL) {
@@ -2829,14 +2829,14 @@ void blo_do_versions_key_uidgen(Key *key)
/* update this also to writefile.c */
static const char *ptcache_data_struct[] = {
- "", // BPHYS_DATA_INDEX
- "", // BPHYS_DATA_LOCATION
- "", // BPHYS_DATA_VELOCITY
- "", // BPHYS_DATA_ROTATION
- "", // BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST */
- "", // BPHYS_DATA_SIZE:
- "", // BPHYS_DATA_TIMES:
- "BoidData", // case BPHYS_DATA_BOIDS:
+ "", /* BPHYS_DATA_INDEX */
+ "", /* BPHYS_DATA_LOCATION */
+ "", /* BPHYS_DATA_VELOCITY */
+ "", /* BPHYS_DATA_ROTATION */
+ "", /* BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST */
+ "", /* BPHYS_DATA_SIZE: */
+ "", /* BPHYS_DATA_TIMES: */
+ "BoidData", /* case BPHYS_DATA_BOIDS: */
};
static void direct_link_pointcache_cb(BlendDataReader *reader, void *data)
@@ -2923,7 +2923,8 @@ static void lib_link_partdeflect(BlendLibReader *reader, ID *id, PartDeflect *pd
static void lib_link_particlesettings(BlendLibReader *reader, ParticleSettings *part)
{
- BLO_read_id_address(reader, part->id.lib, &part->ipo); // XXX deprecated - old animation system
+ BLO_read_id_address(
+ reader, part->id.lib, &part->ipo); /* XXX deprecated - old animation system */
BLO_read_id_address(reader, part->id.lib, &part->instance_object);
BLO_read_id_address(reader, part->id.lib, &part->instance_collection);
@@ -3222,10 +3223,10 @@ static void lib_link_object(BlendLibReader *reader, Object *ob)
{
bool warn = false;
- // XXX deprecated - old animation system <<<
+ /* XXX deprecated - old animation system <<< */
BLO_read_id_address(reader, ob->id.lib, &ob->ipo);
BLO_read_id_address(reader, ob->id.lib, &ob->action);
- // >>> XXX deprecated - old animation system
+ /* >>> XXX deprecated - old animation system */
BLO_read_id_address(reader, ob->id.lib, &ob->parent);
BLO_read_id_address(reader, ob->id.lib, &ob->track);
@@ -3322,10 +3323,10 @@ static void lib_link_object(BlendLibReader *reader, Object *ob)
lib_link_pose(reader, ob, ob->pose);
lib_link_constraints(reader, &ob->id, &ob->constraints);
- // XXX deprecated - old animation system <<<
+ /* XXX deprecated - old animation system <<< */
lib_link_constraint_channels(reader, &ob->id, &ob->constraintChannels);
lib_link_nlastrips(reader, &ob->id, &ob->nlastrips);
- // >>> XXX deprecated - old animation system
+ /* >>> XXX deprecated - old animation system */
LISTBASE_FOREACH (PartEff *, paf, &ob->effect) {
if (paf->type == EFF_PARTICLE) {
@@ -3339,7 +3340,7 @@ static void lib_link_object(BlendLibReader *reader, Object *ob)
if (fluidmd && fluidmd->fss) {
BLO_read_id_address(
- reader, ob->id.lib, &fluidmd->fss->ipo); // XXX deprecated - old animation system
+ reader, ob->id.lib, &fluidmd->fss->ipo); /* XXX deprecated - old animation system */
}
}
@@ -3881,10 +3882,10 @@ static void direct_link_object(BlendDataReader *reader, Object *ob)
BLO_read_list(reader, &ob->defbase);
BLO_read_list(reader, &ob->fmaps);
- // XXX deprecated - old animation system <<<
+ /* XXX deprecated - old animation system <<< */
direct_link_nlastrips(reader, &ob->nlastrips);
BLO_read_list(reader, &ob->constraintChannels);
- // >>> XXX deprecated - old animation system
+ /* >>> XXX deprecated - old animation system */
BLO_read_pointer_array(reader, (void **)&ob->mat);
BLO_read_data_address(reader, &ob->matbits);
@@ -3951,7 +3952,7 @@ static void direct_link_object(BlendDataReader *reader, Object *ob)
if (ob->soft) {
SoftBody *sb = ob->soft;
- sb->bpoint = NULL; // init pointers so it gets rebuilt nicely
+ sb->bpoint = NULL; /* init pointers so it gets rebuilt nicely */
sb->bspring = NULL;
sb->scratch = NULL;
/* although not used anymore */
@@ -4448,7 +4449,7 @@ static void lib_link_scene(BlendLibReader *reader, Scene *sce)
if (seq->ipo) {
BLO_read_id_address(
- reader, sce->id.lib, &seq->ipo); // XXX deprecated - old animation system
+ reader, sce->id.lib, &seq->ipo); /* XXX deprecated - old animation system */
}
seq->scene_sound = NULL;
if (seq->scene) {
@@ -5139,7 +5140,7 @@ static void direct_link_area(BlendDataReader *reader, ScrArea *area)
}
}
/* we only saved what was used */
- space_outliner->storeflag |= SO_TREESTORE_CLEANUP; // at first draw
+ space_outliner->storeflag |= SO_TREESTORE_CLEANUP; /* at first draw */
}
space_outliner->treehash = NULL;
space_outliner->tree.first = space_outliner->tree.last = NULL;
@@ -6895,7 +6896,7 @@ static void link_global(FileData *fd, BlendFileData *bfd)
bfd->cur_view_layer = blo_read_get_new_globaldata_address(fd, bfd->cur_view_layer);
bfd->curscreen = newlibadr(fd, NULL, bfd->curscreen);
bfd->curscene = newlibadr(fd, NULL, bfd->curscene);
- // this happens in files older than 2.35
+ /* this happens in files older than 2.35 */
if (bfd->curscene == NULL) {
if (bfd->curscreen) {
bfd->curscene = bfd->curscreen->scene;
@@ -7197,7 +7198,7 @@ static BHead *read_userdef(BlendFileData *bfd, FileData *fd, BHead *bhead)
IDP_BlendDataRead(reader, &addon->prop);
}
- // XXX
+ /* XXX */
user->uifonts.first = user->uifonts.last = NULL;
BLO_read_list(reader, &user->uistyles);
@@ -7575,7 +7576,7 @@ static void expand_doit_library(void *fdhandle, Main *mainvar, void *old)
/* ID has not been read yet, add placeholder to the main of the
* library it belongs to, so that it will be read later. */
read_libblock(fd, libmain, bhead, LIB_TAG_INDIRECT, false, NULL);
- // commented because this can print way too much
+ /* commented because this can print way too much */
// if (G.debug & G_DEBUG) printf("expand_doit: other lib %s\n", lib->filepath);
/* for outliner dependency only */
@@ -7642,7 +7643,7 @@ static void expand_doit_library(void *fdhandle, Main *mainvar, void *old)
* and another append happens which invokes same ID...
* in that case the lookup table needs this entry */
oldnewmap_insert(fd->libmap, bhead->old, id, bhead->code);
- // commented because this can print way too much
+ /* commented because this can print way too much */
// if (G.debug & G_DEBUG) printf("expand: already read %s\n", id->name);
}
}
@@ -7660,7 +7661,7 @@ static void expand_ipo(BlendExpander *expander, Ipo *ipo)
}
}
-// XXX deprecated - old animation system
+/* XXX deprecated - old animation system */
static void expand_constraint_channels(BlendExpander *expander, ListBase *chanbase)
{
LISTBASE_FOREACH (bConstraintChannel *, chan, chanbase) {
@@ -7788,7 +7789,7 @@ static void expand_constraints(BlendExpander *expander, ListBase *lb)
/* deprecated manual expansion stuff */
LISTBASE_FOREACH (bConstraint *, curcon, lb) {
if (curcon->ipo) {
- BLO_expand(expander, curcon->ipo); // XXX deprecated - old animation system
+ BLO_expand(expander, curcon->ipo); /* XXX deprecated - old animation system */
}
}
}
@@ -7840,7 +7841,7 @@ static void expand_object(BlendExpander *expander, Object *ob)
BLO_expand(expander, ob->gpd);
- // XXX deprecated - old animation system (for version patching only)
+ /* XXX deprecated - old animation system (for version patching only) */
BLO_expand(expander, ob->ipo);
BLO_expand(expander, ob->action);
@@ -7851,7 +7852,7 @@ static void expand_object(BlendExpander *expander, Object *ob)
BLO_expand(expander, strip->act);
BLO_expand(expander, strip->ipo);
}
- // XXX deprecated - old animation system (for version patching only)
+ /* XXX deprecated - old animation system (for version patching only) */
for (int a = 0; a < ob->totcol; a++) {
BLO_expand(expander, ob->mat[a]);
@@ -8075,7 +8076,7 @@ void BLO_expand_main(void *fdhandle, Main *mainvar)
expand_collection(&expander, (Collection *)id);
break;
case ID_IP:
- expand_ipo(&expander, (Ipo *)id); // XXX deprecated - old animation system
+ expand_ipo(&expander, (Ipo *)id); /* XXX deprecated - old animation system */
break;
case ID_PA:
expand_particlesettings(&expander, (ParticleSettings *)id);
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index dad86f80813..b1a76c65ce9 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -23,7 +23,7 @@
#else
# include "BLI_winstuff.h"
# include "winsock2.h"
-# include <io.h> // for open close read
+# include <io.h> /* for open close read */
# include <zlib.h> /* odd include order-issue */
#endif
@@ -65,7 +65,7 @@
#include "BKE_anim_visualization.h"
#include "BKE_armature.h"
#include "BKE_colortools.h"
-#include "BKE_global.h" // for G
+#include "BKE_global.h" /* for G */
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
@@ -113,7 +113,7 @@ static void area_add_header_region(ScrArea *area, ListBase *lb)
static void sequencer_init_preview_region(ARegion *region)
{
- // XXX a bit ugly still, copied from space_sequencer
+ /* XXX a bit ugly still, copied from space_sequencer */
/* NOTE: if you change values here, also change them in space_sequencer.c, sequencer_new */
region->regiontype = RGN_TYPE_PREVIEW;
region->alignment = RGN_ALIGN_TOP;
diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c
index 3abac65a4df..d8a19bfa59e 100644
--- a/source/blender/blenloader/intern/versioning_260.c
+++ b/source/blender/blenloader/intern/versioning_260.c
@@ -54,15 +54,15 @@
#include "BKE_anim_visualization.h"
#include "BKE_image.h"
-#include "BKE_main.h" // for Main
-#include "BKE_mesh.h" // for ME_ defines (patching)
+#include "BKE_main.h" /* for Main */
+#include "BKE_mesh.h" /* for ME_ defines (patching) */
#include "BKE_modifier.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "BKE_sequencer.h"
-#include "BKE_text.h" // for txt_extended_ascii_as_utf8
+#include "BKE_text.h" /* for txt_extended_ascii_as_utf8 */
#include "BKE_texture.h"
#include "BKE_tracking.h"
@@ -70,7 +70,7 @@
# include "BKE_writeffmpeg.h"
#endif
-#include "IMB_imbuf.h" // for proxy / timecode versioning stuff
+#include "IMB_imbuf.h" /* for proxy / timecode versioning stuff */
#include "NOD_common.h"
#include "NOD_texture.h"
@@ -1343,7 +1343,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (bmain->versionfile < 263 || (bmain->versionfile == 263 && bmain->subversionfile < 10)) {
{
Scene *scene;
- // composite redesign
+ /* composite redesign */
for (scene = bmain->scenes.first; scene; scene = scene->id.next) {
if (scene->nodetree) {
if (scene->nodetree->chunksize == 0) {
@@ -1921,7 +1921,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
- // add storage for compositor translate nodes when not existing
+ /* add storage for compositor translate nodes when not existing */
if (MAIN_VERSION_OLDER(bmain, 265, 11)) {
FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
if (ntree->type == NTREE_COMPOSIT) {
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index ec0ea79811c..dc945038933 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -978,7 +978,7 @@ static void do_version_curvemapping_walker(Main *bmain, void (*callback)(CurveMa
}
}
- // toolsettings
+ /* toolsettings */
ToolSettings *ts = scene->toolsettings;
if (ts->vpaint) {
callback(ts->vpaint->paint.cavity_curve);
@@ -2988,9 +2988,9 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
/* gpencil grid settings */
for (bGPdata *gpd = bmain->gpencils.first; gpd; gpd = gpd->id.next) {
- ARRAY_SET_ITEMS(gpd->grid.color, 0.5f, 0.5f, 0.5f); // Color
- ARRAY_SET_ITEMS(gpd->grid.scale, 1.0f, 1.0f); // Scale
- gpd->grid.lines = GP_DEFAULT_GRID_LINES; // Number of lines
+ ARRAY_SET_ITEMS(gpd->grid.color, 0.5f, 0.5f, 0.5f); /* Color */
+ ARRAY_SET_ITEMS(gpd->grid.scale, 1.0f, 1.0f); /* Scale */
+ gpd->grid.lines = GP_DEFAULT_GRID_LINES; /* Number of lines */
}
}
diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c
index 58d57f12b8f..b8d9b92a75d 100644
--- a/source/blender/blenloader/intern/versioning_legacy.c
+++ b/source/blender/blenloader/intern/versioning_legacy.c
@@ -24,11 +24,11 @@
#include <limits.h>
#ifndef WIN32
-# include <unistd.h> // for read close
+# include <unistd.h> /* for read close */
#else
# include "BLI_winstuff.h"
# include "winsock2.h"
-# include <io.h> // for open close read
+# include <io.h> /* for open close read */
# include <zlib.h> /* odd include order-issue */
#endif
@@ -72,8 +72,8 @@
#include "BKE_deform.h"
#include "BKE_fcurve.h"
#include "BKE_lattice.h"
-#include "BKE_main.h" // for Main
-#include "BKE_mesh.h" // for ME_ defines (patching)
+#include "BKE_main.h" /* for Main */
+#include "BKE_mesh.h" /* for ME_ defines (patching) */
#include "BKE_modifier.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
@@ -886,7 +886,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
}
for (sce = bmain->scenes.first; sce; sce = sce->id.next) {
- sce->r.stereomode = 1; // no stereo
+ sce->r.stereomode = 1; /* no stereo */
}
/* some oldfile patch, moved from set_func_space */
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 74a4ddfd8f3..a37ec2d9f0a 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -125,7 +125,7 @@
#include "BLI_bitmap.h"
#include "BLI_blenlib.h"
#include "BLI_mempool.h"
-#include "MEM_guardedalloc.h" // MEM_freeN
+#include "MEM_guardedalloc.h" /* MEM_freeN */
#include "BKE_action.h"
#include "BKE_anim_data.h"
@@ -140,7 +140,7 @@
#include "BKE_deform.h"
#include "BKE_fcurve.h"
#include "BKE_fcurve_driver.h"
-#include "BKE_global.h" // for G
+#include "BKE_global.h" /* for G */
#include "BKE_gpencil_modifier.h"
#include "BKE_icons.h"
#include "BKE_idprop.h"
diff --git a/source/blender/bmesh/operators/bmo_edgenet.c b/source/blender/bmesh/operators/bmo_edgenet.c
index 3ce84dff921..0f6ef1cb019 100644
--- a/source/blender/bmesh/operators/bmo_edgenet.c
+++ b/source/blender/bmesh/operators/bmo_edgenet.c
@@ -52,7 +52,7 @@ void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op)
BMO_slot_buffer_hflag_enable(bm, op->slots_in, "edges", BM_EDGE, BM_ELEM_TAG, false);
BM_mesh_elem_hflag_disable_all(bm, BM_FACE, BM_ELEM_TAG, false);
- BM_mesh_edgenet(bm, true, true); // TODO, sides
+ BM_mesh_edgenet(bm, true, true); /* TODO, sides */
BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "faces.out", BM_FACE, BM_ELEM_TAG);
diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c
index 371d8d59d6c..a47de4390a7 100644
--- a/source/blender/bmesh/tools/bmesh_intersect.c
+++ b/source/blender/bmesh/tools/bmesh_intersect.c
@@ -681,7 +681,7 @@ static void bm_isect_tri_tri(
copy_v3_v3(t_scale[2], fv_b[2]->co);
tri_v3_scale(UNPACK3(t_scale), 1.0f - s->epsilon.eps2x);
- // second check for verts intersecting the triangle
+ /* second check for verts intersecting the triangle */
for (i_a = 0; i_a < 3; i_a++) {
if (BM_ELEM_API_FLAG_TEST(fv_a[i_a], VERT_VISIT_A)) {
continue;
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
index 08f794d7eba..ad980177ae5 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
@@ -116,7 +116,7 @@ bool ExecutionGroup::addOperation(NodeOperation *operation)
NodeOperation *ExecutionGroup::getOutputOperation() const
{
return this
- ->m_operations[0]; // the first operation of the group is always the output operation.
+ ->m_operations[0]; /* the first operation of the group is always the output operation. */
}
void ExecutionGroup::initExecution()
diff --git a/source/blender/compositor/nodes/COM_AlphaOverNode.cpp b/source/blender/compositor/nodes/COM_AlphaOverNode.cpp
index e5764c5bb73..640fbf49808 100644
--- a/source/blender/compositor/nodes/COM_AlphaOverNode.cpp
+++ b/source/blender/compositor/nodes/COM_AlphaOverNode.cpp
@@ -24,7 +24,7 @@
#include "COM_MixOperation.h"
#include "COM_SetValueOperation.h"
-#include "DNA_material_types.h" // the ramp types
+#include "DNA_material_types.h" /* the ramp types */
void AlphaOverNode::convertToOperations(NodeConverter &converter,
const CompositorContext & /*context*/) const
diff --git a/source/blender/compositor/nodes/COM_MixNode.cpp b/source/blender/compositor/nodes/COM_MixNode.cpp
index b3bcefaccb5..d082590d21b 100644
--- a/source/blender/compositor/nodes/COM_MixNode.cpp
+++ b/source/blender/compositor/nodes/COM_MixNode.cpp
@@ -22,7 +22,7 @@
#include "COM_ExecutionSystem.h"
#include "COM_SetValueOperation.h"
-#include "DNA_material_types.h" // the ramp types
+#include "DNA_material_types.h" /* the ramp types */
MixNode::MixNode(bNode *editorNode) : Node(editorNode)
{
diff --git a/source/blender/compositor/nodes/COM_ZCombineNode.cpp b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
index b30a603bcee..df201289ca4 100644
--- a/source/blender/compositor/nodes/COM_ZCombineNode.cpp
+++ b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
@@ -26,7 +26,7 @@
#include "COM_MixOperation.h"
#include "COM_SetValueOperation.h"
-#include "DNA_material_types.h" // the ramp types
+#include "DNA_material_types.h" /* the ramp types */
void ZCombineNode::convertToOperations(NodeConverter &converter,
const CompositorContext &context) const
diff --git a/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc b/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc
index 98a2d09c352..42c1fcba1bb 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc
+++ b/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc
@@ -66,8 +66,8 @@ void deg_debug_fprintf(const DebugContext &ctx, const char *fmt, ...)
inline double get_node_time(const DebugContext & /*ctx*/, const Node *node)
{
- // TODO(sergey): Figure out a nice way to define which exact time
- // we want to show.
+ /* TODO(sergey): Figure out a nice way to define which exact time
+ * we want to show. */
return node->stats.current_time;
}
@@ -97,7 +97,7 @@ string gnuplotify_name(const string &name)
void write_stats_data(const DebugContext &ctx)
{
- // Fill in array of all stats which are to be displayed.
+ /* Fill in array of all stats which are to be displayed. */
Vector<StatsEntry> stats;
stats.reserve(ctx.graph->id_nodes.size());
for (const IDNode *id_node : ctx.graph->id_nodes) {
@@ -110,12 +110,12 @@ void write_stats_data(const DebugContext &ctx)
entry.time = time;
stats.append(entry);
}
- // Sort the data.
+ /* Sort the data. */
std::sort(stats.begin(), stats.end(), stat_entry_comparator);
- // We limit number of entries, otherwise things become unreadable.
+ /* We limit number of entries, otherwise things become unreadable. */
stats.resize(min_ii(stats.size(), 32));
std::reverse(stats.begin(), stats.end());
- // Print data to the file stream.
+ /* Print data to the file stream. */
deg_debug_fprintf(ctx, "$data << EOD" NL);
for (const StatsEntry &entry : stats) {
deg_debug_fprintf(ctx,
@@ -129,14 +129,14 @@ void write_stats_data(const DebugContext &ctx)
void deg_debug_stats_gnuplot(const DebugContext &ctx)
{
- // Data itself.
+ /* Data itself. */
write_stats_data(ctx);
- // Optional label.
+ /* Optional label. */
if (ctx.label && ctx.label[0]) {
deg_debug_fprintf(ctx, "set title \"%s\"" NL, ctx.label);
}
- // Rest of the commands.
- // TODO(sergey): Need to decide on the resolution somehow.
+ /* Rest of the commands.
+ * TODO(sergey): Need to decide on the resolution somehow. */
deg_debug_fprintf(ctx, "set terminal pngcairo size 1920,1080" NL);
deg_debug_fprintf(ctx, "set output \"%s\"" NL, ctx.output_filename);
deg_debug_fprintf(ctx, "set grid" NL);
diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc
index fc9ed9a6ab9..d0eedd6d811 100644
--- a/source/blender/depsgraph/intern/depsgraph_query.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query.cc
@@ -25,12 +25,12 @@
#include "MEM_guardedalloc.h"
-#include <string.h> // XXX: memcpy
+#include <string.h> /* XXX: memcpy */
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
-#include "BKE_action.h" // XXX: BKE_pose_channel_find_name
+#include "BKE_action.h" /* XXX: BKE_pose_channel_find_name */
#include "BKE_customdata.h"
#include "BKE_idtype.h"
#include "BKE_main.h"
diff --git a/source/blender/depsgraph/intern/depsgraph_type.cc b/source/blender/depsgraph/intern/depsgraph_type.cc
index 25e9a4643b3..07664cb4f0b 100644
--- a/source/blender/depsgraph/intern/depsgraph_type.cc
+++ b/source/blender/depsgraph/intern/depsgraph_type.cc
@@ -23,7 +23,7 @@
* Defines and code for core node types.
*/
-#include <cstdlib> // for BLI_assert()
+#include <cstdlib> /* for BLI_assert() */
#include "BLI_utildefines.h"
diff --git a/source/blender/depsgraph/intern/node/deg_node_operation.h b/source/blender/depsgraph/intern/node/deg_node_operation.h
index 52b6c9a753b..40369de08f5 100644
--- a/source/blender/depsgraph/intern/node/deg_node_operation.h
+++ b/source/blender/depsgraph/intern/node/deg_node_operation.h
@@ -35,7 +35,7 @@ namespace deg {
struct ComponentNode;
/* Evaluation Operation for atomic operation */
-// XXX: move this to another header that can be exposed?
+/* XXX: move this to another header that can be exposed? */
typedef function<void(struct ::Depsgraph *)> DepsEvalOperationCb;
/* Identifiers for common operations (as an enum). */
@@ -143,7 +143,7 @@ enum class OperationCode {
*
* - "DONE" This noop is used to signal that the bone's final pose
* transform can be read by others. */
- // TODO: deform mats could get calculated in the final_transform ops...
+ /* TODO: deform mats could get calculated in the final_transform ops... */
BONE_READY,
BONE_DONE,
/* B-Bone segment shape computation (after DONE) */
diff --git a/source/blender/draw/engines/overlay/shaders/edit_uv_verts_frag.glsl b/source/blender/draw/engines/overlay/shaders/edit_uv_verts_frag.glsl
index 11694de38ca..1d936e4e072 100644
--- a/source/blender/draw/engines/overlay/shaders/edit_uv_verts_frag.glsl
+++ b/source/blender/draw/engines/overlay/shaders/edit_uv_verts_frag.glsl
@@ -9,17 +9,17 @@ void main()
{
float dist = length(gl_PointCoord - vec2(0.5));
- // transparent outside of point
- // --- 0 ---
- // smooth transition
- // --- 1 ---
- // pure outline color
- // --- 2 ---
- // smooth transition
- // --- 3 ---
- // pure fill color
- // ...
- // dist = 0 at center of point
+ /* transparent outside of point
+ * --- 0 ---
+ * smooth transition
+ * --- 1 ---
+ * pure outline color
+ * --- 2 ---
+ * smooth transition
+ * --- 3 ---
+ * pure fill color
+ * ...
+ * dist = 0 at center of point */
float midStroke = 0.5 * (radii[1] + radii[2]);
diff --git a/source/blender/draw/engines/overlay/shaders/edit_uv_verts_vert.glsl b/source/blender/draw/engines/overlay/shaders/edit_uv_verts_vert.glsl
index eb8f380072f..9e9df82a77d 100644
--- a/source/blender/draw/engines/overlay/shaders/edit_uv_verts_vert.glsl
+++ b/source/blender/draw/engines/overlay/shaders/edit_uv_verts_vert.glsl
@@ -30,15 +30,15 @@ void main()
gl_Position = vec4(point_world_to_ndc(world_pos).xy, depth, 1.0);
gl_PointSize = pointSize;
- // calculate concentric radii in pixels
+ /* calculate concentric radii in pixels */
float radius = 0.5 * pointSize;
- // start at the outside and progress toward the center
+ /* start at the outside and progress toward the center */
radii[0] = radius;
radii[1] = radius - 1.0;
radii[2] = radius - outlineWidth;
radii[3] = radius - outlineWidth - 1.0;
- // convert to PointCoord units
+ /* convert to PointCoord units */
radii /= pointSize;
}
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl
index 0d67ba2b9e4..102a8ddca7b 100644
--- a/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl
+++ b/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl
@@ -342,23 +342,23 @@ void main()
# define mnmx3(a, b, c) \
mx3(a, b, c); \
- s2(a, b); // 3 exchanges
+ s2(a, b); /* 3 exchanges */
# define mnmx4(a, b, c, d) \
s2(a, b); \
s2(c, d); \
s2(a, c); \
- s2(b, d); // 4 exchanges
+ s2(b, d); /* 4 exchanges */
# define mnmx5(a, b, c, d, e) \
s2(a, b); \
s2(c, d); \
mn3(a, c, e); \
- mx3(b, d, e); // 6 exchanges
+ mx3(b, d, e); /* 6 exchanges */
# define mnmx6(a, b, c, d, e, f) \
s2(a, d); \
s2(b, e); \
s2(c, f); \
mn3(a, b, c); \
- mx3(d, e, f); // 7 exchanges
+ mx3(d, e, f); /* 7 exchanges */
vec v[9];
diff --git a/source/blender/draw/intern/shaders/common_fxaa_lib.glsl b/source/blender/draw/intern/shaders/common_fxaa_lib.glsl
index 9eaba00988d..69af2d09af4 100644
--- a/source/blender/draw/intern/shaders/common_fxaa_lib.glsl
+++ b/source/blender/draw/intern/shaders/common_fxaa_lib.glsl
@@ -1,36 +1,36 @@
-//----------------------------------------------------------------------------------
-// File: es3-kepler\FXAA/FXAA3_11.h
-// SDK Version: v3.00
-// Email: gameworks@nvidia.com
-// Site: http://developer.nvidia.com/
-//
-// Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-// * Neither the name of NVIDIA CORPORATION nor the names of its
-// contributors may be used to endorse or promote products derived
-// from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
-// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-//----------------------------------------------------------------------------------
+/* ---------------------------------------------------------------------------------
+ * File: es3-kepler\FXAA/FXAA3_11.h
+ * SDK Version: v3.00
+ * Email: gameworks@nvidia.com
+ * Site: http://developer.nvidia.com/
+ *
+ * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of NVIDIA CORPORATION nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * --------------------------------------------------------------------------------- */
/* BLENDER MODIFICATIONS:
*
@@ -54,26 +54,26 @@
NOTE the other tuning knobs are now in the shader function inputs!
============================================================================*/
#ifndef FXAA_QUALITY__PRESET
-//
-// Choose the quality preset.
-// This needs to be compiled into the shader as it effects code.
-// Best option to include multiple presets is to
-// in each shader define the preset, then include this file.
-//
-// OPTIONS
-// -----------------------------------------------------------------------
-// 10 to 15 - default medium dither (10=fastest, 15=highest quality)
-// 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)
-// 39 - no dither, very expensive
-//
-// NOTES
-// -----------------------------------------------------------------------
-// 12 = slightly faster then FXAA 3.9 and higher edge quality (default)
-// 13 = about same speed as FXAA 3.9 and better than 12
-// 23 = closest to FXAA 3.9 visually and performance wise
-// _ = the lowest digit is directly related to performance
-// _ = the highest digit is directly related to style
-//
+/*
+ * Choose the quality preset.
+ * This needs to be compiled into the shader as it effects code.
+ * Best option to include multiple presets is to
+ * in each shader define the preset, then include this file.
+ *
+ * OPTIONS
+ * -----------------------------------------------------------------------
+ * 10 to 15 - default medium dither (10=fastest, 15=highest quality)
+ * 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)
+ * 39 - no dither, very expensive
+ *
+ * NOTES
+ * -----------------------------------------------------------------------
+ * 12 = slightly faster then FXAA 3.9 and higher edge quality (default)
+ * 13 = about same speed as FXAA 3.9 and better than 12
+ * 23 = closest to FXAA 3.9 visually and performance wise
+ * _ = the lowest digit is directly related to performance
+ * _ = the highest digit is directly related to style
+ */
# define FXAA_QUALITY__PRESET 12
#endif
@@ -296,9 +296,9 @@ NOTE the other tuning knobs are now in the shader function inputs!
/* (#B1#) */
float FxaaLuma(vec4 rgba)
{
- // note: sqrt because the sampled colors are in a linear colorspace!
- // this approximates a perceptual conversion, which is good enough for the
- // algorithm
+ /* note: sqrt because the sampled colors are in a linear colorspace!
+ * this approximates a perceptual conversion, which is good enough for the
+ * algorithm */
return sqrt(dot(rgba.rgb, vec3(0.2126, 0.7152, 0.0722)));
}
@@ -311,51 +311,51 @@ float FxaaLuma(vec4 rgba)
============================================================================*/
/*--------------------------------------------------------------------------*/
vec4 FxaaPixelShader(
- //
- // Use noperspective interpolation here (turn off perspective interpolation).
- // {xy} = center of pixel
+ /*
+ * Use noperspective interpolation here (turn off perspective interpolation).
+ * {xy} = center of pixel */
vec2 pos,
- //
- // Input color texture.
- // {rgb_} = color in linear or perceptual color space
+ /*
+ * Input color texture.
+ * {rgb_} = color in linear or perceptual color space */
sampler2D tex,
- //
- // Only used on FXAA Quality.
- // This must be from a constant/uniform.
- // {x_} = 1.0/screenWidthInPixels
- // {_y} = 1.0/screenHeightInPixels
+ /*
+ * Only used on FXAA Quality.
+ * This must be from a constant/uniform.
+ * {x_} = 1.0/screenWidthInPixels
+ * {_y} = 1.0/screenHeightInPixels */
vec2 fxaaQualityRcpFrame,
- //
- // Only used on FXAA Quality.
- // This used to be the FXAA_QUALITY__SUBPIX define.
- // It is here now to allow easier tuning.
- // Choose the amount of sub-pixel aliasing removal.
- // This can effect sharpness.
- // 1.00 - upper limit (softer)
- // 0.75 - default amount of filtering
- // 0.50 - lower limit (sharper, less sub-pixel aliasing removal)
- // 0.25 - almost off
- // 0.00 - completely off
+ /*
+ * Only used on FXAA Quality.
+ * This used to be the FXAA_QUALITY__SUBPIX define.
+ * It is here now to allow easier tuning.
+ * Choose the amount of sub-pixel aliasing removal.
+ * This can effect sharpness.
+ * 1.00 - upper limit (softer)
+ * 0.75 - default amount of filtering
+ * 0.50 - lower limit (sharper, less sub-pixel aliasing removal)
+ * 0.25 - almost off
+ * 0.00 - completely off */
float fxaaQualitySubpix,
- //
- // Only used on FXAA Quality.
- // This used to be the FXAA_QUALITY__EDGE_THRESHOLD define.
- // It is here now to allow easier tuning.
- // The minimum amount of local contrast required to apply algorithm.
- // 0.333 - too little (faster)
- // 0.250 - low quality
- // 0.166 - default
- // 0.125 - high quality
- // 0.063 - overkill (slower)
+ /*
+ * Only used on FXAA Quality.
+ * This used to be the FXAA_QUALITY__EDGE_THRESHOLD define.
+ * It is here now to allow easier tuning.
+ * The minimum amount of local contrast required to apply algorithm.
+ * 0.333 - too little (faster)
+ * 0.250 - low quality
+ * 0.166 - default
+ * 0.125 - high quality
+ * 0.063 - overkill (slower) */
float fxaaQualityEdgeThreshold,
- //
- // Only used on FXAA Quality.
- // This used to be the FXAA_QUALITY__EDGE_THRESHOLD_MIN define.
- // It is here now to allow easier tuning.
- // Trims the algorithm from processing darks.
- // 0.0833 - upper limit (default, the start of visible unfiltered edges)
- // 0.0625 - high quality (faster)
- // 0.0312 - visible limit (slower)
+ /*
+ * Only used on FXAA Quality.
+ * This used to be the FXAA_QUALITY__EDGE_THRESHOLD_MIN define.
+ * It is here now to allow easier tuning.
+ * Trims the algorithm from processing darks.
+ * 0.0833 - upper limit (default, the start of visible unfiltered edges)
+ * 0.0625 - high quality (faster)
+ * 0.0312 - visible limit (slower) */
float fxaaQualityEdgeThresholdMin)
{
/*--------------------------------------------------------------------------*/
@@ -363,7 +363,7 @@ vec4 FxaaPixelShader(
posM.x = pos.x;
posM.y = pos.y;
vec4 rgbyM = FxaaTexTop(tex, posM);
- float lumaM = FxaaLuma(rgbyM); // (#B4#)
+ float lumaM = FxaaLuma(rgbyM); /* (#B4#) */
float lumaS = FxaaLuma(FxaaTexOff(tex, posM, ivec2(0, 1), fxaaQualityRcpFrame.xy));
float lumaE = FxaaLuma(FxaaTexOff(tex, posM, ivec2(1, 0), fxaaQualityRcpFrame.xy));
float lumaN = FxaaLuma(FxaaTexOff(tex, posM, ivec2(0, -1), fxaaQualityRcpFrame.xy));
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 9f56bfd8d40..a9786f28ad5 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -85,7 +85,7 @@
#include "WM_types.h"
/* *********************************************** */
-// XXX constant defines to be moved elsewhere?
+/* XXX constant defines to be moved elsewhere? */
/* extra padding for lengths (to go under scrollers) */
#define EXTRA_SCROLL_PAD 100.0f
@@ -288,7 +288,7 @@ static short acf_generic_indention_1(bAnimContext *UNUSED(ac), bAnimListElem *UN
{
return 1;
}
-#if 0 // XXX not used
+#if 0 /* XXX not used */
static short acf_generic_indention_2(bAnimContext *ac, bAnimListElem *ale)
{
return 2;
@@ -304,7 +304,7 @@ static short acf_generic_indention_flexible(bAnimContext *UNUSED(ac), bAnimListE
if (ale->type == ANIMTYPE_FCURVE) {
FCurve *fcu = (FCurve *)ale->data;
- // TODO: we need some way of specifying that the indention color should be one less...
+ /* TODO: we need some way of specifying that the indention color should be one less. */
if (fcu->grp) {
indent++;
}
@@ -562,7 +562,7 @@ static bAnimChannelType ACF_SUMMARY = {
/* Scene ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_scene_icon(bAnimListElem *UNUSED(ale))
{
return ICON_SCENE_DATA;
@@ -810,8 +810,8 @@ static void *acf_object_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings se
case ACHANNEL_SETTING_SELECT: /* selected */
return GET_ACF_FLAG_PTR(base->flag, type);
- case ACHANNEL_SETTING_EXPAND: /* expanded */
- return GET_ACF_FLAG_PTR(ob->nlaflag, type); // xxx
+ case ACHANNEL_SETTING_EXPAND: /* expanded */
+ return GET_ACF_FLAG_PTR(ob->nlaflag, type); /* XXX */
case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
@@ -1062,7 +1062,7 @@ static bool acf_fcurve_setting_valid(bAnimContext *ac,
return true;
}
else {
- return false; // NOTE: in this special case, we need to draw ICON_ZOOMOUT
+ return false; /* NOTE: in this special case, we need to draw ICON_ZOOMOUT */
}
case ACHANNEL_SETTING_VISIBLE: /* Only available in Graph Editor */
@@ -1126,7 +1126,7 @@ static bAnimChannelType ACF_FCURVE = {
acf_generic_channel_color, /* backdrop color */
acf_generic_channel_backdrop, /* backdrop */
acf_generic_indention_flexible,
- /* indent level */ // xxx rename this to f-curves only?
+ /* indent level */ /* XXX rename this to f-curves only? */
acf_generic_group_offset, /* offset */
acf_fcurve_name, /* name */
@@ -1145,7 +1145,7 @@ static void acf_nla_controls_color(bAnimContext *UNUSED(ac),
bAnimListElem *UNUSED(ale),
float r_color[3])
{
- // TODO: give this its own theme setting?
+ /* TODO: give this its own theme setting? */
UI_GetThemeColorShade3fv(TH_GROUP, 55, r_color);
}
@@ -1187,7 +1187,7 @@ static bool acf_nla_controls_setting_valid(bAnimContext *UNUSED(ac),
case ACHANNEL_SETTING_EXPAND:
return true;
- // TODO: selected?
+ /* TODO: selected? */
default: /* unsupported */
return false;
@@ -1290,7 +1290,7 @@ static bAnimChannelType ACF_NLACURVE = {
/* Object Action Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_fillactd_icon(bAnimListElem *UNUSED(ale))
{
return ICON_ACTION;
@@ -1380,7 +1380,7 @@ static bAnimChannelType ACF_FILLACTD = {
/* Drivers Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_filldrivers_icon(bAnimListElem *UNUSED(ale))
{
return ICON_DRIVER;
@@ -1392,7 +1392,7 @@ static void acf_filldrivers_name(bAnimListElem *UNUSED(ale), char *name)
}
/* check if some setting exists for this channel */
-// TODO: this could be made more generic
+/* TODO: this could be made more generic */
static bool acf_filldrivers_setting_valid(bAnimContext *UNUSED(ac),
bAnimListElem *UNUSED(ale),
eAnimChannel_Settings setting)
@@ -1465,7 +1465,7 @@ static bAnimChannelType ACF_FILLDRIVERS = {
/* Material Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dsmat_icon(bAnimListElem *UNUSED(ale))
{
return ICON_MATERIAL_DATA;
@@ -1544,7 +1544,7 @@ static bAnimChannelType ACF_DSMAT = {
/* Light Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dslight_icon(bAnimListElem *UNUSED(ale))
{
return ICON_LIGHT_DATA;
@@ -1625,17 +1625,17 @@ static bAnimChannelType ACF_DSLIGHT = {
/* Texture Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dstex_icon(bAnimListElem *UNUSED(ale))
{
return ICON_TEXTURE_DATA;
}
/* offset for texture expanders */
-// FIXME: soon to be obsolete?
+/* FIXME: soon to be obsolete? */
static short acf_dstex_offset(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale))
{
- return 14; // XXX: simply include this in indention instead?
+ return 14; /* XXX: simply include this in indention instead? */
}
/* get the appropriate flag(s) for the setting when it is valid */
@@ -1711,7 +1711,7 @@ static bAnimChannelType ACF_DSTEX = {
/* Camera Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dscachefile_icon(bAnimListElem *ale)
{
UNUSED_VARS(ale);
@@ -1794,7 +1794,7 @@ static bAnimChannelType ACF_DSCACHEFILE = {
/* Camera Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dscam_icon(bAnimListElem *UNUSED(ale))
{
return ICON_CAMERA_DATA;
@@ -1877,7 +1877,7 @@ static bAnimChannelType ACF_DSCAM = {
/* Curve Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dscur_icon(bAnimListElem *ale)
{
Curve *cu = (Curve *)ale->data;
@@ -1966,7 +1966,7 @@ static bAnimChannelType ACF_DSCUR = {
/* Shape Key Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dsskey_icon(bAnimListElem *UNUSED(ale))
{
return ICON_SHAPEKEY_DATA;
@@ -2064,7 +2064,7 @@ static bAnimChannelType ACF_DSSKEY = {
/* World Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dswor_icon(bAnimListElem *UNUSED(ale))
{
return ICON_WORLD_DATA;
@@ -2143,7 +2143,7 @@ static bAnimChannelType ACF_DSWOR = {
/* Particle Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dspart_icon(bAnimListElem *UNUSED(ale))
{
return ICON_PARTICLE_DATA;
@@ -2222,7 +2222,7 @@ static bAnimChannelType ACF_DSPART = {
/* MetaBall Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dsmball_icon(bAnimListElem *UNUSED(ale))
{
return ICON_META_DATA;
@@ -2303,7 +2303,7 @@ static bAnimChannelType ACF_DSMBALL = {
/* Armature Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dsarm_icon(bAnimListElem *UNUSED(ale))
{
return ICON_ARMATURE_DATA;
@@ -2382,7 +2382,7 @@ static bAnimChannelType ACF_DSARM = {
/* NodeTree Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dsntree_icon(bAnimListElem *UNUSED(ale))
{
return ICON_NODETREE;
@@ -2555,7 +2555,7 @@ static bAnimChannelType ACF_DSLINESTYLE = {
/* Mesh Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dsmesh_icon(bAnimListElem *UNUSED(ale))
{
return ICON_MESH_DATA;
@@ -2621,7 +2621,7 @@ static bAnimChannelType ACF_DSMESH = {
acf_generic_dataexpand_color, /* backdrop color */
acf_generic_dataexpand_backdrop, /* backdrop */
acf_generic_indention_1,
- /* indent level */ // XXX this only works for compositing
+ /* indent level */ /* XXX this only works for compositing */
acf_generic_basic_offset, /* offset */
acf_generic_idblock_name, /* name */
@@ -2635,7 +2635,7 @@ static bAnimChannelType ACF_DSMESH = {
/* Lattice Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dslat_icon(bAnimListElem *UNUSED(ale))
{
return ICON_LATTICE_DATA;
@@ -2701,7 +2701,7 @@ static bAnimChannelType ACF_DSLAT = {
acf_generic_dataexpand_color, /* backdrop color */
acf_generic_dataexpand_backdrop, /* backdrop */
acf_generic_indention_1,
- /* indent level */ // XXX this only works for compositing
+ /* indent level */ /* XXX this only works for compositing */
acf_generic_basic_offset, /* offset */
acf_generic_idblock_name, /* name */
@@ -2715,7 +2715,7 @@ static bAnimChannelType ACF_DSLAT = {
/* Speaker Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dsspk_icon(bAnimListElem *UNUSED(ale))
{
return ICON_SPEAKER;
@@ -2794,7 +2794,7 @@ static bAnimChannelType ACF_DSSPK = {
/* Hair Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dshair_icon(bAnimListElem *UNUSED(ale))
{
return ICON_HAIR_DATA;
@@ -2873,7 +2873,7 @@ static bAnimChannelType ACF_DSHAIR = {
/* PointCloud Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dspointcloud_icon(bAnimListElem *UNUSED(ale))
{
return ICON_POINTCLOUD_DATA;
@@ -2954,7 +2954,7 @@ static bAnimChannelType ACF_DSPOINTCLOUD = {
/* Volume Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dsvolume_icon(bAnimListElem *UNUSED(ale))
{
return ICON_VOLUME_DATA;
@@ -3113,7 +3113,7 @@ static bAnimChannelType ACF_DSSIMULATION = {
/* GPencil Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dsgpencil_icon(bAnimListElem *UNUSED(ale))
{
return ICON_GREASEPENCIL;
@@ -3194,7 +3194,7 @@ static bAnimChannelType ACF_DSGPENCIL = {
/* World Expander ------------------------------------------- */
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_dsmclip_icon(bAnimListElem *UNUSED(ale))
{
return ICON_SEQUENCE;
@@ -3397,7 +3397,7 @@ static void acf_gpd_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale),
UI_GetThemeColorShade3fv(TH_DOPESHEET_CHANNELSUBOB, 20, r_color);
}
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_gpd_icon(bAnimListElem *UNUSED(ale))
{
return ICON_GREASEPENCIL;
@@ -3576,7 +3576,7 @@ static void acf_mask_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale),
UI_GetThemeColorShade3fv(TH_DOPESHEET_CHANNELSUBOB, 20, r_color);
}
-// TODO: just get this from RNA?
+/* TODO: just get this from RNA? */
static int acf_mask_icon(bAnimListElem *UNUSED(ale))
{
return ICON_MOD_MASK;
@@ -3875,7 +3875,7 @@ static bAnimChannelType ACF_NLATRACK = {
acf_generic_channel_backdrop, /* backdrop */
acf_generic_indention_flexible, /* indent level */
acf_generic_group_offset,
- /* offset */ // XXX?
+ /* offset */ /* XXX? */
acf_nlatrack_name, /* name */
acf_nlatrack_name_prop, /* name prop */
@@ -3970,7 +3970,7 @@ static void acf_nlaaction_name(bAnimListElem *ale, char *name)
if (name) {
if (act) {
- // TODO: add special decoration when doing this in tweaking mode?
+ /* TODO: add special decoration when doing this in tweaking mode? */
BLI_strncpy(name, act->id.name + 2, ANIM_CHAN_NAME_SIZE);
}
else {
@@ -4027,7 +4027,7 @@ static int acf_nlaaction_setting_flag(bAnimContext *UNUSED(ac),
switch (setting) {
case ACHANNEL_SETTING_PINNED: /* pinned - map/unmap */
- *neg = true; // XXX
+ *neg = true; /* XXX */
return ADT_NLA_EDIT_NOMAP;
default: /* unsupported */
@@ -4054,7 +4054,7 @@ static bAnimChannelType ACF_NLAACTION = {
acf_nlaaction_backdrop, /* backdrop */
acf_generic_indention_flexible, /* indent level */
acf_generic_group_offset,
- /* offset */ // XXX?
+ /* offset */ /* XXX? */
acf_nlaaction_name, /* name */
acf_nlaaction_name_prop, /* name prop */
@@ -4328,15 +4328,15 @@ void ANIM_channel_setting_set(bAnimContext *ac,
/* --------------------------- */
-// size of icons
+/* size of icons */
#define ICON_WIDTH (0.85f * U.widget_unit)
-// width of sliders
+/* width of sliders */
#define SLIDER_WIDTH (4 * U.widget_unit)
-// min-width of rename textboxes
+/* min-width of rename textboxes */
#define RENAME_TEXT_MIN_WIDTH (U.widget_unit)
-// width of graph editor color bands
+/* width of graph editor color bands */
#define GRAPH_COLOR_BAND_WIDTH (0.3f * U.widget_unit)
-// extra offset for the visibility icons in the graph editor
+/* extra offset for the visibility icons in the graph editor */
#define GRAPH_ICON_VISIBILITY_OFFSET (GRAPH_COLOR_BAND_WIDTH * 1.5f)
/* Helper - Check if a channel needs renaming */
@@ -4796,7 +4796,7 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi
/* try to resolve the path stored in the F-Curve */
if (RNA_path_resolve_property(&id_ptr, rna_path, &ptr, &prop)) {
/* find or create new F-Curve */
- // XXX is the group name for this ok?
+ /* XXX is the group name for this ok? */
bAction *act = ED_id_action_ensure(bmain, (ID *)key);
FCurve *fcu = ED_action_fcurve_ensure(bmain, act, NULL, &ptr, rna_path, 0);
@@ -4945,7 +4945,7 @@ static void draw_setting_widget(bAnimContext *ac,
/* --- */
case ACHANNEL_SETTING_PROTECT: /* protected lock */
- // TODO: what about when there's no protect needed?
+ /* TODO: what about when there's no protect needed? */
// icon = ((enabled) ? ICON_LOCKED : ICON_UNLOCKED);
icon = ICON_UNLOCKED;
@@ -5241,7 +5241,7 @@ void ANIM_channel_draw_widgets(const bContext *C,
/* reset offset - now goes from RHS of panel */
offset = (int)rect->xmax;
- // TODO: when drawing sliders, make those draw instead of these toggles if not enough space
+ /* TODO: when drawing sliders, make those draw instead of these toggles if not enough space. */
if (v2d && !is_being_renamed) {
short draw_sliders = 0;
@@ -5518,7 +5518,7 @@ void ANIM_channel_draw_widgets(const bContext *C,
}
}
else { /* Special Slider for stuff without RNA Access ---------- */
- // TODO: only implement this case when we really need it...
+ /* TODO: only implement this case when we really need it... */
}
}
}
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 6aa8f8d0b27..bb27b0e11d1 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -59,7 +59,7 @@
#include "ED_anim_api.h"
#include "ED_armature.h"
-#include "ED_keyframes_edit.h" // XXX move the select modes out of there!
+#include "ED_keyframes_edit.h" /* XXX move the select modes out of there! */
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_select_utils.h"
@@ -73,7 +73,7 @@
/* -------------------------- Selection ------------------------------------- */
/* Set the given animation-channel as the active one for the active context */
-// TODO: extend for animdata types...
+/* TODO: extend for animdata types... */
void ANIM_set_active_channel(bAnimContext *ac,
void *data,
eAnimCont_Types datatype,
@@ -1470,8 +1470,8 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op)
rearrange_driver_channels(&ac, adt, mode);
break;
- case ANIMCONT_ACTION: /* Single Action only... */
- case ANIMCONT_SHAPEKEY: // DOUBLE CHECK ME...
+ case ANIMCONT_ACTION: /* Single Action only... */
+ case ANIMCONT_SHAPEKEY: /* DOUBLE CHECK ME... */
{
if (adt->action) {
rearrange_action_channels(&ac, adt->action, mode);
@@ -1939,7 +1939,7 @@ static const EnumPropertyItem prop_animchannel_setflag_types[] = {
};
/* defines for set animation-channel settings */
-// TODO: could add some more types, but those are really quite dependent on the mode...
+/* TODO: could add some more types, but those are really quite dependent on the mode... */
static const EnumPropertyItem prop_animchannel_settings_types[] = {
{ACHANNEL_SETTING_PROTECT, "PROTECT", 0, "Protect", ""},
{ACHANNEL_SETTING_MUTE, "MUTE", 0, "Mute", ""},
@@ -1948,12 +1948,14 @@ static const EnumPropertyItem prop_animchannel_settings_types[] = {
/* ------------------- */
-/* Set/clear a particular flag (setting) for all selected + visible channels
- * setting: the setting to modify
- * mode: eAnimChannels_SetFlag
- * onlysel: only selected channels get the flag set
+/**
+ * Set/clear a particular flag (setting) for all selected + visible channels
+ * \param setting: the setting to modify.
+ * \param mode: eAnimChannels_SetFlag.
+ * \param onlysel: only selected channels get the flag set.
+ *
+ * TODO: enable a setting which turns flushing on/off?.
*/
-// TODO: enable a setting which turns flushing on/off?
static void setflag_anim_channels(bAnimContext *ac,
eAnimChannel_Settings setting,
eAnimChannels_SetFlag mode,
@@ -3295,11 +3297,11 @@ static void ANIM_OT_channels_click(wmOperatorType *ot)
/* properties */
/* NOTE: don't save settings, otherwise, can end up with some weird behavior (sticky extend) */
- prop = RNA_def_boolean(ot->srna, "extend", false, "Extend Select", ""); // SHIFTKEY
+ prop = RNA_def_boolean(ot->srna, "extend", false, "Extend Select", ""); /* SHIFTKEY */
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_boolean(
- ot->srna, "children_only", false, "Select Children Only", ""); // CTRLKEY|SHIFTKEY
+ ot->srna, "children_only", false, "Select Children Only", ""); /* CTRLKEY|SHIFTKEY */
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
@@ -3443,7 +3445,7 @@ void ED_operatortypes_animchannels(void)
WM_operatortype_append(ANIM_OT_channels_ungroup);
}
-// TODO: check on a poll callback for this, to get hotkeys into menus
+/* TODO: check on a poll callback for this, to get hotkeys into menus */
void ED_keymap_animchannels(wmKeyConfig *keyconf)
{
WM_keymap_ensure(keyconf, "Animation Channels", 0, 0);
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c
index 4fb68b614ff..831de3e7bc4 100644
--- a/source/blender/editors/animation/anim_deps.c
+++ b/source/blender/editors/animation/anim_deps.c
@@ -108,7 +108,7 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale)
* we'd be calling property update functions here too ... */
DEG_id_tag_update(id,
ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY |
- ID_RECALC_ANIMATION); // XXX or do we want something more restrictive?
+ ID_RECALC_ANIMATION); /* XXX or do we want something more restrictive? */
}
}
@@ -121,7 +121,7 @@ void ANIM_id_update(Main *bmain, ID *id)
bmain,
id,
ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY |
- ID_RECALC_ANIMATION); // XXX or do we want something more restrictive?
+ ID_RECALC_ANIMATION); /* XXX or do we want something more restrictive? */
}
}
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index 73df0518f06..b2eb41f7480 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -126,8 +126,11 @@ void ANIM_draw_previewrange(const bContext *C, View2D *v2d, int end_frame_width)
/* *************************************************** */
/* SCENE FRAME RANGE */
-/* Draw frame range guides (for scene frame range) in background */
-// TODO: Should we still show these when preview range is enabled?
+/**
+ * Draw frame range guides (for scene frame range) in background.
+ *
+ * TODO: Should we still show these when preview range is enabled?
+ */
void ANIM_draw_framerange(Scene *scene, View2D *v2d)
{
/* draw darkened area outside of active timeline frame range */
@@ -167,8 +170,11 @@ void ANIM_draw_framerange(Scene *scene, View2D *v2d)
/* *************************************************** */
/* NLA-MAPPING UTILITIES (required for drawing and also editing keyframes) */
-/* Obtain the AnimData block providing NLA-mapping for the given channel (if applicable) */
-// TODO: do not supply return this if the animdata tells us that there is no mapping to perform
+/**
+ * Obtain the AnimData block providing NLA-mapping for the given channel (if applicable).
+ *
+ * TODO: do not supply return this if the animdata tells us that there is no mapping to perform.
+ */
AnimData *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
{
/* sanity checks */
@@ -182,7 +188,7 @@ AnimData *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
}
/* apart from strictly keyframe-related contexts, this shouldn't even happen */
- // XXX: nla and channel here may not be necessary...
+ /* XXX: nla and channel here may not be necessary... */
if (ELEM(ac->datatype,
ANIMCONT_ACTION,
ANIMCONT_SHAPEKEY,
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index ed119a111be..11581adf919 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -142,7 +142,7 @@ static Key *actedit_get_shapekeys(bAnimContext *ac)
}
/* XXX pinning is not available in 'ShapeKey' mode... */
- // if (saction->pin) return NULL;
+ // if (saction->pin) { return NULL; }
/* shapekey data is stored with geometry data */
key = BKE_key_from_object(ob);
@@ -223,9 +223,11 @@ static bool actedit_get_context(bAnimContext *ac, SpaceAction *saction)
case SACTCONT_MASK: /* Mask */ /* XXX review how this mode is handled... */
{
/* TODO, other methods to get the mask */
- // Sequence *seq = BKE_sequencer_active_get(ac->scene);
- // MovieClip *clip = ac->scene->clip;
- // struct Mask *mask = seq ? seq->mask : NULL;
+#if 0
+ Sequence *seq = BKE_sequencer_active_get(ac->scene);
+ MovieClip *clip = ac->scene->clip;
+ struct Mask *mask = seq ? seq->mask : NULL;
+#endif
/* update scene-pointer (no need to check for pinning yet, as not implemented) */
saction->ads.source = (ID *)ac->scene;
@@ -562,12 +564,14 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
/* ............................... */
-/* Add a new animation channel, taking into account the "peek" flag, which is used to just check
+/**
+ * Add a new animation channel, taking into account the "peek" flag, which is used to just check
* whether any channels will be added (but without needing them to actually get created).
*
- * ! This causes the calling function to return early if we're only "peeking" for channels
+ * \warning This causes the calling function to return early if we're only "peeking" for channels.
+ *
+ * XXX: ale_statement stuff is really a hack for one special case. It shouldn't really be needed.
*/
-// XXX: ale_statement stuff is really a hack for one special case. It shouldn't really be needed...
#define ANIMCHANNEL_NEW_CHANNEL_FULL( \
channel_data, channel_type, owner_id, fcurve_owner_id, ale_statement) \
if (filter_mode & ANIMFILTER_TMP_PEEK) { \
@@ -681,7 +685,7 @@ static bAnimListElem *make_new_animlistelem(void *data,
ale->flag = adt->flag;
- // XXX... drivers don't show summary for now
+ /* XXX drivers don't show summary for now. */
ale->key_data = NULL;
ale->datatype = ALE_NONE;
break;
@@ -921,7 +925,7 @@ static bAnimListElem *make_new_animlistelem(void *data,
/* NOTE: we just reuse the same expand filter for this case */
ale->flag = EXPANDED_GPD(gpd);
- // XXX: currently, this is only used for access to its animation data
+ /* XXX: currently, this is only used for access to its animation data */
ale->key_data = (adt) ? adt->action : NULL;
ale->datatype = ALE_ACT;
@@ -1234,7 +1238,7 @@ static bool fcurve_has_errors(FCurve *fcu)
}
/* check variables for other things that need linting... */
- // TODO: maybe it would be more efficient just to have a quick flag for this?
+ /* TODO: maybe it would be more efficient just to have a quick flag for this? */
for (dvar = driver->variables.first; dvar; dvar = dvar->next) {
DRIVER_TARGETS_USED_LOOPER_BEGIN (dvar) {
if (dtar->flag & DTAR_FLAG_INVALID) {
@@ -1476,7 +1480,7 @@ static size_t animfilter_action(bAnimContext *ac,
}
/* do groups */
- // TODO: do nested groups?
+ /* TODO: do nested groups? */
for (agrp = act->groups.first; agrp; agrp = agrp->next) {
/* store reference to last channel of group */
if (agrp->channels.last) {
@@ -1725,7 +1729,7 @@ static size_t animdata_filter_shapekey(bAnimContext *ac,
/* Only include this track if selected in a way consistent
* with the filtering requirements. */
if (ANIMCHANNEL_SELOK(SEL_SHAPEKEY(kb))) {
- // TODO: consider 'active' too?
+ /* TODO: consider 'active' too? */
/* owner-id here must be key so that the F-Curve can be resolved... */
ANIMCHANNEL_NEW_CHANNEL(kb, ANIMTYPE_SHAPEKEY, key, NULL);
@@ -1735,7 +1739,7 @@ static size_t animdata_filter_shapekey(bAnimContext *ac,
}
else {
/* just use the action associated with the shapekey */
- // TODO: somehow manage to pass dopesheet info down here too?
+ /* TODO: somehow manage to pass dopesheet info down here too? */
if (key->adt) {
if (filter_mode & ANIMFILTER_ANIMDATA) {
if (ANIMCHANNEL_SELOK(SEL_ANIMDATA(key->adt))) {
@@ -1840,8 +1844,11 @@ static size_t animdata_filter_gpencil_data(ListBase *anim_data,
return items;
}
-/* Grab all Grease Pencil data-blocks in file. */
-// TODO: should this be amalgamated with the dopesheet filtering code?
+/**
+ * Grab all Grease Pencil data-blocks in file.
+ *
+ * TODO: should this be amalgamated with the dope-sheet filtering code?
+ */
static size_t animdata_filter_gpencil(bAnimContext *ac,
ListBase *anim_data,
void *UNUSED(data),
@@ -1930,8 +1937,9 @@ static size_t animdata_filter_ds_gpencil(
tmp_items += animfilter_block_data(ac, &tmp_data, ads, &gpd->id, filter_mode);
/* add Grease Pencil layers */
- // TODO: do these need a separate expander?
- // XXX: what order should these go in?
+
+ /* TODO: do these need a separate expander?
+ * XXX: what order should these go in? */
}
END_ANIMFILTER_SUBCHANNELS;
@@ -1940,7 +1948,7 @@ static size_t animdata_filter_ds_gpencil(
/* include data-expand widget first */
if (filter_mode & ANIMFILTER_LIST_CHANNELS) {
/* check if filtering by active status */
- // XXX: active check here needs checking
+ /* XXX: active check here needs checking */
if (ANIMCHANNEL_ACTIVEOK(gpd)) {
ANIMCHANNEL_NEW_CHANNEL(gpd, ANIMTYPE_DSGPENCIL, gpd, NULL);
}
@@ -1976,7 +1984,7 @@ static size_t animdata_filter_ds_cachefile(
/* include data-expand widget first */
if (filter_mode & ANIMFILTER_LIST_CHANNELS) {
/* check if filtering by active status */
- // XXX: active check here needs checking
+ /* XXX: active check here needs checking */
if (ANIMCHANNEL_ACTIVEOK(cache_file)) {
ANIMCHANNEL_NEW_CHANNEL(cache_file, ANIMTYPE_DSCACHEFILE, cache_file, NULL);
}
@@ -2027,7 +2035,7 @@ static size_t animdata_filter_mask(Main *bmain,
size_t items = 0;
/* For now, grab mask data-blocks directly from main. */
- // XXX: this is not good...
+ /* XXX: this is not good... */
for (mask = bmain->masks.first; mask; mask = mask->id.next) {
ListBase tmp_data = {NULL, NULL};
size_t tmp_items = 0;
@@ -2215,8 +2223,10 @@ static size_t animdata_filter_ds_texture(bAnimContext *ac,
if ((tex->nodetree) && !(ads->filterflag & ADS_FILTER_NONTREE)) {
/* owner_id as id instead of texture,
* since it'll otherwise be impossible to track the depth. */
- // FIXME: perhaps as a result, textures should NOT be included under materials,
- // but under their own section instead so that free-floating textures can also be animated.
+
+ /* FIXME: perhaps as a result, textures should NOT be included under materials,
+ * but under their own section instead so that free-floating textures can also be animated.
+ */
tmp_items += animdata_filter_ds_nodetree(
ac, &tmp_data, ads, (ID *)tex, tex->nodetree, filter_mode);
}
@@ -2406,7 +2416,7 @@ static void animfilter_modifier_idpoin_cb(void *afm_ptr,
* which would be nice to animate (i.e. texture parameters) but which are not actually
* attached to any other objects/materials/etc. in the scene
*/
-// TODO: do we want an expander for this?
+/* TODO: do we want an expander for this? */
static size_t animdata_filter_ds_modifiers(
bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
{
@@ -2900,7 +2910,7 @@ static size_t animdata_filter_ds_scene(
void *cdata = NULL;
/* determine the type of expander channels to use */
- // this is the best way to do this for now...
+ /* this is the best way to do this for now... */
ANIMDATA_FILTER_CASES(
sce, /* Some useless long comment to prevent wrapping by old clang-format versions... */
{/* AnimData - no channel, but consider data */},
@@ -3168,9 +3178,9 @@ static Base **animdata_filter_ds_sorted_bases(bDopeSheet *ads,
return sorted_bases;
}
-// TODO: implement pinning...
-// (if and when pinning is done, what we need to do is to provide freeing mechanisms -
-// to protect against data that was deleted).
+/* TODO: implement pinning...
+ * (if and when pinning is done, what we need to do is to provide freeing mechanisms -
+ * to protect against data that was deleted). */
static size_t animdata_filter_dopesheet(bAnimContext *ac,
ListBase *anim_data,
bDopeSheet *ads,
@@ -3227,7 +3237,7 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac,
if ((filter_mode & ANIMFILTER_LIST_CHANNELS) && !(ads->flag & ADS_FLAG_NO_DB_SORT) &&
(view_layer->object_bases.first != view_layer->object_bases.last)) {
/* Filter list of bases (i.e. objects), sort them, then add their contents normally... */
- // TODO: Cache the old sorted order - if the set of bases hasn't changed, don't re-sort...
+ /* TODO: Cache the old sorted order - if the set of bases hasn't changed, don't re-sort... */
Base **sorted_bases;
size_t num_bases;
@@ -3238,7 +3248,7 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac,
items += animdata_filter_dopesheet_ob(ac, anim_data, ads, sorted_bases[i], filter_mode);
}
- // TODO: store something to validate whether any changes are needed?
+ /* TODO: store something to validate whether any changes are needed? */
/* free temporary data */
MEM_freeN(sorted_bases);
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 38e5723f7db..8e1f03295f4 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -687,7 +687,7 @@ static int ed_marker_add_exec(bContext *C, wmOperator *UNUSED(op))
marker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
marker->flag = SELECT;
marker->frame = frame;
- BLI_snprintf(marker->name, sizeof(marker->name), "F_%02d", frame); // XXX - temp code only
+ BLI_snprintf(marker->name, sizeof(marker->name), "F_%02d", frame); /* XXX - temp code only */
BLI_addtail(markers, marker);
WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
@@ -1110,7 +1110,7 @@ static void ed_marker_duplicate_apply(bContext *C)
}
/* new marker is added to the beginning of list */
- // FIXME: bad ordering!
+ /* FIXME: bad ordering! */
BLI_addhead(markers, newmarker);
}
}
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 4d5ff33d5cf..b2a9d6ac9b7 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -883,9 +883,12 @@ void ANIM_copy_as_driver(struct ID *target_id, const char *target_path, const ch
/* Add Driver - Enum Defines ------------------------- */
-/* Mapping Types enum for operators */
-/* NOTE: Used by ANIM_OT_driver_button_add and UI_OT_eyedropper_driver */
-// XXX: These names need reviewing
+/**
+ * Mapping Types enum for operators.
+ * \note Used by #ANIM_OT_driver_button_add and #UI_OT_eyedropper_driver.
+ *
+ * XXX: These names need reviewing.
+ */
EnumPropertyItem prop_driver_create_mapping_types[] = {
{CREATEDRIVER_MAPPING_1_N,
"SINGLE_MANY",
@@ -1014,7 +1017,7 @@ static int add_driver_button_none(bContext *C, wmOperator *op, short mapping_typ
/* send updates */
UI_context_update_anim_flag(C);
DEG_relations_tag_update(CTX_data_main(C));
- WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); // XXX
+ WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); /* XXX */
return OPERATOR_FINISHED;
}
@@ -1051,8 +1054,8 @@ static int add_driver_button_menu_invoke(bContext *C, wmOperator *op, const wmEv
}
/* Show menu */
- // TODO: This should get filtered by the enum filter
- /* important to execute in the region we're currently in */
+ /* TODO: This should get filtered by the enum filter. */
+ /* important to execute in the region we're currently in. */
return WM_menu_invoke_ex(C, op, WM_OP_INVOKE_DEFAULT);
}
@@ -1167,7 +1170,7 @@ static int remove_driver_button_exec(bContext *C, wmOperator *op)
/* send updates */
UI_context_update_anim_flag(C);
DEG_relations_tag_update(CTX_data_main(C));
- WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); // XXX
+ WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); /* XXX */
}
return (changed) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
@@ -1183,7 +1186,7 @@ void ANIM_OT_driver_button_remove(wmOperatorType *ot)
/* callbacks */
ot->exec = remove_driver_button_exec;
- // op->poll = ??? // TODO: need to have some driver to be able to do this...
+ /* TODO: `op->poll` need to have some driver to be able to do this. */
/* flags */
ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL;
@@ -1220,7 +1223,7 @@ void ANIM_OT_driver_button_edit(wmOperatorType *ot)
/* callbacks */
ot->exec = edit_driver_button_exec;
- // op->poll = ??? // TODO: need to have some driver to be able to do this...
+ /* TODO: `op->poll` need to have some driver to be able to do this. */
/* flags */
ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL;
@@ -1264,7 +1267,7 @@ void ANIM_OT_copy_driver_button(wmOperatorType *ot)
/* callbacks */
ot->exec = copy_driver_button_exec;
- // op->poll = ??? // TODO: need to have some driver to be able to do this...
+ /* TODO: `op->poll` need to have some driver to be able to do this. */
/* flags */
ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL;
@@ -1295,7 +1298,7 @@ static int paste_driver_button_exec(bContext *C, wmOperator *op)
DEG_id_tag_update(ptr.owner_id, ID_RECALC_ANIMATION);
- WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL); // XXX
+ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL); /* XXX */
MEM_freeN(path);
}
@@ -1314,7 +1317,7 @@ void ANIM_OT_paste_driver_button(wmOperatorType *ot)
/* callbacks */
ot->exec = paste_driver_button_exec;
- // op->poll = ??? // TODO: need to have some driver to be able to do this...
+ /* TODO: `op->poll` need to have some driver to be able to do this. */
/* flags */
ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL;
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index a8fb0be4fbf..fc622c7a52e 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -61,7 +61,7 @@
/* ********************************************** */
/* UI STUFF */
-// XXX! --------------------------------
+/* XXX! -------------------------------- */
/* Temporary definition for limits of float number buttons
* (FLT_MAX tends to infinity with old system). */
#define UI_FLT_MAX 10000.0f
@@ -499,7 +499,7 @@ static void draw_modifier__fn_generator(uiLayout *layout,
uiItemR(col, &ptr, "function_type", 0, "", ICON_NONE);
uiItemR(col, &ptr, "use_additive", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- col = uiLayoutColumn(layout, false); // no grouping for now
+ col = uiLayoutColumn(layout, false); /* no grouping for now */
uiItemR(col, &ptr, "amplitude", 0, NULL, ICON_NONE);
uiItemR(col, &ptr, "phase_multiplier", 0, NULL, ICON_NONE);
uiItemR(col, &ptr, "phase_offset", 0, NULL, ICON_NONE);
@@ -580,7 +580,7 @@ static void fmod_envelope_addpoint_cb(bContext *C, void *fcm_dv, void *UNUSED(ar
/* init template data */
fed.min = -1.0f;
fed.max = 1.0f;
- fed.time = (float)scene->r.cfra; // XXX make this int for ease of use?
+ fed.time = (float)scene->r.cfra; /* XXX make this int for ease of use? */
fed.f1 = fed.f2 = 0;
/* check that no data exists for the current frame... */
@@ -625,7 +625,7 @@ static void fmod_envelope_addpoint_cb(bContext *C, void *fcm_dv, void *UNUSED(ar
}
/* callback to remove envelope data point */
-// TODO: should we have a separate file for things like this?
+/* TODO: should we have a separate file for things like this? */
static void fmod_envelope_deletepoint_cb(bContext *UNUSED(C), void *fcm_dv, void *ind_v)
{
FMod_Envelope *env = (FMod_Envelope *)fcm_dv;
@@ -914,7 +914,7 @@ void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout,
box = uiLayoutBox(layout);
row = uiLayoutRow(box, false);
- block = uiLayoutGetBlock(row); // err...
+ block = uiLayoutGetBlock(row); /* err... */
/* left-align -------------------------------------------- */
sub = uiLayoutRow(row, true);
@@ -1008,7 +1008,7 @@ void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout,
}
/* one last panel below this: FModifier range */
- // TODO: experiment with placement of this
+ /* TODO: experiment with placement of this */
{
box = uiLayoutBox(layout);
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c
index 4d6d7fa3ad5..542a6d45db7 100644
--- a/source/blender/editors/animation/keyframes_draw.c
+++ b/source/blender/editors/animation/keyframes_draw.c
@@ -1071,7 +1071,7 @@ void scene_to_keylist(bDopeSheet *ads, Scene *sce, DLRBT_Tree *keys, int saction
ac.datatype = ANIMCONT_CHANNEL;
/* get F-Curves to take keyframes from */
- filter = ANIMFILTER_DATA_VISIBLE; // curves only
+ filter = ANIMFILTER_DATA_VISIBLE; /* curves only */
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* loop through each F-Curve, grabbing the keyframes */
@@ -1109,7 +1109,7 @@ void ob_to_keylist(bDopeSheet *ads, Object *ob, DLRBT_Tree *keys, int saction_fl
ac.datatype = ANIMCONT_CHANNEL;
/* get F-Curves to take keyframes from */
- filter = ANIMFILTER_DATA_VISIBLE; // curves only
+ filter = ANIMFILTER_DATA_VISIBLE; /* curves only */
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* loop through each F-Curve, grabbing the keyframes */
@@ -1143,7 +1143,7 @@ void cachefile_to_keylist(bDopeSheet *ads,
/* get F-Curves to take keyframes from */
ListBase anim_data = {NULL, NULL};
- int filter = ANIMFILTER_DATA_VISIBLE; // curves only
+ int filter = ANIMFILTER_DATA_VISIBLE; /* curves only */
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* loop through each F-Curve, grabbing the keyframes */
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index 299aa1db4f5..d5260cac0c9 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -70,7 +70,7 @@
/* This function is used to loop over BezTriples in the given F-Curve, applying a given
* operation on them, and optionally applies an F-Curve validation function afterwards.
*/
-// TODO: make this function work on samples too...
+/* TODO: make this function work on samples too. */
short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked,
FCurve *fcu,
KeyframeEditFunc key_ok,
@@ -237,7 +237,7 @@ static short ob_keyframes_loop(KeyframeEditData *ked,
ac.datatype = ANIMCONT_CHANNEL;
/* get F-Curves to take keyframes from */
- filter = ANIMFILTER_DATA_VISIBLE; // curves only
+ filter = ANIMFILTER_DATA_VISIBLE; /* curves only */
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* Loop through each F-Curve, applying the operation as required,
@@ -286,7 +286,7 @@ static short scene_keyframes_loop(KeyframeEditData *ked,
ac.datatype = ANIMCONT_CHANNEL;
/* get F-Curves to take keyframes from */
- filter = ANIMFILTER_DATA_VISIBLE; // curves only
+ filter = ANIMFILTER_DATA_VISIBLE; /* curves only */
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* Loop through each F-Curve, applying the operation as required,
@@ -478,7 +478,7 @@ void ANIM_animdata_keyframe_callback(bAnimContext *ac,
/* Keyframe Integrity Tools */
/* Rearrange keyframes if some are out of order */
-// used to be recalc_*_ipos() where * was object or action
+/* used to be recalc_*_ipos() where * was object or action */
void ANIM_editkeyframes_refresh(bAnimContext *ac)
{
ListBase anim_data = {NULL, NULL};
@@ -834,7 +834,7 @@ void bezt_remap_times(KeyframeEditData *ked, BezTriple *bezt)
const float scale = (rmap->newMax - rmap->newMin) / (rmap->oldMax - rmap->oldMin);
/* perform transform on all three handles unless indicated otherwise */
- // TODO: need to include some checks for that
+ /* TODO: need to include some checks for that */
bezt->vec[0][0] = scale * (bezt->vec[0][0] - rmap->oldMin) + rmap->newMin;
bezt->vec[1][0] = scale * (bezt->vec[1][0] - rmap->oldMin) + rmap->newMin;
@@ -1025,7 +1025,7 @@ static short mirror_bezier_value(KeyframeEditData *ked, BezTriple *bezt)
}
/* Note: for markers and 'value', the values to use must be supplied as the first float value */
-// calchandles_fcurve
+/* calchandles_fcurve */
KeyframeEditFunc ANIM_editkeyframes_mirror(short mode)
{
switch (mode) {
@@ -1128,9 +1128,12 @@ static short set_bezier_vector(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
return 0;
}
-/* Queries if the handle should be set to 'free' or 'align' */
-// NOTE: this was used for the 'toggle free/align' option
-// currently this isn't used, but may be restored later
+/**
+ * Queries if the handle should be set to 'free' or 'align'.
+ *
+ * \note This was used for the 'toggle free/align' option
+ * currently this isn't used, but may be restored later.
+ */
static short bezier_isfree(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if ((bezt->f1 & SELECT) && (bezt->h1)) {
@@ -1181,7 +1184,7 @@ static short set_bezier_free(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
}
/* Set all selected Bezier Handles to a single type */
-// calchandles_fcurve
+/* calchandles_fcurve */
KeyframeEditFunc ANIM_editkeyframes_handles(short mode)
{
switch (mode) {
@@ -1309,7 +1312,7 @@ static short set_bezt_sine(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
}
/* Set the interpolation type of the selected BezTriples in each F-Curve to the specified one */
-// ANIM_editkeyframes_ipocurve_ipotype() !
+/* ANIM_editkeyframes_ipocurve_ipotype() ! */
KeyframeEditFunc ANIM_editkeyframes_ipo(short mode)
{
switch (mode) {
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 0bec20c739e..f916969c9f3 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -485,7 +485,7 @@ typedef struct tSmooth_Bezt {
} tSmooth_Bezt;
/* Use a weighted moving-means method to reduce intensity of fluctuations */
-// TODO: introduce scaling factor for weighting falloff
+/* TODO: introduce scaling factor for weighting falloff */
void smooth_fcurve(FCurve *fcu)
{
int totSel = 0;
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index e4b73ea65a0..431ec9e0526 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -462,8 +462,8 @@ int insert_bezt_fcurve(FCurve *fcu, const BezTriple *bezt, eInsertKeyFlags flag)
/* no keyframes already, but can only add if...
* 1) keyframing modes say that keyframes can only be replaced, so adding new ones won't know
* 2) there are no samples on the curve
- * // NOTE: maybe we may want to allow this later when doing samples -> bezt conversions,
- * // but for now, having both is asking for trouble
+ * NOTE: maybe we may want to allow this later when doing samples -> bezt conversions,
+ * but for now, having both is asking for trouble
*/
else if ((flag & INSERTKEY_REPLACE) == 0 && (fcu->fpt == NULL)) {
/* create new keyframes array */
@@ -1875,7 +1875,7 @@ static int insert_key_exec(bContext *C, wmOperator *op)
Object *obedit = CTX_data_edit_object(C);
bool ob_edit_mode = false;
- float cfra = (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
+ float cfra = (float)CFRA; /* XXX for now, don't bother about all the yucky offset crap */
int num_channels;
KeyingSet *ks = keyingset_get_from_op_with_error(op, op->type->prop, scene);
@@ -2058,7 +2058,7 @@ void ANIM_OT_keyframe_insert_menu(wmOperatorType *ot)
/* confirm whether a keyframe was added by showing a popup
* - by default, this is disabled so that if a menu is shown, this doesn't come up too
*/
- // XXX should this just be always on?
+ /* XXX should this just be always on? */
prop = RNA_def_boolean(ot->srna,
"confirm_success",
0,
@@ -2079,7 +2079,7 @@ void ANIM_OT_keyframe_insert_menu(wmOperatorType *ot)
static int delete_key_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
- float cfra = (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
+ float cfra = (float)CFRA; /* XXX for now, don't bother about all the yucky offset crap */
int num_channels;
KeyingSet *ks = keyingset_get_from_op_with_error(op, op->type->prop, scene);
@@ -2609,7 +2609,7 @@ static int delete_key_button_exec(bContext *C, wmOperator *op)
PropertyRNA *prop = NULL;
Main *bmain = CTX_data_main(C);
char *path;
- float cfra = (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
+ float cfra = (float)CFRA; /* XXX for now, don't bother about all the yucky offset crap */
bool changed = false;
int index;
const bool all = RNA_boolean_get(op->ptr, "all");
@@ -2781,7 +2781,7 @@ void ANIM_OT_keyframe_clear_button(wmOperatorType *ot)
bool autokeyframe_cfra_can_key(const Scene *scene, ID *id)
{
- float cfra = (float)CFRA; // XXX for now, this will do
+ float cfra = (float)CFRA; /* XXX for now, this will do */
/* only filter if auto-key mode requires this */
if (IS_AUTOKEY_ON(scene) == 0) {
@@ -2981,7 +2981,7 @@ bool id_frame_has_keyframe(ID *id, float frame, short filter)
case ID_OB: /* object */
return object_frame_has_keyframe((Object *)id, frame, filter);
#if 0
- // XXX TODO... for now, just use 'normal' behavior
+ /* XXX TODO... for now, just use 'normal' behavior */
case ID_SCE: /* scene */
break;
#endif
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 876740b889a..fda7b600c1c 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -214,7 +214,7 @@ static int add_empty_ks_path_exec(bContext *C, wmOperator *op)
BLI_addtail(&ks->paths, ksp);
ks->active_path = BLI_listbase_count(&ks->paths);
- ksp->groupmode = KSP_GROUP_KSNAME; // XXX?
+ ksp->groupmode = KSP_GROUP_KSNAME; /* XXX? */
ksp->idtype = ID_OB;
ksp->flag = KSP_FLAG_WHOLE_ARRAY;
@@ -968,14 +968,15 @@ eModifyKey_Returns ANIM_validate_keyingset(bContext *C, ListBase *dsources, Keyi
}
/* if we don't have any paths now, then this still qualifies as invalid context */
- // FIXME: we need some error conditions (to be retrieved from the iterator why this failed!)
+ /* FIXME: we need some error conditions (to be retrieved from the iterator why this failed!)
+ */
if (BLI_listbase_is_empty(&ks->paths)) {
return MODIFYKEY_INVALID_CONTEXT;
}
}
else {
/* poll callback tells us that KeyingSet is useless in current context */
- // FIXME: the poll callback needs to give us more info why
+ /* FIXME: the poll callback needs to give us more info why */
return MODIFYKEY_INVALID_CONTEXT;
}
}
@@ -1149,7 +1150,7 @@ int ANIM_apply_keyingset(
{
Object *ob = (Object *)ksp->id;
- // XXX: only object transforms?
+ /* XXX: only object transforms? */
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
break;
}
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c
index 5f01c4ed038..4d31a5e786b 100644
--- a/source/blender/editors/armature/armature_add.c
+++ b/source/blender/editors/armature/armature_add.c
@@ -942,7 +942,7 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *op)
Object *ob = objects[ob_index];
bArmature *arm = ob->data;
- ED_armature_edit_sync_selection(arm->edbo); // XXX why is this needed?
+ ED_armature_edit_sync_selection(arm->edbo); /* XXX why is this needed? */
preEditBoneDuplicate(arm->edbo);
@@ -1117,7 +1117,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op)
/* The beginning of the duplicated mirrored bones in the edbo list */
EditBone *ebone_first_dupe = NULL;
- ED_armature_edit_sync_selection(arm->edbo); // XXX why is this needed?
+ ED_armature_edit_sync_selection(arm->edbo); /* XXX why is this needed? */
preEditBoneDuplicate(arm->edbo);
@@ -1399,7 +1399,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
if (arm->flag & ARM_MIRROR_EDIT) {
flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone);
if (flipbone) {
- forked_iter = 0; // we extrude 2 different bones
+ forked_iter = 0; /* we extrude 2 different bones */
if (flipbone->flag & (BONE_TIPSEL | BONE_ROOTSEL | BONE_SELECTED)) {
/* don't want this bone to be selected... */
flipbone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL);
@@ -1449,7 +1449,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
newbone->dist = ebone->dist;
newbone->xwidth = ebone->xwidth;
newbone->zwidth = ebone->zwidth;
- newbone->rad_head = ebone->rad_tail; // don't copy entire bone...
+ newbone->rad_head = ebone->rad_tail; /* don't copy entire bone. */
newbone->rad_tail = ebone->rad_tail;
newbone->segments = 1;
newbone->layer = ebone->layer;
@@ -1470,7 +1470,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
BLI_strncpy(newbone->name, ebone->name, sizeof(newbone->name));
- if (flipbone && forked_iter) { // only set if mirror edit
+ if (flipbone && forked_iter) { /* only set if mirror edit */
if (strlen(newbone->name) < (MAXBONENAME - 2)) {
if (a == 0) {
strcat(newbone->name, "_L");
@@ -1587,10 +1587,10 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
copy_v3_v3(bone->head, curs);
if (rv3d && (U.flag & USER_ADD_VIEWALIGNED)) {
- add_v3_v3v3(bone->tail, bone->head, imat[1]); // bone with unit length 1
+ add_v3_v3v3(bone->tail, bone->head, imat[1]); /* bone with unit length 1 */
}
else {
- add_v3_v3v3(bone->tail, bone->head, imat[2]); // bone with unit length 1, pointing up Z
+ add_v3_v3v3(bone->tail, bone->head, imat[2]); /* bone with unit length 1, pointing up Z */
}
ED_armature_edit_refresh_layer_used(obedit->data);
@@ -1638,7 +1638,7 @@ static int armature_subdivide_exec(bContext *C, wmOperator *op)
cuts = RNA_int_get(op->ptr, "number_cuts");
/* loop over all editable bones */
- // XXX the old code did this in reverse order though!
+ /* XXX the old code did this in reverse order though! */
CTX_DATA_BEGIN_WITH_ID (C, EditBone *, ebone, selected_editable_bones, bArmature *, arm) {
for (i = cuts + 1; i > 1; i--) {
/* compute cut ratio first */
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index 2efb7315b89..14d64d2d808 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -685,7 +685,7 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
separate_armature_bones(bmain, ob_old, true);
separate_armature_bones(bmain, ob_new, false);
- /* 4) fix links before depsgraph flushes */ // err... or after?
+ /* 4) fix links before depsgraph flushes, err... or after? */
separated_armature_fix_links(bmain, ob_old, ob_new);
DEG_id_tag_update(&ob_old->id, ID_RECALC_GEOMETRY); /* this is the original one */
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index cf64cfc849d..e51e5ec5cef 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -451,7 +451,7 @@ static void heat_ray_tree_create(LaplacianSystem *sys)
BLI_bvhtree_insert(sys->heat.bvhtree, a, bb, 2);
- // Setup inverse pointers to use on isect.orig
+ /* Setup inverse pointers to use on isect.orig */
sys->heat.vltree[vtri[0]] = lt;
sys->heat.vltree[vtri[1]] = lt;
sys->heat.vltree[vtri[2]] = lt;
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index 85948f3abc3..e8c35958115 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -279,7 +279,7 @@ static int pose_calculate_paths_invoke(bContext *C, wmOperator *op, const wmEven
}
/* show popup dialog to allow editing of range... */
- // FIXME: hardcoded dimensions here are just arbitrary
+ /* FIXME: hard-coded dimensions here are just arbitrary. */
return WM_operator_props_dialog_popup(C, op, 200);
}
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c
index 33c1a8a8b4f..947e2dbf5aa 100644
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@ -1856,7 +1856,7 @@ void POSELIB_OT_browse_interactive(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
/* properties */
- // TODO: make the pose_index into a proper enum instead of a cryptic int...
+ /* TODO: make the pose_index into a proper enum instead of a cryptic int. */
ot->prop = RNA_def_int(
ot->srna,
"pose_index",
@@ -1868,7 +1868,7 @@ void POSELIB_OT_browse_interactive(wmOperatorType *ot)
0,
INT_MAX);
- // XXX: percentage vs factor?
+ /* XXX: percentage vs factor? */
/* not used yet */
#if 0
RNA_def_float_factor(ot->srna,
diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c
index c63f2ff12c5..731d0d10e0b 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -114,7 +114,7 @@ void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select)
bArmature *arm;
/* sanity checks */
- // XXX: actually, we can probably still get away with no object - at most we have no updates
+ /* XXX: actually, we can probably still get away with no object - at most we have no updates */
if (ELEM(NULL, ob, ob->pose, pchan, pchan->bone)) {
return;
}
@@ -133,7 +133,7 @@ void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select)
arm->act_bone = NULL;
}
- // TODO: select and activate corresponding vgroup?
+ /* TODO: select and activate corresponding vgroup? */
ED_pose_bone_select_tag_update(ob);
}
}
diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c
index e60270bc3f0..59e14f85c81 100644
--- a/source/blender/editors/armature/pose_slide.c
+++ b/source/blender/editors/armature/pose_slide.c
@@ -480,7 +480,7 @@ static void pose_slide_apply_props(tPoseSlideOp *pso,
float tval = (float)RNA_property_boolean_get(&ptr, prop);
pose_slide_apply_val(pso, fcu, pfl->ob, &tval);
RNA_property_boolean_set(
- &ptr, prop, (int)tval); // XXX: do we need threshold clamping here?
+ &ptr, prop, (int)tval); /* XXX: do we need threshold clamping here? */
break;
}
case PROP_ENUM: {
@@ -681,14 +681,14 @@ static void pose_slide_rest_pose_apply(bContext *C, tPoseSlideOp *pso)
if (ELEM(pso->channels, PS_TFM_ALL, PS_TFM_BBONE_SHAPE) && (pchan->flag & POSE_BBONE_SHAPE)) {
/* bbone properties - they all start a "bbone_" prefix */
- // TODO Not implemented
+ /* TODO Not implemented */
// pose_slide_apply_props(pso, pfl, "bbone_");
}
if (ELEM(pso->channels, PS_TFM_ALL, PS_TFM_PROPS) && (pfl->oldprops)) {
/* Not strictly a transform, but custom properties contribute
* to the pose produced in many rigs (e.g. the facial rigs used in Sintel). */
- // TODO Not implemented
+ /* TODO Not implemented */
// pose_slide_apply_props(pso, pfl, "[\""); /* dummy " for texteditor bugs */
}
}
@@ -790,7 +790,7 @@ static void pose_slide_reset(tPoseSlideOp *pso)
/* ------------------------------------ */
/* draw percentage indicator in header */
-// TODO: Include hints about locks here...
+/* TODO: Include hints about locks here... */
static void pose_slide_draw_status(tPoseSlideOp *pso)
{
char status_str[UI_MAX_DRAW_STR];
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c
index b09015096a6..d3f11c5a16f 100644
--- a/source/blender/editors/armature/pose_transform.c
+++ b/source/blender/editors/armature/pose_transform.c
@@ -385,7 +385,7 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op)
Main *bmain = CTX_data_main(C);
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
Scene *scene = CTX_data_scene(C);
- // must be active object, not edit-object
+ /* must be active object, not edit-object */
Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
const Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
bArmature *arm = BKE_armature_from_object(ob);
@@ -688,8 +688,8 @@ static bPoseChannel *pose_bone_do_paste(Object *ob,
pchan->curve_in_x *= -1;
pchan->curve_out_x *= -1;
- pchan->roll1 *= -1; // XXX?
- pchan->roll2 *= -1; // XXX?
+ pchan->roll1 *= -1; /* XXX? */
+ pchan->roll2 *= -1; /* XXX? */
/* has to be done as eulers... */
if (pchan->rotmode > 0) {
@@ -1108,7 +1108,7 @@ static int pose_clear_transform_generic_exec(bContext *C,
ViewLayer *view_layer = CTX_data_view_layer(C);
View3D *v3d = CTX_wm_view3d(C);
FOREACH_OBJECT_IN_MODE_BEGIN (view_layer, v3d, OB_ARMATURE, OB_MODE_POSE, ob_iter) {
- // XXX: UGLY HACK (for autokey + clear transforms)
+ /* XXX: UGLY HACK (for autokey + clear transforms) */
Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob_iter);
ListBase dsources = {NULL, NULL};
bool changed = false;
diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c
index e2038bdd2a3..2a6dc9f406b 100644
--- a/source/blender/editors/armature/pose_utils.c
+++ b/source/blender/editors/armature/pose_utils.c
@@ -332,7 +332,7 @@ void poseAnim_mapping_autoKeyframe(bContext *C, Scene *scene, ListBase *pfLinks,
FOREACH_OBJECT_IN_MODE_BEGIN (view_layer, v3d, OB_ARMATURE, OB_MODE_POSE, ob) {
if (ob->id.tag & LIB_TAG_DOIT) {
if (ob->pose->avs.path_bakeflag & MOTIONPATH_BAKE_HAS_PATHS) {
- // ED_pose_clear_paths(C, ob); // XXX for now, don't need to clear
+ // ED_pose_clear_paths(C, ob); /* XXX for now, don't need to clear. */
/* TODO(sergey): Should ensure we can use more narrow update range here. */
ED_pose_recalculate_paths(C, scene, ob, POSE_PATH_CALC_RANGE_FULL);
}
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 15a147b6b86..85d86849140 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1349,7 +1349,7 @@ void ED_curve_editnurb_make(Object *obedit)
nu = cu->nurb.first;
while (nu) {
newnu = BKE_nurb_duplicate(nu);
- BKE_nurb_test_2d(newnu); // after join, or any other creation of curve
+ BKE_nurb_test_2d(newnu); /* after join, or any other creation of curve */
BLI_addtail(&editnurb->nurbs, newnu);
nu = nu->next;
}
@@ -7001,7 +7001,7 @@ int ED_curve_join_objects_exec(bContext *C, wmOperator *op)
BKE_curve_curve_dimension_update(cu);
}
- DEG_relations_tag_update(bmain); // because we removed object(s), call before editmode!
+ DEG_relations_tag_update(bmain); /* because we removed object(s), call before editmode! */
DEG_id_tag_update(&ob_active->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c
index 4d72e90b89b..684666aba13 100644
--- a/source/blender/editors/curve/editcurve_add.c
+++ b/source/blender/editors/curve/editcurve_add.c
@@ -127,7 +127,7 @@ Nurb *ED_curve_add_nurbs_primitive(
float fac;
int a, b;
const float grid = 1.0f;
- const int cutype = (type & CU_TYPE); // poly, bezier, nurbs, etc
+ const int cutype = (type & CU_TYPE); /* poly, bezier, nurbs, etc */
const int stype = (type & CU_PRIMITIVE);
unit_m4(umat);
diff --git a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
index 13f3903f0b2..eb40500d011 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
@@ -386,4 +386,4 @@ void ED_gizmotypes_button_2d(void)
WM_gizmotype_append(GIZMO_GT_button_2d);
}
-/** \} */ // Button Gizmo API
+/** \} */ /* Button Gizmo API */
diff --git a/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c
index 2cd73f613c1..f7ab1732457 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c
@@ -92,7 +92,7 @@ static void gizmo_calc_rect_view_scale(const wmGizmo *gz, const float dims[3], f
static void gizmo_calc_rect_view_margin(const wmGizmo *gz, const float dims[3], float margin[3])
{
const float handle_size = 0.15f;
- // XXX, the scale isn't taking offset into account, we need to calculate scale per handle!
+ /* XXX, the scale isn't taking offset into account, we need to calculate scale per handle! */
// handle_size *= gz->scale_final;
float scale_xyz[3];
diff --git a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
index ad7036f4460..011563eece5 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c
@@ -481,4 +481,4 @@ void ED_gizmotypes_move_3d(void)
WM_gizmotype_append(GIZMO_GT_move_3d);
}
-/** \} */ // Move Gizmo API
+/** \} */ /* Move Gizmo API */
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c
index b6cbbe7712b..fe1c5efc747 100644
--- a/source/blender/editors/gpencil/annotate_draw.c
+++ b/source/blender/editors/gpencil/annotate_draw.c
@@ -744,8 +744,8 @@ static void annotation_draw_data(
annotation_draw_data_layers(gpd, offsx, offsy, winx, winy, cfra, dflag);
/* turn off alpha blending, then smooth lines */
- GPU_blend(GPU_BLEND_NONE); // alpha blending
- GPU_line_smooth(false); // smooth lines
+ GPU_blend(GPU_BLEND_NONE); /* alpha blending */
+ GPU_line_smooth(false); /* smooth lines */
GPU_depth_mask(prev_depth_mask);
}
diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c
index 897a6e9653d..d4f3c4d7f5e 100644
--- a/source/blender/editors/gpencil/editaction_gpencil.c
+++ b/source/blender/editors/gpencil/editaction_gpencil.c
@@ -443,7 +443,7 @@ bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, const short offset_mode)
}
/* filter data */
- // TODO: try doing it with selection, then without selection imits
+ /* TODO: try doing it with selection, then without selection limits. */
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL |
ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
@@ -649,7 +649,7 @@ static bool gpencil_frame_mirror_marker(bGPDframe *gpf, Scene *scene)
}
/* mirror selected gp-frames on... */
-// TODO: mirror over a specific time
+/* TODO: mirror over a specific time */
void ED_gpencil_layer_mirror_frames(bGPDlayer *gpl, Scene *scene, short mode)
{
switch (mode) {
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index b7bf1861ff3..fa7fe27635a 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -1441,7 +1441,7 @@ static int gpencil_strokes_copy_exec(bContext *C, wmOperator *op)
}
/* updates (to ensure operator buttons are refreshed, when used via hotkeys) */
- WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL); // XXX?
+ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL); /* XXX? */
/* done */
return OPERATOR_FINISHED;
@@ -1749,11 +1749,11 @@ void GPENCIL_OT_move_to_layer(wmOperatorType *ot)
ot->name = "Move Strokes to Layer";
ot->idname = "GPENCIL_OT_move_to_layer";
ot->description =
- "Move selected strokes to another layer"; // XXX: allow moving individual points too?
+ "Move selected strokes to another layer"; /* XXX: allow moving individual points too? */
/* callbacks */
ot->exec = gpencil_move_to_layer_exec;
- ot->poll = gpencil_stroke_edit_poll; // XXX?
+ ot->poll = gpencil_stroke_edit_poll; /* XXX? */
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -2766,7 +2766,7 @@ static int gpencil_snap_to_grid(bContext *C, wmOperator *UNUSED(op))
continue;
}
- // TODO: if entire stroke is selected, offset entire stroke by same amount?
+ /* TODO: if entire stroke is selected, offset entire stroke by same amount? */
for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
/* only if point is selected */
if (pt->flag & GP_SPOINT_SELECT) {
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 247cc218c2f..a11397bd0bb 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -1269,7 +1269,7 @@ static void gpencil_stroke_from_buffer(tGPDfill *tgpf)
for (int i = 0; i < gps->totpoints; i++) {
BKE_gpencil_stroke_smooth(gps, i, smoothfac - reduce);
}
- reduce += 0.25f; // reduce the factor
+ reduce += 0.25f; /* reduce the factor */
}
/* if axis locked, reproject to plane locked */
diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
index d37e393ac77..1d500223ab8 100644
--- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c
+++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
@@ -760,7 +760,7 @@ static bool gpencil_brush_twist_apply(tGP_BrushEditData *gso,
float rmat[3][3];
/* Express position of point relative to cursor, ready to rotate */
- // XXX: There is still some offset here, but it's close to working as expected...
+ /* XXX: There is still some offset here, but it's close to working as expected. */
vec[0] = (float)(co[0] - gso->mval[0]);
vec[1] = (float)(co[1] - gso->mval[1]);
@@ -778,7 +778,7 @@ static bool gpencil_brush_twist_apply(tGP_BrushEditData *gso,
UI_view2d_region_to_view(v2d, vec[0], vec[1], &pt->x, &pt->y);
}
else {
- // XXX
+ /* XXX */
copy_v2_v2(&pt->x, vec);
}
}
@@ -2125,7 +2125,7 @@ void GPENCIL_OT_sculpt_paint(wmOperatorType *ot)
/* identifiers */
ot->name = "Stroke Sculpt";
ot->idname = "GPENCIL_OT_sculpt_paint";
- ot->description = "Apply tweaks to strokes by painting over the strokes"; // XXX
+ ot->description = "Apply tweaks to strokes by painting over the strokes"; /* XXX */
/* api callbacks */
ot->exec = gpencil_sculpt_brush_exec;
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 8b77709bacb..5a45afe9c5a 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -335,7 +335,7 @@ bool ED_gpencil_has_keyframe_v3d(Scene *UNUSED(scene), Object *ob, int cfra)
bGPDlayer *gpl = BKE_gpencil_layer_active_get(ob->data);
if (gpl) {
if (gpl->actframe) {
- // XXX: assumes that frame has been fetched already
+ /* XXX: assumes that frame has been fetched already */
return (gpl->actframe->framenum == cfra);
}
/* XXX: disabled as could be too much of a penalty */
@@ -2531,7 +2531,7 @@ void ED_gpencil_select_toggle_all(bContext *C, int action)
CTX_DATA_BEGIN (C, bGPDstroke *, gps, editable_gpencil_strokes) {
if (gps->flag & GP_STROKE_SELECT) {
action = SEL_DESELECT;
- break; // XXX: this only gets out of the inner loop...
+ break; /* XXX: this only gets out of the inner loop. */
}
}
CTX_DATA_END;
@@ -2584,9 +2584,11 @@ void ED_gpencil_select_toggle_all(bContext *C, int action)
case SEL_SELECT:
pt->flag |= GP_SPOINT_SELECT;
break;
- // case SEL_DESELECT:
- // pt->flag &= ~GP_SPOINT_SELECT;
- // break;
+#if 0
+ case SEL_DESELECT:
+ pt->flag &= ~GP_SPOINT_SELECT;
+ break;
+#endif
case SEL_INVERT:
pt->flag ^= GP_SPOINT_SELECT;
break;
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 36990414e6d..04f6932d671 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -332,7 +332,7 @@ typedef enum eAnimFilter_Flags {
} eAnimFilter_Flags;
/* ---------- Flag Checking Macros ------------ */
-// xxx check on all of these flags again...
+/* XXX check on all of these flags again. */
/* Dopesheet only */
/* 'Scene' channels */
@@ -507,7 +507,7 @@ typedef enum eAnimChannels_SetFlag {
ACHANNEL_SETFLAG_ADD = 1,
/** on->off, off->on */
ACHANNEL_SETFLAG_INVERT = 2,
- /** some on -> all off // all on */
+ /** some on -> all off / all on */
ACHANNEL_SETFLAG_TOGGLE = 3,
} eAnimChannels_SetFlag;
@@ -730,7 +730,7 @@ void ANIM_nla_mapping_apply_fcurve(struct AnimData *adt,
/* ..... */
/* Perform auto-blending/extend refreshes after some operations */
-// NOTE: defined in space_nla/nla_edit.c, not in animation/
+/* NOTE: defined in space_nla/nla_edit.c, not in animation/ */
void ED_nla_postop_refresh(bAnimContext *ac);
/* ------------- Unit Conversion Mappings ------------- */
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h
index 09ab72efaaf..d99ecf2fd56 100644
--- a/source/blender/editors/include/UI_icons.h
+++ b/source/blender/editors/include/UI_icons.h
@@ -160,7 +160,7 @@ DEF_ICON_BLANK(157)
DEF_ICON_BLANK(158)
DEF_ICON_BLANK(159)
DEF_ICON_BLANK(160)
-DEF_ICON(BLANK1) // Not actually blank - this is used all over the place
+DEF_ICON(BLANK1) /* Not actually blank - this is used all over the place */
DEF_ICON(FAKE_USER_OFF)
DEF_ICON(FAKE_USER_ON)
/* EDITORS */
@@ -192,7 +192,7 @@ DEF_ICON(UV)
DEF_ICON_BLANK(190)
/* MODES */
-DEF_ICON(OBJECT_DATAMODE) // XXX fix this up
+DEF_ICON(OBJECT_DATAMODE) /* XXX fix this up */
DEF_ICON(EDITMODE_HLT)
DEF_ICON(UV_DATA)
DEF_ICON(VPAINT_HLT)
@@ -873,7 +873,7 @@ DEF_ICON(SEQ_SPLITVIEW)
DEF_ICON(SEQ_STRIP_META)
DEF_ICON(SEQ_STRIP_DUPLICATE)
DEF_ICON_BLANK(872)
-DEF_ICON(IMAGE_RGB) // XXX CHANGE TO STRAIGHT ALPHA, Z ETC
+DEF_ICON(IMAGE_RGB) /* XXX CHANGE TO STRAIGHT ALPHA, Z ETC */
DEF_ICON(IMAGE_RGB_ALPHA)
DEF_ICON(IMAGE_ALPHA)
DEF_ICON(IMAGE_ZDEPTH)
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index a7b87d38472..f597bb307db 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -50,7 +50,7 @@ typedef enum ThemeColorID {
TH_REDALERT,
TH_THEMEUI,
- // common colors among spaces
+ /* Common colors among spaces. */
TH_BACK,
/** Use when 'TH_SHOW_BACK_GRAD' is set (the lower, darker color). */
@@ -358,92 +358,92 @@ struct bThemeState {
int spacetype, regionid;
};
-// THE CODERS API FOR THEMES:
+/* THE CODERS API FOR THEMES: */
-// returns one value, not scaled
+/* returns one value, not scaled */
float UI_GetThemeValuef(int colorid);
int UI_GetThemeValue(int colorid);
float UI_GetThemeValueTypef(int colorid, int spacetype);
int UI_GetThemeValueType(int colorid, int spacetype);
-// get three color values, scaled to 0.0-1.0 range
+/* get three color values, scaled to 0.0-1.0 range */
void UI_GetThemeColor3fv(int colorid, float col[3]);
void UI_GetThemeColorBlend3ubv(int colorid1, int colorid2, float fac, unsigned char col[3]);
void UI_GetThemeColorBlend3f(int colorid1, int colorid2, float fac, float r_col[3]);
void UI_GetThemeColorBlend4f(int colorid1, int colorid2, float fac, float r_col[4]);
-// get the color, range 0.0-1.0, complete with shading offset
+/* get the color, range 0.0-1.0, complete with shading offset */
void UI_GetThemeColorShade3fv(int colorid, int offset, float col[3]);
void UI_GetThemeColorShade3ubv(int colorid, int offset, unsigned char col[3]);
void UI_GetThemeColorShade4ubv(int colorid, int offset, unsigned char col[4]);
-// get three color values, range 0-255,
-// complete with shading offset for the RGB components and blending.
+/* get three color values, range 0-255,
+ * complete with shading offset for the RGB components and blending. */
void UI_GetThemeColorBlendShade3ubv(
int colorid1, int colorid2, float fac, int offset, unsigned char col[3]);
-// get four color values, scaled to 0.0-1.0 range
+/* get four color values, scaled to 0.0-1.0 range */
void UI_GetThemeColor4fv(int colorid, float col[4]);
/* get four color values from specified space type, scaled to 0.0-1.0 range */
void UI_GetThemeColorType4fv(int colorid, int spacetype, float col[4]);
-// get four color values, range 0.0-1.0, complete with shading offset for the RGB components
+/* get four color values, range 0.0-1.0, complete with shading offset for the RGB components */
void UI_GetThemeColorShade4fv(int colorid, int offset, float col[4]);
void UI_GetThemeColorShadeAlpha4fv(int colorid, int coloffset, int alphaoffset, float col[4]);
-// get four color values ranged between 0 and 255; includes the alpha channel
+/* get four color values ranged between 0 and 255; includes the alpha channel */
void UI_GetThemeColorShadeAlpha4ubv(int colorid,
int coloffset,
int alphaoffset,
unsigned char col[4]);
-// get four color values, range 0.0-1.0,
-// complete with shading offset for the RGB components and blending.
+/* get four color values, range 0.0-1.0,
+ * complete with shading offset for the RGB components and blending. */
void UI_GetThemeColorBlendShade3fv(
int colorid1, int colorid2, float fac, int offset, float col[3]);
void UI_GetThemeColorBlendShade4fv(
int colorid1, int colorid2, float fac, int offset, float col[4]);
-// get the 3 or 4 byte values
+/* get the 3 or 4 byte values */
void UI_GetThemeColor3ubv(int colorid, unsigned char col[3]);
void UI_GetThemeColor4ubv(int colorid, unsigned char col[4]);
-// get a theme color from specified space type
+/* get a theme color from specified space type */
void UI_GetThemeColorType3fv(int colorid, int spacetype, float col[3]);
void UI_GetThemeColorType3ubv(int colorid, int spacetype, unsigned char col[3]);
void UI_GetThemeColorType4ubv(int colorid, int spacetype, unsigned char col[4]);
-// get theme color for coloring monochrome icons
+/* get theme color for coloring monochrome icons */
bool UI_GetIconThemeColor4ubv(int colorid, unsigned char col[4]);
-// shade a 3 byte color (same as UI_GetColorPtrBlendShade3ubv with 0.0 factor)
+/* shade a 3 byte color (same as UI_GetColorPtrBlendShade3ubv with 0.0 factor) */
void UI_GetColorPtrShade3ubv(const unsigned char cp1[3], unsigned char col[3], int offset);
-// get a 3 byte color, blended and shaded between two other char color pointers
+/* get a 3 byte color, blended and shaded between two other char color pointers */
void UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3],
const unsigned char cp2[3],
unsigned char col[3],
float fac,
int offset);
-// sets the font color
-// (for anything fancy use UI_GetThemeColor[Fancy] then BLF_color)
+/* sets the font color
+ * (for anything fancy use UI_GetThemeColor[Fancy] then BLF_color) */
void UI_FontThemeColor(int fontid, int colorid);
-// clear the framebuffer using the input colorid
+/* clear the framebuffer using the input colorid */
void UI_ThemeClearColor(int colorid);
-// internal (blender) usage only, for init and set active
+/* internal (blender) usage only, for init and set active */
void UI_SetTheme(int spacetype, int regionid);
-// get current theme
+/* get current theme */
struct bTheme *UI_GetTheme(void);
void UI_Theme_Store(struct bThemeState *theme_state);
void UI_Theme_Restore(struct bThemeState *theme_state);
-// return shadow width outside menus and popups */
+/* return shadow width outside menus and popups */
int UI_ThemeMenuShadowWidth(void);
/* only for buttons in theme editor! */
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 98e76114956..e2e19e9fcd4 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -2628,7 +2628,7 @@ static void ui_get_but_string_unit(
int precision;
if (unit->scale_length < 0.0001f) {
- unit->scale_length = 1.0f; // XXX do_versions
+ unit->scale_length = 1.0f; /* XXX do_versions */
}
/* Use precision override? */
@@ -3663,7 +3663,7 @@ static void ui_but_update_ex(uiBut *but, const bool validate)
}
/* safety is 4 to enable small number buttons (like 'users') */
- // okwidth = -4 + (BLI_rcti_size_x(&but->rect)); // UNUSED
+ // okwidth = -4 + (BLI_rcti_size_x(&but->rect)); /* UNUSED */
/* name: */
switch (but->type) {
@@ -3805,7 +3805,7 @@ void UI_block_align_begin(uiBlock *block)
block->flag |= UI_BUT_ALIGN_DOWN;
block->alignnr++;
- /* buttons declared after this call will get this align nr */ // XXX flag?
+ /* buttons declared after this call will get this align nr */ /* XXX flag? */
}
void UI_block_align_end(uiBlock *block)
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index bcb8a10be02..dec1710ac69 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -783,7 +783,7 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(region),
GPU_blend(GPU_BLEND_NONE);
# if 0
- // restore scissortest
+ /* restore scissortest */
GPU_scissor(scissor[0], scissor[1], scissor[2], scissor[3]);
# endif
diff --git a/source/blender/editors/interface/interface_eyedropper_driver.c b/source/blender/editors/interface/interface_eyedropper_driver.c
index 29c0368219b..8762a4819d4 100644
--- a/source/blender/editors/interface/interface_eyedropper_driver.c
+++ b/source/blender/editors/interface/interface_eyedropper_driver.c
@@ -58,7 +58,7 @@ typedef struct DriverDropper {
int index;
bool is_undo;
- // TODO: new target?
+ /* TODO: new target? */
} DriverDropper;
static bool driverdropper_init(bContext *C, wmOperator *op)
@@ -130,7 +130,7 @@ static void driverdropper_sample(bContext *C, wmOperator *op, const wmEvent *eve
UI_context_update_anim_flag(C);
DEG_relations_tag_update(CTX_data_main(C));
DEG_id_tag_update(ddr->ptr.owner_id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
- WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); // XXX
+ WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); /* XXX */
}
}
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 8448acaaceb..2c1b6d9f9d5 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -2385,7 +2385,7 @@ static void ui_but_paste_numeric_array(bContext *C,
{
const int array_length = get_but_property_array_length(but);
if (array_length > 4) {
- // not supported for now
+ /* not supported for now */
return;
}
@@ -5747,7 +5747,7 @@ static bool ui_numedit_but_UNITVEC(
}
else { /* outer circle */
- mrad = rad / sqrtf(mrad); // veclen
+ mrad = rad / sqrtf(mrad); /* veclen */
dx *= (2.0f * mrad - 1.0f);
dy *= (2.0f * mrad - 1.0f);
@@ -6371,7 +6371,7 @@ static bool ui_numedit_but_HSVCIRCLE(uiBut *but,
/* exception, when using color wheel in 'locked' value state:
* allow choosing a hue for black values, by giving a tiny increment */
if (cpicker->use_color_lock) {
- if (U.color_picker_type == USER_CP_CIRCLE_HSV) { // lock
+ if (U.color_picker_type == USER_CP_CIRCLE_HSV) { /* lock */
if (hsv[2] == 0.f) {
hsv[2] = 0.0001f;
}
@@ -6474,7 +6474,7 @@ static void ui_ndofedit_but_HSVCIRCLE(uiBut *but,
/* exception, when using color wheel in 'locked' value state:
* allow choosing a hue for black values, by giving a tiny increment */
if (cpicker->use_color_lock) {
- if (U.color_picker_type == USER_CP_CIRCLE_HSV) { // lock
+ if (U.color_picker_type == USER_CP_CIRCLE_HSV) { /* lock */
if (hsv[2] == 0.f) {
hsv[2] = 0.0001f;
}
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index b89f7a60ae1..fbe61a23d11 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -771,7 +771,7 @@ static ImBuf *create_mono_icon_with_border(ImBuf *buf,
const int asy = MAX2(by - blur_size, 0);
const int aey = MIN2(by + blur_size + 1, icon_height);
- // blur alpha channel
+ /* blur alpha channel */
const int write_offset = by * (ICON_GRID_W + 2 * ICON_MONO_BORDER_OUTSET) + bx;
float alpha_accum = 0.0;
uint alpha_samples = 0;
@@ -908,7 +908,7 @@ void UI_icons_reload_internal_textures(void)
static void init_internal_icons(void)
{
-# if 0 // temp disabled
+# if 0 /* temp disabled */
if ((btheme != NULL) && btheme->tui.iconfile[0]) {
char *icondir = BKE_appdir_folder_id(BLENDER_DATAFILES, "icons");
char iconfilestr[FILE_MAX];
@@ -1299,7 +1299,7 @@ static void ui_studiolight_free_function(StudioLight *sl, void *data)
return;
}
- // get icons_id, get icons and kill wm jobs
+ /* get icons_id, get icons and kill wm jobs */
if (sl->icon_id_radiance) {
ui_studiolight_kill_icon_preview_job(wm, sl->icon_id_radiance);
}
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 6b11e727b66..89cd17319bd 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -98,7 +98,8 @@
#include "PIL_time.h"
-// #define USE_OP_RESET_BUT // we may want to make this optional, disable for now.
+/* we may want to make this optional, disable for now. */
+// #define USE_OP_RESET_BUT
/* defines for templateID/TemplateSearch */
#define TEMPLATE_SEARCH_TEXTBUT_WIDTH (UI_UNIT_X * 6)
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 3d98688dc04..68b804f5b28 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -4199,7 +4199,7 @@ static void widget_tab(uiWidgetColors *wcol, rcti *rect, int state, int roundbox
/* Draw shaded outline - Disabled for now,
* seems incorrect and also looks nicer without it imho ;) */
- //#define USE_TAB_SHADED_HIGHLIGHT
+ // #define USE_TAB_SHADED_HIGHLIGHT
uiWidgetBase wtb;
uchar theme_col_tab_highlight[3];
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index dddd6446c0e..f115618c13b 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -402,7 +402,7 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
* Ensure View2D rects remain in a viable configuration
* 'cur' is not allowed to be: larger than max, smaller than min, or outside of 'tot'
*/
-// XXX pre2.5 -> this used to be called test_view2d()
+/* XXX pre2.5 -> this used to be called test_view2d() */
static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize)
{
float totwidth, totheight, curwidth, curheight, width, height;
@@ -994,7 +994,7 @@ void UI_view2d_totRect_set_resize(View2D *v2d, int width, int height, bool resiz
printf("Error: View2D totRect set exiting: v2d=%p width=%d height=%d\n",
(void *)v2d,
width,
- height); // XXX temp debug info
+ height); /* XXX temp debug info */
}
return;
}
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 38530fc4b5c..e4a7ad0d635 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -1122,7 +1122,7 @@ static void view_zoomdrag_apply(bContext *C, wmOperator *op)
}
/* continuous zoom shouldn't move that fast... */
- if (U.viewzoom == USER_ZOOM_CONT) { // XXX store this setting as RNA prop?
+ if (U.viewzoom == USER_ZOOM_CONT) { /* XXX store this setting as RNA prop? */
const double time = PIL_check_seconds_timer();
const float time_step = (float)(time - vzd->timer_lastdraw);
@@ -1406,7 +1406,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, const wmEvent *event
* - Continuous zoom only depends on distance of mouse
* to starting point to determine rate of change.
*/
- if (U.viewzoom != USER_ZOOM_CONT) { // XXX store this setting as RNA prop?
+ if (U.viewzoom != USER_ZOOM_CONT) { /* XXX store this setting as RNA prop? */
vzd->lastx = event->x;
vzd->lasty = event->y;
}
diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c
index b91b3b92947..54ef5e6b8c5 100644
--- a/source/blender/editors/io/io_collada.c
+++ b/source/blender/editors/io/io_collada.c
@@ -222,12 +222,12 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
export_settings.keep_smooth_curves = keep_smooth_curves != 0;
if (export_animation_type != BC_ANIMATION_EXPORT_SAMPLES) {
- // When curves are exported then we can not export as matrix
+ /* When curves are exported then we can not export as matrix. */
export_settings.animation_transformation_type = BC_TRANSFORMATION_TYPE_DECOMPOSED;
}
if (export_settings.animation_transformation_type != BC_TRANSFORMATION_TYPE_DECOMPOSED) {
- // Can not export smooth curves when Matrix export is enabled.
+ /* Can not export smooth curves when Matrix export is enabled. */
export_settings.keep_smooth_curves = false;
}
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index b349def4637..b7ee50a9461 100644
--- a/source/blender/editors/mesh/editface.c
+++ b/source/blender/editors/mesh/editface.c
@@ -433,7 +433,7 @@ bool paintface_mouse_select(
/* image window redraw */
paintface_flush_flags(C, ob, SELECT);
- ED_region_tag_redraw(CTX_wm_region(C)); // XXX - should redraw all 3D views
+ ED_region_tag_redraw(CTX_wm_region(C)); /* XXX - should redraw all 3D views */
return true;
}
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index 5ad1b5d67da..d5ddb7fc2c4 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -814,7 +814,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w
mul_m4_v3(vc.obedit->obmat, ofs); /* view space */
ED_view3d_win_to_3d_int(vc.v3d, vc.region, ofs, event->mval, ofs);
- mul_m4_v3(vc.obedit->imat, ofs); // back in object space
+ mul_m4_v3(vc.obedit->imat, ofs); /* back in object space */
sub_v3_v3(ofs, local_center);
@@ -865,7 +865,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w
copy_v3_v3(local_center, cursor);
ED_view3d_win_to_3d_int(vc.v3d, vc.region, local_center, event->mval, local_center);
- mul_m4_v3(vc.obedit->imat, local_center); // back in object space
+ mul_m4_v3(vc.obedit->imat, local_center); /* back in object space */
EDBM_op_init(vc.em, &bmop, op, "create_vert co=%v", local_center);
BMO_op_exec(vc.em->bm, &bmop);
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c
index 02bcf97c87f..d19e7799fbe 100644
--- a/source/blender/editors/mesh/editmesh_loopcut.c
+++ b/source/blender/editors/mesh/editmesh_loopcut.c
@@ -544,7 +544,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event)
switch (event->type) {
case EVT_RETKEY:
case EVT_PADENTER:
- case LEFTMOUSE: /* confirm */ // XXX hardcoded
+ case LEFTMOUSE: /* confirm */ /* XXX hardcoded */
if (event->val == KM_PRESS) {
return loopcut_finish(lcd, C, op);
}
@@ -552,7 +552,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event)
ED_region_tag_redraw(lcd->region);
handled = true;
break;
- case RIGHTMOUSE: /* abort */ // XXX hardcoded
+ case RIGHTMOUSE: /* abort */ /* XXX hardcoded */
ED_region_tag_redraw(lcd->region);
ringsel_exit(C, op);
ED_workspace_status_text(C, NULL);
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 860876f4dc2..0ec7ca52263 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -285,7 +285,7 @@ float ED_object_new_primitive_matrix(
return dia;
}
- // return 1.0f;
+ /* return 1.0f; */
}
/** \} */
@@ -3085,7 +3085,7 @@ static Base *object_add_duplicate_internal(Main *bmain,
/* 1) duplis should end up in same collection as the original
* 2) Rigid Body sim participants MUST always be part of a collection...
*/
- // XXX: is 2) really a good measure here?
+ /* XXX: is 2) really a good measure here? */
if (ob->rigidbody_object || ob->rigidbody_constraint) {
Collection *collection;
for (collection = bmain->collections.first; collection; collection = collection->id.next) {
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 9b8a50cfe89..0f05608b82f 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -242,7 +242,7 @@ static char *buildmenu_pyconstraints(Main *bmain, Text *con_text, int *pyconinde
}
#endif /* WITH_PYTHON */
-#if 0 // UNUSED, until pyconstraints are added back.
+#if 0 /* UNUSED, until pyconstraints are added back. */
/* this callback gets called when the 'refresh' button of a pyconstraint gets pressed */
static void update_pyconstraint_cb(void *arg1, void *arg2)
{
@@ -257,7 +257,7 @@ static void update_pyconstraint_cb(void *arg1, void *arg2)
}
# endif
}
-#endif // UNUSED
+#endif /* UNUSED */
/** \} */
@@ -1747,8 +1747,8 @@ void POSE_OT_constraints_clear(wmOperatorType *ot)
/* callbacks */
ot->exec = pose_constraints_clear_exec;
- ot->poll = ED_operator_posemode_exclusive; // XXX - do we want to ensure there are selected
- // bones too?
+ ot->poll = ED_operator_posemode_exclusive; /* XXX - do we want to ensure there are selected
+ * bones too? */
}
static int object_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op))
@@ -2333,7 +2333,7 @@ void POSE_OT_constraint_add_with_targets(wmOperatorType *ot)
* \note Only for pose-channels.
* \{ */
-// TODO: should these be here, or back in editors/armature/poseobject.c again?
+/* TODO: should these be here, or back in editors/armature/poseobject.c again? */
/* present menu with options + validation for targets to use */
static int pose_ik_add_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 69e734de8ee..0170e391708 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -24,7 +24,7 @@
#include <ctype.h>
#include <float.h>
#include <math.h>
-#include <stddef.h> //for offsetof
+#include <stddef.h> /* for offsetof */
#include <stdlib.h>
#include <string.h>
#include <time.h>
@@ -114,7 +114,7 @@
#include "WM_toolsystem.h"
#include "WM_types.h"
-#include "object_intern.h" // own include
+#include "object_intern.h" /* own include */
static CLG_LogRef LOG = {"ed.object.edit"};
diff --git a/source/blender/editors/object/object_remesh.c b/source/blender/editors/object/object_remesh.c
index a0cfdac1ac6..cc3230dff7b 100644
--- a/source/blender/editors/object/object_remesh.c
+++ b/source/blender/editors/object/object_remesh.c
@@ -86,7 +86,7 @@
#include "BLF_api.h"
-#include "object_intern.h" // own include
+#include "object_intern.h" /* own include */
/* TODO(sebpa): unstable, can lead to unrecoverable errors. */
// #define USE_MESH_CURVATURE
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 5dfbaf583f6..d3b9c64913d 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -661,7 +661,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
}
if (nr == OBJECT_SELECT_LINKED_IPO) {
- // XXX old animation system
+ /* XXX old animation system */
// if (ob->ipo == 0) return OPERATOR_CANCELLED;
// object_select_all_by_ipo(C, ob->ipo)
return OPERATOR_CANCELLED;
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index 19fac707575..1bb0246deb5 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -53,7 +53,7 @@
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
-#include "BLI_sys_types.h" // for intptr_t support
+#include "BLI_sys_types.h" /* for intptr_t support */
#include "ED_mesh.h"
#include "ED_object.h"
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index e2d043c3206..7d853745ad6 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -242,7 +242,7 @@ static void object_clear_rot(Object *ob, const bool clear_delta)
copy_v3_v3(ob->rot, eul);
}
}
- } // Duplicated in source/blender/editors/armature/editarmature.c
+ } /* Duplicated in source/blender/editors/armature/editarmature.c */
else {
if (ob->rotmode == ROT_MODE_QUAT) {
unit_qt(ob->quat);
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 9eedba29aae..0cf9fd7768d 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -202,9 +202,10 @@ ParticleEditSettings *PE_settings(Scene *scene)
static float pe_brush_size_get(const Scene *UNUSED(scene), ParticleBrushData *brush)
{
- // here we can enable unified brush size, needs more work...
- // UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
- // float size = (ups->flag & UNIFIED_PAINT_SIZE) ? ups->size : brush->size;
+#if 0 /* TODO: Here we can enable unified brush size, needs more work. */
+ UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
+ float size = (ups->flag & UNIFIED_PAINT_SIZE) ? ups->size : brush->size;
+#endif
return brush->size;
}
@@ -4560,7 +4561,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
(dx != 0 || dy != 0)) ||
bedit->first) {
PEData data = bedit->data;
- data.context = C; // TODO(mai): why isnt this set in bedit->data?
+ data.context = C; /* TODO(mai): why isnt this set in bedit->data? */
view3d_operator_needs_opengl(C);
selected = (short)count_selected_keys(scene, edit);
@@ -4783,7 +4784,7 @@ static void brush_edit_apply_event(bContext *C, wmOperator *op, const wmEvent *e
RNA_collection_add(op->ptr, "stroke", &itemptr);
RNA_float_set_array(&itemptr, "mouse", mouse);
- RNA_boolean_set(&itemptr, "pen_flip", event->shift != false); // XXX hardcoded
+ RNA_boolean_set(&itemptr, "pen_flip", event->shift != false); /* XXX hardcoded */
/* apply */
brush_edit_apply(C, op, &itemptr);
@@ -4807,7 +4808,7 @@ static int brush_edit_modal(bContext *C, wmOperator *op, const wmEvent *event)
switch (event->type) {
case LEFTMOUSE:
case MIDDLEMOUSE:
- case RIGHTMOUSE: // XXX hardcoded
+ case RIGHTMOUSE: /* XXX hardcoded */
if (event->val == KM_RELEASE) {
brush_edit_exit(op);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 26b5f7fb2af..32d2e39d6f6 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -60,7 +60,7 @@
#include "WM_types.h"
#include "manta_fluid_API.h"
-#include "physics_intern.h" // own include
+#include "physics_intern.h" /* own include */
#include "DNA_fluid_types.h"
#include "DNA_mesh_types.h"
diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c
index f6943c25063..eb154b97eb0 100644
--- a/source/blender/editors/physics/physics_ops.c
+++ b/source/blender/editors/physics/physics_ops.c
@@ -32,7 +32,7 @@
#include "ED_physics.h"
#include "ED_select_utils.h"
-#include "physics_intern.h" // own include
+#include "physics_intern.h" /* own include */
/***************************** particles ***********************************/
diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c
index b91385c502c..cb25363d2b2 100644
--- a/source/blender/editors/physics/rigidbody_object.c
+++ b/source/blender/editors/physics/rigidbody_object.c
@@ -531,7 +531,7 @@ void RIGIDBODY_OT_mass_calculate(wmOperatorType *ot)
ot->description = "Automatically calculate mass values for Rigid Body Objects based on volume";
/* callbacks */
- ot->invoke = WM_menu_invoke; // XXX
+ ot->invoke = WM_menu_invoke; /* XXX */
ot->exec = rigidbody_objects_calc_mass_exec;
ot->poll = ED_operator_rigidbody_active_poll;
diff --git a/source/blender/editors/physics/rigidbody_world.c b/source/blender/editors/physics/rigidbody_world.c
index 558a293ccbf..42f270874e3 100644
--- a/source/blender/editors/physics/rigidbody_world.c
+++ b/source/blender/editors/physics/rigidbody_world.c
@@ -180,7 +180,7 @@ static int rigidbody_world_export_invoke(bContext *C, wmOperator *op, const wmEv
return rigidbody_world_export_exec(C, op);
}
- // TODO: use the actual rigidbody world's name + .bullet instead of this temp crap
+ /* TODO: use the actual rigidbody world's name + .bullet instead of this temp crap */
RNA_string_set(op->ptr, "filepath", "rigidbodyworld_export.bullet");
WM_event_add_fileselect(C, op);
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 32bc1cff4a0..7ca711cd2b8 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -363,7 +363,7 @@ static int screen_render_exec(bContext *C, wmOperator *op)
RE_SetReports(re, NULL);
- // no redraw needed, we leave state as we entered it
+ /* No redraw needed, we leave state as we entered it. */
ED_update_for_newframe(mainp, CTX_data_depsgraph_pointer(C));
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_RESULT, scene);
@@ -386,7 +386,7 @@ static void make_renderinfo_string(const RenderStats *rs,
const char *error,
char *str)
{
- char info_time_str[32]; // used to be extern to header_info.c
+ char info_time_str[32]; /* used to be extern to header_info.c */
uintptr_t mem_in_use, peak_memory;
float megs_used_memory, megs_peak_memory;
char *spos = str;
@@ -526,7 +526,7 @@ static void render_image_update_pass_and_layer(RenderJob *rj, RenderResult *rr,
LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
if (area->spacetype == SPACE_IMAGE) {
SpaceImage *sima = area->spacedata.first;
- // area->spacedata might be empty when toggling fullscreen mode.
+ /* area->spacedata might be empty when toggling full-screen mode. */
if (sima != NULL && sima->image == rj->image) {
if (first_area == NULL) {
first_area = area;
@@ -944,9 +944,9 @@ static int screen_render_invoke(bContext *C, wmOperator *op, const wmEvent *even
* since sequence rendering can call that recursively... (peter) */
BKE_sequencer_cache_cleanup(scene);
- // store spare
- // get view3d layer, local layer, make this nice api call to render
- // store spare
+ /* store spare
+ * get view3d layer, local layer, make this nice api call to render
+ * store spare */
/* ensure at least 1 area shows result */
area = render_view_open(C, event->x, event->y, op->reports);
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index 80fa8082592..ed20d2895fc 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -90,8 +90,8 @@
# include "PIL_time.h"
#endif
-// TODO(sergey): Find better approximation of the scheduled frames.
-// For really highres renders it might fail still.
+/* TODO(sergey): Find better approximation of the scheduled frames.
+ * For really highres renders it might fail still. */
#define MAX_SCHEDULED_FRAMES 8
typedef struct OGLRender {
diff --git a/source/blender/editors/render/render_ops.c b/source/blender/editors/render/render_ops.c
index 8156f48343f..706249a3f8b 100644
--- a/source/blender/editors/render/render_ops.c
+++ b/source/blender/editors/render/render_ops.c
@@ -29,7 +29,7 @@
#include "WM_api.h"
-#include "render_intern.h" // own include
+#include "render_intern.h" /* own include */
/***************************** render ***********************************/
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 6369b7bad43..4afa45893f9 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -111,7 +111,7 @@ ImBuf *get_brush_icon(Brush *brush)
if (brush->flag & BRUSH_CUSTOM_ICON) {
if (brush->icon_filepath[0]) {
- // first use the path directly to try and load the file
+ /* First use the path directly to try and load the file. */
BLI_strncpy(path, brush->icon_filepath, sizeof(brush->icon_filepath));
BLI_path_abs(path, ID_BLEND_PATH_FROM_GLOBAL(&brush->id));
@@ -119,7 +119,7 @@ ImBuf *get_brush_icon(Brush *brush)
/* use default colorspaces for brushes */
brush->icon_imbuf = IMB_loadiffname(path, flags, NULL);
- // otherwise lets try to find it in other directories
+ /* otherwise lets try to find it in other directories */
if (!(brush->icon_imbuf)) {
folder = BKE_appdir_folder_id(BLENDER_DATAFILES, "brushicons");
@@ -881,7 +881,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
sce->display.render_aa = SCE_DISPLAY_AA_SAMPLES_8;
}
- /* callbacs are cleared on GetRender() */
+ /* Callbacks are cleared on GetRender(). */
if (ELEM(sp->pr_method, PR_BUTS_RENDER, PR_NODE_RENDER)) {
RE_display_update_cb(re, sp, shader_preview_update);
}
@@ -907,7 +907,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
/* handle results */
if (sp->pr_method == PR_ICON_RENDER) {
- // char *rct= (char *)(sp->pr_rect + 32*16 + 16);
+ // char *rct = (char *)(sp->pr_rect + 32 * 16 + 16);
if (sp->pr_rect) {
RE_ResultGet32(re, sp->pr_rect);
@@ -917,12 +917,14 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs
/* unassign the pointers, reset vars */
preview_prepare_scene(sp->bmain, sp->scene, NULL, GS(id->name), sp);
- /* XXX bad exception, end-exec is not being called in render, because it uses local main */
- // if (idtype == ID_TE) {
- // Tex *tex= (Tex *)id;
- // if (tex->use_nodes && tex->nodetree)
- // ntreeEndExecTree(tex->nodetree);
- // }
+ /* XXX bad exception, end-exec is not being called in render, because it uses local main. */
+#if 0
+ if (idtype == ID_TE) {
+ Tex *tex = (Tex *)id;
+ if (tex->use_nodes && tex->nodetree)
+ ntreeEndExecTree(tex->nodetree);
+ }
+#endif
}
/* runs inside thread for material and icons */
@@ -1083,7 +1085,7 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat
int source = deferred_data[0];
char *path = &deferred_data[1];
- // printf("generating deferred %d×%d preview for %s\n", sp->sizex, sp->sizey, path);
+ // printf("generating deferred %d×%d preview for %s\n", sp->sizex, sp->sizey, path);
thumb = IMB_thumb_manage(path, THB_LARGE, source);
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 6fed806c8af..60e5c2081fd 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -94,7 +94,7 @@
#include "engines/eevee/eevee_lightcache.h"
-#include "render_intern.h" // own include
+#include "render_intern.h" /* own include */
static bool object_materials_supported_poll_ex(bContext *C, const Object *ob);
@@ -1092,7 +1092,7 @@ static int light_cache_bake_exec(bContext *C, wmOperator *op)
EEVEE_lightbake_job(rj, &stop, &do_update, &progress);
EEVEE_lightbake_job_data_free(rj);
- // no redraw needed, we leave state as we entered it
+ /* No redraw needed, we leave state as we entered it. */
ED_update_for_newframe(bmain, CTX_data_depsgraph_pointer(C));
WM_event_add_notifier(C, NC_SCENE | NA_EDITED, scene);
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 1ba32d3386d..ffb2d3991b7 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -64,7 +64,7 @@
#include "WM_api.h"
-#include "render_intern.h" // own include
+#include "render_intern.h" /* own include */
/***************************** Render Engines ********************************/
diff --git a/source/blender/editors/screen/screen_geometry.c b/source/blender/editors/screen/screen_geometry.c
index 29e5f398ec3..50bfd6619e6 100644
--- a/source/blender/editors/screen/screen_geometry.c
+++ b/source/blender/editors/screen/screen_geometry.c
@@ -318,7 +318,7 @@ short screen_geom_find_area_split_point(const ScrArea *area,
const short area_min_y = ED_area_headersize();
int area_min;
- // area big enough?
+ /* area big enough? */
if ((dir == 'v') && (cur_area_width <= 2 * area_min_x)) {
return 0;
}
@@ -326,7 +326,7 @@ short screen_geom_find_area_split_point(const ScrArea *area,
return 0;
}
- // to be sure
+ /* to be sure */
CLAMP(fac, 0.0f, 1.0f);
if (dir == 'h') {
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 3ac2b65f97a..fe16611a6eb 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -882,7 +882,7 @@ static int grab_clone_modal(bContext *C, wmOperator *op, const wmEvent *event)
switch (event->type) {
case LEFTMOUSE:
case MIDDLEMOUSE:
- case RIGHTMOUSE: // XXX hardcoded
+ case RIGHTMOUSE: /* XXX hardcoded */
MEM_freeN(op->customdata);
return OPERATOR_FINISHED;
case MOUSEMOVE:
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 15ecaec5657..75f1e63ebb3 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -3054,9 +3054,9 @@ static void project_paint_face_init(const ProjPaintState *ps,
lt_uv_pxoffset[2][1] = lt_tri_uv[2][1] - yhalfpx;
{
- uv1co = lt_uv_pxoffset[0]; // was lt_tri_uv[i1];
- uv2co = lt_uv_pxoffset[1]; // was lt_tri_uv[i2];
- uv3co = lt_uv_pxoffset[2]; // was lt_tri_uv[i3];
+ uv1co = lt_uv_pxoffset[0]; /* was lt_tri_uv[i1]; */
+ uv2co = lt_uv_pxoffset[1]; /* was lt_tri_uv[i2]; */
+ uv3co = lt_uv_pxoffset[2]; /* was lt_tri_uv[i3]; */
v1coSS = ps->screenCoords[lt_vtri[0]];
v2coSS = ps->screenCoords[lt_vtri[1]];
@@ -3414,7 +3414,7 @@ static void project_paint_face_init(const ProjPaintState *ps,
}
#else
UNUSED_VARS(vCo, threaded);
-#endif // PROJ_DEBUG_NOSEAMBLEED
+#endif /* PROJ_DEBUG_NOSEAMBLEED */
}
/**
@@ -4221,7 +4221,7 @@ static bool project_paint_winclip(const ProjPaintState *ps, const ProjPaintFaceC
(coSS->v1[1] > ps->screenMax[1] && coSS->v2[1] > ps->screenMax[1] &&
coSS->v3[1] > ps->screenMax[1])));
}
-#endif // PROJ_DEBUG_WINCLIP
+#endif /* PROJ_DEBUG_WINCLIP */
typedef struct PrepareImageEntry {
struct PrepareImageEntry *next, *prev;
@@ -4719,7 +4719,12 @@ static bool project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2])
const float radius = ps->brush_size;
/* so we don't have a bucket bounds that is way too small to paint into */
- // if (radius < 1.0f) radius = 1.0f; // this doesn't work yet :/
+#if 0
+ /* This doesn't work yet. */
+ if (radius < 1.0f) {
+ radius = 1.0f;
+ }
+#endif
min_brush[0] = mval_f[0] - radius;
min_brush[1] = mval_f[1] - radius;
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 9bf1911aee8..d5745caa66a 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -57,7 +57,7 @@
#include "sculpt_intern.h"
#include <string.h>
-//#include <stdio.h>
+// #include <stdio.h>
#include <stddef.h>
/* Brush operators */
@@ -144,7 +144,7 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op)
float scalar = RNA_float_get(op->ptr, "scalar");
if (brush) {
- // pixel radius
+ /* pixel radius */
{
const int old_size = BKE_brush_size_get(scene, brush);
int size = (int)(scalar * old_size);
@@ -161,11 +161,11 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op)
BKE_brush_size_set(scene, brush, size);
}
- // unprojected radius
+ /* unprojected radius */
{
float unprojected_radius = scalar * BKE_brush_unprojected_radius_get(scene, brush);
- if (unprojected_radius < 0.001f) { // XXX magic number
+ if (unprojected_radius < 0.001f) { /* XXX magic number */
unprojected_radius = 0.001f;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index 287e1eb03d1..c67a3145be8 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -55,7 +55,7 @@
#include "BKE_subsurf.h"
#include "BKE_undo_system.h"
-// XXX: Ideally should be no direct call to such low level things.
+/* XXX: Ideally should be no direct call to such low level things. */
#include "BKE_subdiv_eval.h"
#include "DEG_depsgraph.h"
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index 9d9918a6daf..e5f6b61a2ae 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -126,7 +126,7 @@ static int sound_open_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-#else // WITH_AUDASPACE
+#else /* WITH_AUDASPACE */
static int sound_open_exec(bContext *UNUSED(C), wmOperator *op)
{
@@ -410,10 +410,10 @@ static int sound_mixdown_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_ERROR, result);
return OPERATOR_CANCELLED;
}
-#else // WITH_AUDASPACE
+#else /* WITH_AUDASPACE */
(void)C;
(void)op;
-#endif // WITH_AUDASPACE
+#endif /* WITH_AUDASPACE */
return OPERATOR_FINISHED;
}
@@ -493,7 +493,7 @@ static bool sound_mixdown_check(bContext *UNUSED(C), wmOperator *op)
return false;
}
-#endif // WITH_AUDASPACE
+#endif /* WITH_AUDASPACE */
static int sound_mixdown_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
@@ -666,7 +666,7 @@ static void sound_mixdown_draw(bContext *C, wmOperator *op)
uiDefAutoButsRNA(
layout, &ptr, sound_mixdown_draw_check_prop, NULL, NULL, UI_BUT_LABEL_ALIGN_NONE, false);
}
-#endif // WITH_AUDASPACE
+#endif /* WITH_AUDASPACE */
static void SOUND_OT_mixdown(wmOperatorType *ot)
{
@@ -696,7 +696,7 @@ static void SOUND_OT_mixdown(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL},
};
-#endif // WITH_AUDASPACE
+#endif /* WITH_AUDASPACE */
/* identifiers */
ot->name = "Mixdown";
@@ -743,7 +743,7 @@ static void SOUND_OT_mixdown(wmOperatorType *ot)
0,
"Split channels",
"Each channel will be rendered into a mono file");
-#endif // WITH_AUDASPACE
+#endif /* WITH_AUDASPACE */
}
/* ******************************************************* */
diff --git a/source/blender/editors/space_action/action_buttons.c b/source/blender/editors/space_action/action_buttons.c
index ed49a1ed6d6..5e1c205f1d4 100644
--- a/source/blender/editors/space_action/action_buttons.c
+++ b/source/blender/editors/space_action/action_buttons.c
@@ -54,7 +54,7 @@
#include "UI_interface.h"
#include "UI_resources.h"
-#include "action_intern.h" // own include
+#include "action_intern.h" /* own include */
/* ******************* action editor space & buttons ************** */
@@ -65,7 +65,7 @@ void action_buttons_register(ARegionType *UNUSED(art))
#if 0
PanelType *pt;
- // TODO: AnimData / Actions List
+ /* TODO: AnimData / Actions List */
pt = MEM_callocN(sizeof(PanelType), "spacetype action panel properties");
strcpy(pt->idname, "ACTION_PT_properties");
diff --git a/source/blender/editors/space_action/action_data.c b/source/blender/editors/space_action/action_data.c
index d5b185302c1..e20be9c8328 100644
--- a/source/blender/editors/space_action/action_data.c
+++ b/source/blender/editors/space_action/action_data.c
@@ -757,7 +757,7 @@ static void action_layer_switch_strip(
adt->flag |= ADT_NLA_SOLO_TRACK;
nlt->flag |= NLATRACK_SOLO;
- // TODO: Needs rest-pose flushing (when we get reference track)
+ /* TODO: Needs rest-pose flushing (when we get reference track) */
}
}
@@ -851,7 +851,7 @@ static int action_layer_next_exec(bContext *C, wmOperator *op)
/* turn on NLA muting (to keep same effect) */
adt->flag |= ADT_NLA_EVAL_OFF;
- // TODO: Needs rest-pose flushing (when we get reference track)
+ /* TODO: Needs rest-pose flushing (when we get reference track) */
}
}
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index 73d272cff4f..e14e78912d7 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -286,7 +286,7 @@ static int actkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op))
}
/* set notifier that things have changed */
- // XXX err... there's nothing for frame ranges yet, but this should do fine too
+ /* XXX err... there's nothing for frame ranges yet, but this should do fine too */
WM_event_add_notifier(C, NC_SCENE | ND_FRAME, ac.scene);
return OPERATOR_FINISHED;
@@ -1107,7 +1107,7 @@ void ACTION_OT_clean(wmOperatorType *ot)
ot->description = "Simplify F-Curves by removing closely spaced keyframes";
/* api callbacks */
- // ot->invoke = // XXX we need that number popup for this!
+ // ot->invoke = /* XXX we need that number popup for this! */
ot->exec = actkeys_clean_exec;
ot->poll = ED_operator_action_active;
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index f40b792269b..c49bac58474 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -132,17 +132,17 @@ static void actkeys_list_element_to_keylist(bAnimContext *ac,
summary_to_keylist(ac, anim_keys, 0);
}
else if (ale->type == ANIMTYPE_GROUP) {
- // TODO: why don't we just give groups key_data too?
+ /* TODO: why don't we just give groups key_data too? */
bActionGroup *agrp = (bActionGroup *)ale->data;
agroup_to_keylist(adt, agrp, anim_keys, 0);
}
else if (ale->type == ANIMTYPE_GPLAYER) {
- // TODO: why don't we just give gplayers key_data too?
+ /* TODO: why don't we just give gplayers key_data too? */
bGPDlayer *gpl = (bGPDlayer *)ale->data;
gpl_to_keylist(ads, gpl, anim_keys);
}
else if (ale->type == ANIMTYPE_MASKLAYER) {
- // TODO: why don't we just give masklayers key_data too?
+ /* TODO: why don't we just give masklayers key_data too? */
MaskLayer *masklay = (MaskLayer *)ale->data;
mask_to_keylist(ads, masklay, anim_keys);
}
@@ -1877,7 +1877,7 @@ void ACTION_OT_clickselect(wmOperatorType *ot)
"extend",
0,
"Extend Select",
- "Toggle keyframe selection instead of leaving newly selected keyframes only"); // SHIFTKEY
+ "Toggle keyframe selection instead of leaving newly selected keyframes only"); /* SHIFTKEY */
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_boolean(ot->srna,
@@ -1892,7 +1892,7 @@ void ACTION_OT_clickselect(wmOperatorType *ot)
"column",
0,
"Column Select",
- "Select all keyframes that occur on the same frame as the one under the mouse"); // ALTKEY
+ "Select all keyframes that occur on the same frame as the one under the mouse"); /* ALTKEY */
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_boolean(
@@ -1900,7 +1900,7 @@ void ACTION_OT_clickselect(wmOperatorType *ot)
"channel",
0,
"Only Channel",
- "Select all the keyframes in the channel under the mouse"); // CTRLKEY + ALTKEY
+ "Select all the keyframes in the channel under the mouse"); /* CTRLKEY + ALTKEY */
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 8f049816941..ff0201f9702 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -801,7 +801,7 @@ static void action_refresh(const bContext *C, ScrArea *area)
}
/* region updates? */
- // XXX re-sizing y-extents of tot should go here?
+ /* XXX re-sizing y-extents of tot should go here? */
}
static void action_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, ID *new_id)
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index fabccecd533..64f2afff782 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -64,7 +64,7 @@
#include "WM_api.h"
-#include "buttons_intern.h" // own include
+#include "buttons_intern.h" /* own include */
static int set_pointer_type(ButsContextPath *path, bContextDataResult *result, StructRNA *type)
{
diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c
index dc35a0f3658..6f743eb1a6b 100644
--- a/source/blender/editors/space_buttons/buttons_texture.c
+++ b/source/blender/editors/space_buttons/buttons_texture.c
@@ -70,7 +70,7 @@
#include "../interface/interface_intern.h"
-#include "buttons_intern.h" // own include
+#include "buttons_intern.h" /* own include */
/************************* Texture User **************************/
diff --git a/source/blender/editors/space_clip/clip_dopesheet_ops.c b/source/blender/editors/space_clip/clip_dopesheet_ops.c
index c3323491085..135b7d1cb6c 100644
--- a/source/blender/editors/space_clip/clip_dopesheet_ops.c
+++ b/source/blender/editors/space_clip/clip_dopesheet_ops.c
@@ -43,7 +43,7 @@
#include "UI_view2d.h"
-#include "clip_intern.h" // own include
+#include "clip_intern.h" /* own include */
static bool space_clip_dopesheet_poll(bContext *C)
{
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index 4759075555b..93c30c9a4ba 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -62,7 +62,7 @@
#include "BLF_api.h"
-#include "clip_intern.h" // own include
+#include "clip_intern.h" /* own include */
/*********************** main area drawing *************************/
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index b2c80faec0b..69b89d25a1a 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -65,7 +65,7 @@
#include "UI_view2d.h"
-#include "clip_intern.h" // own include
+#include "clip_intern.h" /* own include */
/* ******** operactor poll functions ******** */
diff --git a/source/blender/editors/space_clip/clip_graph_draw.c b/source/blender/editors/space_clip/clip_graph_draw.c
index 4cf3e3e0798..e6fb6d75051 100644
--- a/source/blender/editors/space_clip/clip_graph_draw.c
+++ b/source/blender/editors/space_clip/clip_graph_draw.c
@@ -45,7 +45,7 @@
#include "UI_resources.h"
#include "UI_view2d.h"
-#include "clip_intern.h" // own include
+#include "clip_intern.h" /* own include */
typedef struct TrackMotionCurveUserData {
SpaceClip *sc;
diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c
index ffd3241a30f..590f8efe105 100644
--- a/source/blender/editors/space_clip/clip_graph_ops.c
+++ b/source/blender/editors/space_clip/clip_graph_ops.c
@@ -44,7 +44,7 @@
#include "UI_view2d.h"
-#include "clip_intern.h" // own include
+#include "clip_intern.h" /* own include */
/******************** common graph-editing utilities ********************/
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index 013731a50d6..26fa5b8a06c 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -76,7 +76,7 @@
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
-#include "clip_intern.h" // own include
+#include "clip_intern.h" /* own include */
/* -------------------------------------------------------------------- */
/** \name View Navigation Utilities
diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c
index cbf43bb7ff0..c7f2a027ba8 100644
--- a/source/blender/editors/space_clip/clip_utils.c
+++ b/source/blender/editors/space_clip/clip_utils.c
@@ -50,7 +50,7 @@
#include "UI_resources.h"
#include "UI_view2d.h"
-#include "clip_intern.h" // own include
+#include "clip_intern.h" /* own include */
bool clip_graph_value_visible(SpaceClip *sc, eClipCurveValueSource value_source)
{
diff --git a/source/blender/editors/space_clip/tracking_ops_track.c b/source/blender/editors/space_clip/tracking_ops_track.c
index afbca48bd45..66669527929 100644
--- a/source/blender/editors/space_clip/tracking_ops_track.c
+++ b/source/blender/editors/space_clip/tracking_ops_track.c
@@ -46,7 +46,7 @@
#include "DEG_depsgraph.h"
-#include "clip_intern.h" // own include
+#include "clip_intern.h" /* own include */
#include "tracking_ops_intern.h"
/********************** Track operator *********************/
@@ -281,7 +281,7 @@ static void track_markers_endjob(void *tmv)
tmj->clip->tracking_context = NULL;
tmj->scene->r.cfra = BKE_movieclip_remap_clip_to_scene_frame(tmj->clip, tmj->lastfra);
if (wm != NULL) {
- // XXX: ...
+ /* XXX */
// ED_update_for_newframe(tmj->main, tmj->scene);
}
diff --git a/source/blender/editors/space_clip/tracking_ops_utils.c b/source/blender/editors/space_clip/tracking_ops_utils.c
index 7579c9a49c6..1f959e94309 100644
--- a/source/blender/editors/space_clip/tracking_ops_utils.c
+++ b/source/blender/editors/space_clip/tracking_ops_utils.c
@@ -33,7 +33,7 @@
#include "WM_api.h"
#include "WM_types.h"
-#include "tracking_ops_intern.h" // own include
+#include "tracking_ops_intern.h" /* own include */
void clip_tracking_clear_invisible_track_selection(SpaceClip *sc, MovieClip *clip)
{
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index f0d4a45a3dd..77f1111624d 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -131,7 +131,7 @@ static bool console_line_cursor_set(ConsoleLine *cl, int cursor)
return true;
}
-#if 0 // XXX unused
+#if 0 /* XXX unused */
static void console_lb_debug__internal(ListBase *lb)
{
ConsoleLine *cl;
@@ -415,7 +415,8 @@ static int console_insert_exec(bContext *C, wmOperator *op)
static int console_insert_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
- // if (!RNA_struct_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */
+ /* Note, the "text" property is always set from key-map,
+ * so we can't use #RNA_struct_property_is_set, check the length instead. */
if (!RNA_string_length(op->ptr, "text")) {
/* if alt/ctrl/super are pressed pass through except for utf8 character event
* (when input method are used for utf8 inputs, the user may assign key event
@@ -1108,7 +1109,7 @@ typedef struct SetConsoleCursor {
int sel_init;
} SetConsoleCursor;
-// TODO, cursor placement without selection
+/* TODO, cursor placement without selection */
static void console_cursor_set_to_pos(
SpaceConsole *sc, ARegion *region, SetConsoleCursor *scu, const int mval[2], int UNUSED(sel))
{
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index 4b554e0c5c0..a54faa41122 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -42,7 +42,7 @@
#include "UI_view2d.h"
#include "GPU_framebuffer.h"
-#include "console_intern.h" // own include
+#include "console_intern.h" /* own include */
/* ******************** default callbacks for console space ***************** */
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 7039eba7db1..4b277435f63 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -69,7 +69,7 @@
#include "filelist.h"
-#include "file_intern.h" // own include
+#include "file_intern.h" /* own include */
void ED_file_path_button(bScreen *screen,
const SpaceFile *sfile,
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 7ac3c209f2d..7bbf27c1f1e 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -1877,7 +1877,7 @@ static int file_next_exec(bContext *C, wmOperator *UNUSED(unused))
folderlist_pushdir(sfile->folders_prev, sfile->params->dir);
folderlist_popdir(sfile->folders_next, sfile->params->dir);
- // update folders_prev so we can check for it in folderlist_clear_next()
+ /* update folders_prev so we can check for it in #folderlist_clear_next() */
folderlist_pushdir(sfile->folders_prev, sfile->params->dir);
ED_file_change_dir(C);
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 8d0239a182d..84352127264 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -2640,7 +2640,7 @@ static void filelist_readjob_main_recursive(Main *bmain, FileList *filelist)
ListBase *lb;
int a, fake, idcode, ok, totlib, totbl;
- // filelist->type = FILE_MAIN; // XXX TODO: add modes to filebrowser
+ // filelist->type = FILE_MAIN; /* XXX TODO: add modes to filebrowser */
BLI_assert(filelist->filelist.entries == NULL);
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index edc1e83e882..6ffe553e076 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -51,7 +51,7 @@
#include "UI_view2d.h"
#include "GPU_framebuffer.h"
-#include "file_intern.h" // own include
+#include "file_intern.h" /* own include */
#include "filelist.h"
#include "fsmenu.h"
@@ -142,7 +142,7 @@ static void file_free(SpaceLink *sl)
BLI_assert(sfile->previews_timer == NULL);
if (sfile->files) {
- // XXXXX would need to do thumbnails_stop here, but no context available
+ /* XXX would need to do thumbnails_stop here, but no context available */
filelist_freelib(sfile->files);
filelist_free(sfile->files);
MEM_freeN(sfile->files);
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index bbdca5280d4..be3e49fd810 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -64,7 +64,7 @@
#include "UI_interface.h"
#include "UI_resources.h"
-#include "graph_intern.h" // own include
+#include "graph_intern.h" /* own include */
/* ******************* graph editor space & buttons ************** */
@@ -644,7 +644,7 @@ static void do_graph_region_driver_buttons(bContext *C, void *id_v, int event)
}
/* default for now */
- WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); // XXX could use better notifier
+ WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); /* XXX could use better notifier */
}
/* callback to add a target variable to the active driver */
@@ -1120,7 +1120,7 @@ static void graph_draw_driver_settings_panel(uiLayout *layout,
0.0,
0.0,
TIP_("Invalid variable name, click here for details"));
- UI_but_func_set(but, driver_dvar_invalid_name_query_cb, dvar, NULL); // XXX: reports?
+ UI_but_func_set(but, driver_dvar_invalid_name_query_cb, dvar, NULL); /* XXX: reports? */
}
/* 1.3) remove button */
@@ -1316,9 +1316,9 @@ static void graph_panel_drivers_popover(const bContext *C, Panel *panel)
static void do_graph_region_modifier_buttons(bContext *C, void *UNUSED(arg), int event)
{
switch (event) {
- case B_FMODIFIER_REDRAW: // XXX this should send depsgraph updates too
+ case B_FMODIFIER_REDRAW: /* XXX this should send depsgraph updates too */
WM_event_add_notifier(
- C, NC_ANIMATION, NULL); // XXX need a notifier specially for F-Modifiers
+ C, NC_ANIMATION, NULL); /* XXX need a notifier specially for F-Modifiers */
break;
}
}
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index e99aeb82456..9fe6b4e06f6 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -243,7 +243,7 @@ static int graphkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op))
scene->r.pefra = round_fl_to_int(max);
/* set notifier that things have changed */
- // XXX err... there's nothing for frame ranges yet, but this should do fine too
+ /* XXX err... there's nothing for frame ranges yet, but this should do fine too */
WM_event_add_notifier(C, NC_SCENE | ND_FRAME, ac.scene);
return OPERATOR_FINISHED;
@@ -258,7 +258,7 @@ void GRAPH_OT_previewrange_set(wmOperatorType *ot)
/* api callbacks */
ot->exec = graphkeys_previewrange_exec;
- // XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier...
+ /* XXX: unchecked poll to get fsamples working too, but makes modifier damage trickier. */
ot->poll = ED_operator_graphedit_active;
/* flags */
@@ -514,7 +514,7 @@ void GRAPH_OT_ghost_curves_create(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- // todo: add props for start/end frames
+ /* TODO: add props for start/end frames */
}
/* ******************** Clear Ghost-Curves Operator *********************** */
@@ -1069,7 +1069,8 @@ void GRAPH_OT_paste(wmOperatorType *ot)
"frame";
/* api callbacks */
- // ot->invoke = WM_operator_props_popup; // better wait for graph redo panel
+
+ // ot->invoke = WM_operator_props_popup; /* better wait for graph redo panel */
ot->exec = graphkeys_paste_exec;
ot->poll = graphop_editable_keyframes_poll;
@@ -1292,7 +1293,7 @@ void GRAPH_OT_clean(wmOperatorType *ot)
ot->description = "Simplify F-Curves by removing closely spaced keyframes";
/* api callbacks */
- // ot->invoke = // XXX we need that number popup for this!
+ // ot->invoke = ???; /* XXX we need that number popup for this! */
ot->exec = graphkeys_clean_exec;
ot->poll = graphop_editable_keyframes_poll;
@@ -1828,7 +1829,7 @@ static int graphkeys_bake_exec(bContext *C, wmOperator *UNUSED(op))
}
/* for now, init start/end from preview-range extents */
- // TODO: add properties for this
+ /* TODO: add properties for this */
scene = ac.scene;
start = PSFRA;
end = PEFRA;
@@ -1837,7 +1838,7 @@ static int graphkeys_bake_exec(bContext *C, wmOperator *UNUSED(op))
bake_graph_curves(&ac, start, end);
/* set notifier that keyframes have changed */
- // NOTE: some distinction between order/number of keyframes and type should be made?
+ /* NOTE: some distinction between order/number of keyframes and type should be made? */
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
return OPERATOR_FINISHED;
@@ -1851,14 +1852,14 @@ void GRAPH_OT_bake(wmOperatorType *ot)
ot->description = "Bake selected F-Curves to a set of sampled points defining a similar curve";
/* api callbacks */
- ot->invoke = WM_operator_confirm; // FIXME...
+ ot->invoke = WM_operator_confirm; /* FIXME */
ot->exec = graphkeys_bake_exec;
ot->poll = graphop_selected_fcurve_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- // todo: add props for start/end frames
+ /* TODO: add props for start/end frames */
}
#ifdef WITH_AUDASPACE
@@ -1974,7 +1975,7 @@ static int graphkeys_sound_bake_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-#else // WITH_AUDASPACE
+#else /* WITH_AUDASPACE */
static int graphkeys_sound_bake_exec(bContext *UNUSED(C), wmOperator *op)
{
@@ -1983,7 +1984,7 @@ static int graphkeys_sound_bake_exec(bContext *UNUSED(C), wmOperator *op)
return OPERATOR_CANCELLED;
}
-#endif // WITH_AUDASPACE
+#endif /* WITH_AUDASPACE */
static int graphkeys_sound_bake_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
@@ -2224,7 +2225,7 @@ static void setexpo_graph_keys(bAnimContext *ac, short mode)
if (mode == MAKE_CYCLIC_EXPO) {
/* only add if one doesn't exist */
if (list_has_suitable_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_CYCLES, -1) == 0) {
- // TODO: add some more preset versions which set different extrapolation options?
+ /* TODO: add some more preset versions which set different extrapolation options? */
add_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_CYCLES, fcu);
}
}
@@ -3249,8 +3250,8 @@ static int graph_fmodifier_add_exec(bContext *C, wmOperator *op)
/* filter data */
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS);
if (RNA_boolean_get(op->ptr, "only_active")) {
- filter |=
- ANIMFILTER_ACTIVE; // FIXME: enforce in this case only a single channel to get handled?
+ /* FIXME: enforce in this case only a single channel to get handled? */
+ filter |= ANIMFILTER_ACTIVE;
}
else {
filter |= (ANIMFILTER_SEL | ANIMFILTER_CURVE_VISIBLE);
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index 22c185e36e5..4d337fdeb5e 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -54,7 +54,7 @@
#include "WM_types.h"
/* ************************** view-based operators **********************************/
-// XXX should these really be here?
+/* XXX should these really be here? */
/* Set Cursor --------------------------------------------------------------------- */
/* The 'cursor' in the Graph Editor consists of two parts:
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index 433d7d6774b..36c836b0a91 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -85,13 +85,13 @@ typedef enum eGraphVertIndex {
} eGraphVertIndex;
/* Tolerance for absolute radius (in pixels) of the vert from the cursor to use */
-// TODO: perhaps this should depend a bit on the size that the user set the vertices to be?
+/* TODO: perhaps this should depend a bit on the size that the user set the vertices to be? */
#define GVERTSEL_TOL (10 * U.pixelsize)
/* ....... */
/* check if its ok to select a handle */
-// XXX also need to check for int-values only?
+/* XXX also need to check for int-values only? */
static bool fcurve_handle_sel_check(SpaceGraph *sipo, BezTriple *bezt)
{
if (sipo->flag & SIPO_NOHANDLES) {
@@ -104,7 +104,7 @@ static bool fcurve_handle_sel_check(SpaceGraph *sipo, BezTriple *bezt)
}
/* check if the given vertex is within bounds or not */
-// TODO: should we return if we hit something?
+/* TODO: should we return if we hit something? */
static void nearest_fcurve_vert_store(ListBase *matches,
View2D *v2d,
FCurve *fcu,
@@ -158,7 +158,7 @@ static void nearest_fcurve_vert_store(ListBase *matches,
nvi->frame = bezt->vec[1][0]; /* currently in global time... */
- nvi->sel = BEZT_ISSEL_ANY(bezt); // XXX... should this use the individual verts instead?
+ nvi->sel = BEZT_ISSEL_ANY(bezt); /* XXX... should this use the individual verts instead? */
/* add to list of matches if appropriate... */
if (replace == 0) {
@@ -188,7 +188,7 @@ static void get_nearest_fcurve_verts_list(bAnimContext *ac, const int mval[2], L
*/
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
if (sipo->flag &
- SIPO_SELCUVERTSONLY) { // FIXME: this should really be check for by the filtering code...
+ SIPO_SELCUVERTSONLY) { /* FIXME: this should really be check for by the filtering code... */
filter |= ANIMFILTER_SEL;
}
mapping_flag |= ANIM_get_normalization_flags(ac);
@@ -257,7 +257,7 @@ static void get_nearest_fcurve_verts_list(bAnimContext *ac, const int mval[2], L
}
}
else if (fcu->fpt) {
- // TODO; do this for samples too
+ /* TODO; do this for samples too */
}
/* un-apply NLA mapping from all the keyframes */
@@ -1480,7 +1480,7 @@ static int mouse_graph_keys(bAnimContext *ac,
}
/* if points can be selected on this F-Curve */
- // TODO: what about those with no keyframes?
+ /* TODO: what about those with no keyframes? */
if (!curves_only && ((nvi->fcu->flag & FCURVE_PROTECTED) == 0)) {
/* only if there's keyframe */
if (nvi->bezt) {
@@ -1515,7 +1515,7 @@ static int mouse_graph_keys(bAnimContext *ac,
}
}
else if (nvi->fpt) {
- // TODO: need to handle sample points
+ /* TODO: need to handle sample points */
}
}
else {
@@ -1609,7 +1609,7 @@ static int graphkeys_mselect_column(bAnimContext *ac,
}
/* get frame number on which elements should be selected */
- // TODO: should we restrict to integer frames only?
+ /* TODO: should we restrict to integer frames only? */
selx = nvi->frame;
if (select_mode != SELECT_REPLACE) {
@@ -1739,7 +1739,7 @@ void GRAPH_OT_clickselect(wmOperatorType *ot)
0,
"Extend Select",
"Toggle keyframe selection instead of leaving newly selected "
- "keyframes only"); // SHIFTKEY
+ "keyframes only"); /* SHIFTKEY */
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_boolean(ot->srna,
@@ -1754,14 +1754,14 @@ void GRAPH_OT_clickselect(wmOperatorType *ot)
0,
"Column Select",
"Select all keyframes that occur on the same frame as the one under "
- "the mouse"); // ALTKEY
+ "the mouse"); /* ALTKEY */
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_boolean(ot->srna,
"curves",
0,
"Only Curves",
- "Select all the keyframes in the curve"); // CTRLKEY + ALTKEY
+ "Select all the keyframes in the curve"); /* CTRLKEY + ALTKEY */
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c
index ffac9f1c722..8463c21b1ad 100644
--- a/source/blender/editors/space_graph/graph_utils.c
+++ b/source/blender/editors/space_graph/graph_utils.c
@@ -46,7 +46,7 @@
#include "RNA_access.h"
-#include "graph_intern.h" // own include
+#include "graph_intern.h" /* own include */
/* ************************************************************** */
/* Set Up Drivers Editor */
@@ -141,7 +141,7 @@ bool graphop_visible_keyframes_poll(bContext *C)
bool found = false;
/* firstly, check if in Graph Editor */
- // TODO: also check for region?
+ /* TODO: also check for region? */
if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) {
return found;
}
@@ -194,7 +194,7 @@ bool graphop_editable_keyframes_poll(bContext *C)
bool found = false;
/* firstly, check if in Graph Editor */
- // TODO: also check for region?
+ /* TODO: also check for region? */
if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) {
return found;
}
@@ -246,7 +246,7 @@ bool graphop_active_fcurve_poll(bContext *C)
bool has_fcurve = false;
/* firstly, check if in Graph Editor */
- // TODO: also check for region?
+ /* TODO: also check for region? */
if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) {
return has_fcurve;
}
@@ -299,7 +299,7 @@ bool graphop_selected_fcurve_poll(bContext *C)
int filter;
/* firstly, check if in Graph Editor */
- // TODO: also check for region?
+ /* TODO: also check for region? */
if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) {
return false;
}
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 97db9b756ad..791039498e8 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -60,7 +60,7 @@
#include "UI_resources.h"
#include "UI_view2d.h"
-#include "graph_intern.h" // own include
+#include "graph_intern.h" /* own include */
/* ******************** default callbacks for ipo space ***************** */
@@ -317,7 +317,7 @@ static void graph_main_region_draw_overlay(const bContext *C, ARegion *region)
ED_time_scrub_draw_current_frame(region, scene, sipo->flag & SIPO_DRAWTIME, draw_vert_line);
/* scrollers */
- // FIXME: args for scrollers depend on the type of data being shown...
+ /* FIXME: args for scrollers depend on the type of data being shown. */
UI_view2d_scrollers_draw(v2d, NULL);
/* scale numbers */
@@ -615,10 +615,13 @@ static void graph_listener(wmWindow *UNUSED(win),
}
break;
- // XXX: restore the case below if not enough updates occur...
- // default:
- // if (wmn->data == ND_KEYS)
- // ED_area_tag_redraw(area);
+#if 0 /* XXX: restore the case below if not enough updates occur... */
+ default: {
+ if (wmn->data == ND_KEYS) {
+ ED_area_tag_redraw(area);
+ }
+ }
+#endif
}
}
@@ -763,7 +766,7 @@ static void graph_refresh(const bContext *C, ScrArea *area)
}
/* region updates? */
- // XXX re-sizing y-extents of tot should go here?
+ /* XXX re-sizing y-extents of tot should go here? */
/* Update the state of the animchannels in response to changes from the data they represent
* NOTE: the temp flag is used to indicate when this needs to be done,
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 1f8dd7cfe44..0dcc090fa0e 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -725,9 +725,6 @@ static void uiblock_layer_pass_buttons(uiLayout *layout,
}
}
-// XXX HACK!
-// static int packdummy=0;
-
typedef struct RNAUpdateCb {
PointerRNA ptr;
PropertyRNA *prop;
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 7a53e9b75b6..7a066adae77 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -603,7 +603,7 @@ static void image_main_region_init(wmWindowManager *wm, ARegion *region)
{
wmKeyMap *keymap;
- // image space manages own v2d
+ /* Image space manages own v2d. */
// UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_STANDARD, region->winx, region->winy);
/* mask polls mode */
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c
index 30f36509b41..0544a2cbefa 100644
--- a/source/blender/editors/space_info/info_ops.c
+++ b/source/blender/editors/space_info/info_ops.c
@@ -161,7 +161,7 @@ static int pack_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(ev
Main *bmain = CTX_data_main(C);
Image *ima;
- // first check for dirty images
+ /* First check for dirty images. */
for (ima = bmain->images.first; ima; ima = ima->id.next) {
if (BKE_image_is_dirty(ima)) {
break;
diff --git a/source/blender/editors/space_info/info_report.c b/source/blender/editors/space_info/info_report.c
index adc6391a0f6..3ba088018c3 100644
--- a/source/blender/editors/space_info/info_report.c
+++ b/source/blender/editors/space_info/info_report.c
@@ -100,15 +100,15 @@ int info_report_mask(const SpaceInfo *UNUSED(sinfo))
RPT_ERROR_ALL;
}
-// TODO, get this working again!
static int report_replay_exec(bContext *C, wmOperator *UNUSED(op))
{
- // SpaceInfo *sc = CTX_wm_space_info(C);
- // ReportList *reports = CTX_wm_reports(C);
- // int report_mask = info_report_mask(sc);
- // Report *report;
-
+ /* TODO, get this working again! */
#if 0
+ SpaceInfo *sc = CTX_wm_space_info(C);
+ ReportList *reports = CTX_wm_reports(C);
+ int report_mask = info_report_mask(sc);
+ Report *report;
+
sc->type = CONSOLE_TYPE_PYTHON;
for (report = reports->list.last; report; report = report->prev) {
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index 130167f1bd0..db4e2dcdfba 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -51,7 +51,7 @@
#include "UI_interface.h"
#include "UI_resources.h"
-#include "nla_intern.h" // own include
+#include "nla_intern.h" /* own include */
/* ******************* nla editor space & buttons ************** */
@@ -91,7 +91,7 @@ bool nla_panel_context(const bContext *C,
/* extract list of active channel(s), of which we should only take the first one
* - we need the channels flag to get the active AnimData block when there are no NLA Tracks
*/
- // XXX: double-check active!
+ /* XXX: double-check active! */
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_ACTIVE |
ANIMFILTER_LIST_CHANNELS);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
@@ -404,7 +404,7 @@ static void nla_panel_properties(const bContext *C, Panel *panel)
row = uiLayoutRow(column, true);
uiLayoutSetActive(row, RNA_boolean_get(&strip_ptr, "use_animated_influence") == false);
- uiItemR(row, &strip_ptr, "use_auto_blend", 0, NULL, ICON_NONE); // XXX as toggle?
+ uiItemR(row, &strip_ptr, "use_auto_blend", 0, NULL, ICON_NONE); /* XXX as toggle? */
/* settings */
column = uiLayoutColumnWithHeading(layout, true, IFACE_("Playback"));
@@ -558,8 +558,8 @@ static void nla_panel_modifiers(const bContext *C, Panel *panel)
row = uiLayoutRow(panel->layout, false);
block = uiLayoutGetBlock(row);
- // FIXME: we need to set the only-active property so that this
- // will only add modifiers for the active strip (not all selected).
+ /* FIXME: we need to set the only-active property so that this
+ * will only add modifiers for the active strip (not all selected). */
uiItemMenuEnumO(
row, (bContext *)C, "NLA_OT_fmodifier_add", "type", IFACE_("Add Modifier"), ICON_NONE);
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index f6f3571018a..fbda0ff7bde 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -59,7 +59,7 @@
#include "UI_view2d.h"
-#include "nla_intern.h" // own include
+#include "nla_intern.h" /* own include */
/* *********************************************** */
/* Operators for NLA channels-list which need to be different
@@ -103,7 +103,7 @@ static int mouse_nla_channels(
}
/* action to take depends on what channel we've got */
- // WARNING: must keep this in sync with the equivalent function in anim_channels_edit.c
+ /* WARNING: must keep this in sync with the equivalent function in anim_channels_edit.c */
switch (ale->type) {
case ANIMTYPE_SCENE: {
Scene *sce = (Scene *)ale->data;
@@ -427,7 +427,7 @@ void NLA_OT_channels_click(wmOperatorType *ot)
ot->flag = OPTYPE_UNDO;
/* props */
- prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
+ prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); /* SHIFTKEY */
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 9e43a8ce109..6fe980cf657 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -266,7 +266,7 @@ static void nla_strip_get_color_inside(AnimData *adt, NlaStrip *strip, float col
}
else if (strip->type == NLASTRIP_TYPE_META) {
/* Meta Clip */
- // TODO: should temporary metas get different colors too?
+ /* TODO: should temporary metas get different colors too? */
if (strip->flag & NLASTRIP_FLAG_SELECT) {
/* selected - use a bold purple color */
UI_GetThemeColor3fv(TH_NLA_META_SEL, color);
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index d82a39786d9..fa27a6941ec 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -65,8 +65,8 @@
#include "UI_resources.h"
#include "UI_view2d.h"
-#include "nla_intern.h" // own include
-#include "nla_private.h" // FIXME... maybe this shouldn't be included?
+#include "nla_intern.h" /* own include */
+#include "nla_private.h" /* FIXME... maybe this shouldn't be included? */
/* *********************************************** */
/* Utilities exported to other places... */
@@ -381,7 +381,7 @@ static int nlaedit_previewrange_exec(bContext *C, wmOperator *UNUSED(op))
scene->r.pefra = round_fl_to_int(max);
/* set notifier that things have changed */
- // XXX err... there's nothing for frame ranges yet, but this should do fine too
+ /* XXX err... there's nothing for frame ranges yet, but this should do fine too */
WM_event_add_notifier(C, NC_SCENE | ND_FRAME, ac.scene);
return OPERATOR_FINISHED;
@@ -717,7 +717,7 @@ void NLA_OT_actionclip_add(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
- // TODO: this would be nicer as an ID-pointer...
+ /* TODO: this would be nicer as an ID-pointer. */
prop = RNA_def_enum(ot->srna, "action", DummyRNA_NULL_items, 0, "Action", "");
RNA_def_enum_funcs(prop, RNA_action_itemf);
RNA_def_property_flag(prop, PROP_ENUM_NO_TRANSLATE);
@@ -878,7 +878,8 @@ static int nlaedit_add_sound_exec(bContext *C, wmOperator *UNUSED(op))
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* for each track, add sound clips if it belongs to a speaker */
- // TODO: what happens if there aren't any tracks... well that's a more general problem for later
+ /* TODO: what happens if there aren't any tracks,
+ * well that's a more general problem for later. */
for (ale = anim_data.first; ale; ale = ale->next) {
Object *ob = (Object *)ale->id; /* may not be object until we actually check! */
@@ -1260,9 +1261,9 @@ void NLA_OT_delete(wmOperatorType *ot)
/* ******************** Split Strips Operator ***************************** */
/* Splits the selected NLA-Strips into two strips at the midpoint of the strip */
-// TODO's?
-// - multiple splits
-// - variable-length splits?
+/* TODO's?
+ * - multiple splits
+ * - variable-length splits? */
/* split a given Action-Clip strip */
static void nlaedit_split_strip_actclip(
@@ -1440,7 +1441,7 @@ static int nlaedit_toggle_mute_exec(bContext *C, wmOperator *UNUSED(op))
for (strip = nlt->strips.first; strip; strip = strip->next) {
if (strip->flag & NLASTRIP_FLAG_SELECT) {
/* just flip the mute flag for now */
- // TODO: have a pre-pass to check if mute all or unmute all?
+ /* TODO: have a pre-pass to check if mute all or unmute all? */
strip->flag ^= NLASTRIP_FLAG_MUTED;
/* tag AnimData to get recalculated */
@@ -2158,8 +2159,9 @@ void NLA_OT_clear_scale(wmOperatorType *ot)
/* defines for snap keyframes tool */
static const EnumPropertyItem prop_nlaedit_snap_types[] = {
{NLAEDIT_SNAP_CFRA, "CFRA", 0, "Current Frame", ""},
- {NLAEDIT_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry?
- // XXX as single entry?
+ /* XXX as single entry? */
+ {NLAEDIT_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""},
+ /* XXX as single entry? */
{NLAEDIT_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""},
{NLAEDIT_SNAP_NEAREST_MARKER, "NEAREST_MARKER", 0, "Nearest Marker", ""},
{0, NULL, 0, NULL, NULL},
@@ -2481,7 +2483,7 @@ static int nla_fmodifier_copy_exec(bContext *C, wmOperator *op)
continue;
}
- // TODO: when 'active' vs 'all' boolean is added, change last param!
+ /* TODO: when 'active' vs 'all' boolean is added, change last param! */
ok |= ANIM_fmodifiers_copy_to_buf(&strip->modifiers, 0);
}
}
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
index ec41368b9f0..74e5f1cfdd0 100644
--- a/source/blender/editors/space_nla/nla_select.c
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -49,7 +49,7 @@
#include "UI_interface.h"
#include "UI_view2d.h"
-#include "nla_intern.h" // own include
+#include "nla_intern.h" /* own include */
/* ******************** Utilities ***************************************** */
@@ -100,7 +100,7 @@ static void deselect_nla_strips(bAnimContext *ac, short test, short sel)
short smode;
/* determine type-based settings */
- // FIXME: double check whether ANIMFILTER_LIST_VISIBLE is needed!
+ /* FIXME: double check whether ANIMFILTER_LIST_VISIBLE is needed! */
filter = (ANIMFILTER_DATA_VISIBLE);
/* filter data */
@@ -728,7 +728,7 @@ void NLA_OT_click_select(wmOperatorType *ot)
/* properties */
WM_operator_properties_generic_select(ot);
- prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); // SHIFTKEY
+ prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); /* SHIFTKEY */
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_boolean(ot->srna,
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 7a0cd35ece1..7e3f90b01ba 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -551,7 +551,7 @@ static void nla_listener(wmWindow *UNUSED(win),
/* context changes */
switch (wmn->category) {
case NC_ANIMATION:
- // TODO: filter specific types of changes?
+ /* TODO: filter specific types of changes? */
ED_area_tag_refresh(area);
break;
case NC_SCENE:
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 9373c434b9b..10aa53abb01 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -2369,7 +2369,7 @@ static void node_composit_buts_bokehimage(uiLayout *layout, bContext *UNUSED(C),
static void node_composit_buts_bokehblur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "use_variable_size", DEFAULT_FLAGS, NULL, ICON_NONE);
- // uiItemR(layout, ptr, "f_stop", DEFAULT_FLAGS, NULL, ICON_NONE); // UNUSED
+ // uiItemR(layout, ptr, "f_stop", DEFAULT_FLAGS, NULL, ICON_NONE); /* UNUSED */
uiItemR(layout, ptr, "blur_max", DEFAULT_FLAGS, NULL, ICON_NONE);
uiItemR(layout, ptr, "use_extended_bounds", DEFAULT_FLAGS, NULL, ICON_NONE);
}
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 8c9d477e864..894da811ed4 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -773,12 +773,12 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node, bool *r_acti
}
}
else if (ntree->type == NTREE_TEXTURE) {
- // XXX
+ /* XXX */
#if 0
if (node->id) {
- // XXX BIF_preview_changed(-1);
- // allqueue(REDRAWBUTSSHADING, 1);
- // allqueue(REDRAWIPO, 0);
+ BIF_preview_changed(-1);
+ allqueue(REDRAWBUTSSHADING, 1);
+ allqueue(REDRAWIPO, 0);
}
#endif
}
@@ -1378,7 +1378,7 @@ void ED_node_select_all(ListBase *lb, int action)
}
/* ******************************** */
-// XXX some code needing updating to operators...
+/* XXX some code needing updating to operators. */
/* goes over all scenes, reads render layers */
static int node_read_viewlayers_exec(bContext *C, wmOperator *UNUSED(op))
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index 1a0b5dc9ee8..04e452d5270 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -256,9 +256,9 @@ void NODE_OT_cryptomatte_layer_remove(struct wmOperatorType *ot);
extern const char *node_context_dir[];
-// XXXXXX
+/* XXXXXX */
-// nodes draw without dpi - the view zoom is flexible
+/* Nodes draw without dpi - the view zoom is flexible. */
#define HIDDEN_RAD (0.75f * U.widget_unit)
#define BASIS_RAD (0.2f * U.widget_unit)
#define NODE_DYS (U.widget_unit / 2)
@@ -271,7 +271,7 @@ extern const char *node_context_dir[];
#define NODE_RESIZE_MARGIN (0.20f * U.widget_unit)
#define NODE_LINK_RESOL 12
-// XXX button events (butspace)
+/* Button events (butspace) */
enum eNodeSpace_ButEvents {
B_NOP = 0,
B_REDR = 1,
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index 57fd84a4521..01b4de90084 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -993,7 +993,7 @@ void NODE_OT_link_make(wmOperatorType *ot)
/* callbacks */
ot->exec = node_make_link_exec;
- // XXX we need a special poll which checks that there are selected input/output sockets
+ /* XXX we need a special poll which checks that there are selected input/output sockets. */
ot->poll = ED_operator_node_editable;
/* flags */
diff --git a/source/blender/editors/space_node/node_view.c b/source/blender/editors/space_node/node_view.c
index ce66740dc60..fca8086d36f 100644
--- a/source/blender/editors/space_node/node_view.c
+++ b/source/blender/editors/space_node/node_view.c
@@ -607,7 +607,7 @@ static int sample_modal(bContext *C, wmOperator *op, const wmEvent *event)
{
switch (event->type) {
case LEFTMOUSE:
- case RIGHTMOUSE: // XXX hardcoded
+ case RIGHTMOUSE: /* XXX hardcoded */
if (event->val == KM_RELEASE) {
sample_exit(C, op);
return OPERATOR_CANCELLED;
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c
index 56f99d31cf1..bde7bdb77f1 100644
--- a/source/blender/editors/space_script/script_edit.c
+++ b/source/blender/editors/space_script/script_edit.c
@@ -39,7 +39,7 @@
#include "ED_screen.h"
-#include "script_intern.h" // own include
+#include "script_intern.h" /* own include */
#ifdef WITH_PYTHON
# include "BPY_extern_run.h"
diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c
index 3c3f7dc1e8e..3330ba14530 100644
--- a/source/blender/editors/space_script/space_script.c
+++ b/source/blender/editors/space_script/space_script.c
@@ -45,7 +45,7 @@
#endif
#include "GPU_framebuffer.h"
-#include "script_intern.h" // own include
+#include "script_intern.h" /* own include */
// static script_run_python(char *funcname, )
@@ -85,8 +85,6 @@ static void script_free(SpaceLink *sl)
#ifdef WITH_PYTHON
/*free buttons references*/
if (sscript->but_refs) {
- // XXX BPy_Set_DrawButtonsList(sscript->but_refs);
- // BPy_Free_DrawButtonsList();
sscript->but_refs = NULL;
}
#endif
@@ -164,9 +162,11 @@ static void script_main_region_listener(wmWindow *UNUSED(win),
wmNotifier *UNUSED(wmn),
const Scene *UNUSED(scene))
{
- /* context changes */
- // XXX - Todo, need the ScriptSpace accessible to get the python script to run.
- // BPY_run_script_space_listener()
+/* context changes */
+/* XXX - Todo, need the ScriptSpace accessible to get the python script to run. */
+#if 0
+ BPY_run_script_space_listener()
+#endif
}
/* only called once, from space/spacetypes.c */
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 962c4e4c59d..0725109944a 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -182,7 +182,7 @@ static void sequencer_generic_invoke_xy__internal(bContext *C, wmOperator *op, i
RNA_int_set(op->ptr, "frame_start", cfra);
if ((flag & SEQPROP_ENDFRAME) && RNA_struct_property_is_set(op->ptr, "frame_end") == 0) {
- RNA_int_set(op->ptr, "frame_end", cfra + 25); // XXX arbitrary but ok for now.
+ RNA_int_set(op->ptr, "frame_end", cfra + 25); /* XXX arbitrary but ok for now. */
}
if (!(flag & SEQPROP_NOPATHS)) {
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index e041ce3184e..0a4a1ae92d9 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -182,7 +182,7 @@ static void select_linked_time(ListBase *seqbase, Sequence *seq_link)
}
}
-#if 0 // BRING BACK
+#if 0 /* BRING BACK */
void select_surround_from_last(Scene *scene)
{
Sequence *seq = get_last_seq(scene);
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index ec5175eae51..d3e6fd8f79c 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1094,7 +1094,7 @@ static void draw_documentation(const SpaceText *st, ARegion *region)
i = 0;
br = DOC_WIDTH;
- lines = 0; // XXX -doc_scroll;
+ lines = 0; /* XXX -doc_scroll; */
for (p = docs; *p; p++) {
if (*p == '\r' && *(++p) != '\n') {
*(--p) = '\n'; /* Fix line endings */
@@ -1400,7 +1400,7 @@ static void draw_brackets(const SpaceText *st, const TextDrawContext *tdc, ARegi
char ch;
- // syntax_highlight must be on or else the format string will be null
+ /* syntax_highlight must be on or else the format string will be null */
if (!text->curl || !tdc->syntax_highlight) {
return;
}
diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c
index c4052fcef84..c583634f440 100644
--- a/source/blender/editors/space_text/text_header.c
+++ b/source/blender/editors/space_text/text_header.c
@@ -113,7 +113,7 @@ void TEXT_OT_start_find(wmOperatorType *ot)
#if 0
{
- // RMB
+ /* RMB */
uiPopupMenu *pup;
@@ -140,7 +140,7 @@ void TEXT_OT_start_find(wmOperatorType *ot)
}
{
- // Alt+Shift+E
+ /* Alt+Shift+E */
uiPopupMenu *pup;
@@ -152,7 +152,7 @@ void TEXT_OT_start_find(wmOperatorType *ot)
}
{
- // Alt+Shift+F
+ /* Alt+Shift+F */
uiPopupMenu *pup;
@@ -174,7 +174,7 @@ void TEXT_OT_start_find(wmOperatorType *ot)
}
{
- // Alt+Shift+V
+ /* Alt+Shift+V */
uiPopupMenu *pup;
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 2ae8d4cde7a..5c7f84ea386 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -407,7 +407,7 @@ void TEXT_OT_open(wmOperatorType *ot)
FILE_OPENFILE,
WM_FILESEL_FILEPATH,
FILE_DEFAULTDISPLAY,
- FILE_SORT_ALPHA); // XXX TODO, relative_path
+ FILE_SORT_ALPHA); /* TODO: relative_path. */
RNA_def_boolean(
ot->srna, "internal", 0, "Make internal", "Make text file internal after loading");
}
@@ -733,7 +733,7 @@ void TEXT_OT_save_as(wmOperatorType *ot)
FILE_SAVE,
WM_FILESEL_FILEPATH,
FILE_DEFAULTDISPLAY,
- FILE_SORT_ALPHA); // XXX TODO, relative_path
+ FILE_SORT_ALPHA); /* XXX TODO, relative_path. */
}
/** \} */
@@ -1208,7 +1208,7 @@ static int text_line_break_exec(bContext *C, wmOperator *UNUSED(op))
text_drawcache_tag_update(st, 0);
- // double check tabs/spaces before splitting the line
+ /* Double check tabs/spaces before splitting the line. */
curts = txt_setcurr_tab_spaces(text, space);
ED_text_undo_push_init(C);
txt_split_curline(text);
@@ -3463,7 +3463,8 @@ static int text_insert_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
int ret;
- // if (!RNA_struct_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */
+ /* Note, the "text" property is always set from key-map,
+ * so we can't use #RNA_struct_property_is_set, check the length instead. */
if (!RNA_string_length(op->ptr, "text")) {
/* if alt/ctrl/super are pressed pass through except for utf8 character event
* (when input method are used for utf8 inputs, the user may assign key event
diff --git a/source/blender/editors/space_view3d/view3d_project.c b/source/blender/editors/space_view3d/view3d_project.c
index e073cb43962..0afa44b6f4f 100644
--- a/source/blender/editors/space_view3d/view3d_project.c
+++ b/source/blender/editors/space_view3d/view3d_project.c
@@ -776,7 +776,7 @@ void ED_view3d_ob_project_mat_get_from_obmat(const RegionView3D *rv3d,
* a point in world space. */
void ED_view3d_project(const struct ARegion *region, const float world[3], float r_region_co[3])
{
- // viewport is set up to make coordinates relative to the region, not window
+ /* Viewport is set up to make coordinates relative to the region, not window. */
RegionView3D *rv3d = region->regiondata;
const int viewport[4] = {0, 0, region->winx, region->winy};
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index fc71648acfb..3f758c0fda3 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -2299,7 +2299,7 @@ static bool ed_object_select_pick(bContext *C,
/* Set special modes for grease pencil
* The grease pencil modes are not real modes, but a hack to make the interface
* consistent, so need some tricks to keep UI synchronized */
- // XXX: This stuff needs reviewing (Aligorith)
+ /* XXX: This stuff needs reviewing (Aligorith) */
if (false && (((oldbasact) && oldbasact->object->type == OB_GPENCIL) ||
(basact->object->type == OB_GPENCIL))) {
/* set cursor */
diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c
index 92d86f6bebb..dcb3179a46d 100644
--- a/source/blender/editors/space_view3d/view3d_utils.c
+++ b/source/blender/editors/space_view3d/view3d_utils.c
@@ -213,7 +213,7 @@ void view3d_region_operator_needs_opengl(wmWindow *UNUSED(win), ARegion *region)
else {
RegionView3D *rv3d = region->regiondata;
- wmViewport(&region->winrct); // TODO: bad
+ wmViewport(&region->winrct); /* TODO: bad */
GPU_matrix_projection_set(rv3d->winmat);
GPU_matrix_set(rv3d->viewmat);
}
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index ef389918eb4..1d89b040b85 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -1450,7 +1450,7 @@ static int walk_modal(bContext *C, wmOperator *op, const wmEvent *event)
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, walk_object);
}
- // too frequent, commented with NDOF_WALK_DRAW_TOOMUCH for now
+ /* too frequent, commented with NDOF_WALK_DRAW_TOOMUCH for now */
// puts("redraw!");
ED_region_tag_redraw(CTX_wm_region(C));
}
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index e2e7611a6b6..4e08b6b1c5d 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -70,7 +70,7 @@
/* Disabling, since when you type you know what you are doing,
* and being able to set it to zero is handy. */
-// #define USE_NUM_NO_ZERO
+/* #define USE_NUM_NO_ZERO */
static void drawTransformApply(const struct bContext *C, ARegion *region, void *arg);
@@ -269,7 +269,7 @@ void projectIntViewEx(TransInfo *t, const float vec[3], int adr[2], const eV3DPr
SpaceAction *sact = t->area->spacedata.first;
if (sact->flag & SACTION_DRAWTIME) {
- //vec[0] = vec[0]/((t->scene->r.frs_sec / t->scene->r.frs_sec_base));
+ // vec[0] = vec[0] / ((t->scene->r.frs_sec / t->scene->r.frs_sec_base));
/* same as below */
UI_view2d_view_to_region((View2D *)t->view, vec[0], vec[1], &out[0], &out[1]);
}
@@ -447,7 +447,7 @@ static void viewRedrawForce(const bContext *C, TransInfo *t)
}
/* For real-time animation record - send notifiers recognized by animation editors */
- // XXX: is this notifier a lame duck?
+ /* XXX: is this notifier a lame duck? */
if ((t->animtimer) && IS_AUTOKEY_ON(t->scene)) {
WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, NULL);
}
@@ -487,7 +487,7 @@ static void viewRedrawForce(const bContext *C, TransInfo *t)
ED_area_tag_redraw(t->area);
}
else {
- // XXX how to deal with lock?
+ /* XXX how to deal with lock? */
SpaceImage *sima = (SpaceImage *)t->area->spacedata.first;
if (sima->lock) {
WM_event_add_notifier(C, NC_GEOM | ND_DATA, OBEDIT_FROM_VIEW_LAYER(t->view_layer)->data);
@@ -539,7 +539,7 @@ static void viewRedrawPost(bContext *C, TransInfo *t)
WM_event_add_notifier(C, NC_SCENE | ND_TRANSFORM_DONE, CTX_data_scene(C));
}
-#if 0 // TRANSFORM_FIX_ME
+#if 0 /* TRANSFORM_FIX_ME */
if (t->spacetype == SPACE_VIEW3D) {
allqueue(REDRAWBUTSOBJECT, 0);
allqueue(REDRAWVIEW3D, 0);
@@ -814,7 +814,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
applyMouseInput(t, &t->mouse, t->mval, t->values);
- // Snapping mouse move events
+ /* Snapping mouse move events. */
t->redraw |= handleSnapping(t, event);
handled = true;
}
@@ -854,7 +854,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
resetTransRestrictions(t);
transform_mode_init(t, NULL, TFM_TRANSLATION);
}
- initSnapping(t, NULL); // need to reinit after mode change
+ initSnapping(t, NULL); /* need to reinit after mode change */
t->redraw |= TREDRAW_HARD;
handled = true;
}
@@ -876,7 +876,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
resetTransModal(t);
resetTransRestrictions(t);
transform_mode_init(t, NULL, TFM_TRANSLATION);
- initSnapping(t, NULL); // need to reinit after mode change
+ initSnapping(t, NULL); /* need to reinit after mode change */
t->redraw |= TREDRAW_HARD;
handled = true;
}
@@ -895,7 +895,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
else {
transform_mode_init(t, NULL, TFM_ROTATION);
}
- initSnapping(t, NULL); // need to reinit after mode change
+ initSnapping(t, NULL); /* need to reinit after mode change */
t->redraw |= TREDRAW_HARD;
handled = true;
}
@@ -927,7 +927,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
resetTransModal(t);
resetTransRestrictions(t);
transform_mode_init(t, NULL, TFM_RESIZE);
- initSnapping(t, NULL); // need to reinit after mode change
+ initSnapping(t, NULL); /* need to reinit after mode change */
t->redraw |= TREDRAW_HARD;
handled = true;
}
@@ -1275,9 +1275,9 @@ bool calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], floa
/* avoid doing connectivity lookups (when V3D_AROUND_LOCAL_ORIGINS is set) */
t->around = V3D_AROUND_CENTER_BOUNDS;
- createTransData(C, t); // make TransData structs from selection
+ createTransData(C, t); /* make TransData structs from selection */
- t->around = centerMode; // override userdefined mode
+ t->around = centerMode; /* override userdefined mode */
if (t->data_len_all == 0) {
success = false;
@@ -1292,7 +1292,7 @@ bool calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], floa
}
if (cent3d) {
- // Copy center from constraint center. Transform center can be local
+ /* Copy center from constraint center. Transform center can be local */
copy_v3_v3(cent3d, t->center_global);
}
}
@@ -1447,7 +1447,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
t->orient[0].type = V3D_ORIENT_GLOBAL;
}
- // Save back mode in case we're in the generic operator
+ /* Save back mode in case we're in the generic operator */
if ((prop = RNA_struct_find_property(op->ptr, "mode"))) {
RNA_property_enum_set(op->ptr, prop, t->mode);
}
@@ -1475,7 +1475,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
}
}
- // If modal, save settings back in scene if not set as operator argument
+ /* If modal, save settings back in scene if not set as operator argument */
if ((t->flag & T_MODAL) || (op->flag & OP_IS_REPEAT)) {
/* save settings if not set in operator */
@@ -1753,7 +1753,7 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
SPACE_TYPE_ANY, RGN_TYPE_ANY, transform_draw_cursor_poll, transform_draw_cursor_draw, t);
}
- createTransData(C, t); // make TransData structs from selection
+ createTransData(C, t); /* Make #TransData structs from selection. */
if (t->data_len_all == 0) {
postTrans(C, t);
@@ -1812,7 +1812,7 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
}
}
- initSnapping(t, op); // Initialize snapping data AFTER mode flags
+ initSnapping(t, op); /* Initialize snapping data AFTER mode flags */
initSnapSpatial(t, t->snap_spatial);
@@ -1874,7 +1874,7 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
if ((((Mesh *)(tc->obedit->data))->flag & ME_AUTOSMOOTH)) {
- BMEditMesh *em = NULL; // BKE_editmesh_from_object(t->obedit);
+ BMEditMesh *em = NULL; /* BKE_editmesh_from_object(t->obedit); */
bool do_skip = false;
/* Currently only used for two of three most frequent transform ops,
@@ -1916,7 +1916,7 @@ void transformApply(bContext *C, TransInfo *t)
if ((t->redraw & TREDRAW_HARD) || (t->draw_handle_apply == NULL && (t->redraw & TREDRAW_SOFT))) {
selectConstraint(t);
if (t->transform) {
- t->transform(t, t->mval); // calls recalcData()
+ t->transform(t, t->mval); /* calls recalcData() */
viewRedrawForce(C, t);
}
t->redraw = TREDRAW_NOTHING;
@@ -1953,7 +1953,7 @@ int transformEnd(bContext *C, TransInfo *t)
/* handle restoring objects */
if (t->state == TRANS_CANCEL) {
exit_code = OPERATOR_CANCELLED;
- restoreTransObjects(t); // calls recalcData()
+ restoreTransObjects(t); /* calls recalcData() */
}
else {
if (t->flag & T_CLNOR_REBUILD) {
diff --git a/source/blender/editors/transform/transform_convert_action.c b/source/blender/editors/transform/transform_convert_action.c
index 40e60544642..da68f9c13de 100644
--- a/source/blender/editors/transform/transform_convert_action.c
+++ b/source/blender/editors/transform/transform_convert_action.c
@@ -796,9 +796,9 @@ void special_aftertrans_update__actedit(bContext *C, TransInfo *t)
/* free temp memory */
ANIM_animdata_freelist(&anim_data);
}
- else if (ac.datatype == ANIMCONT_ACTION) { // TODO: just integrate into the above...
+ else if (ac.datatype == ANIMCONT_ACTION) { /* TODO: just integrate into the above. */
/* Depending on the lock status, draw necessary views */
- // fixme... some of this stuff is not good
+ /* FIXME: some of this stuff is not good. */
if (ob) {
if (ob->pose || BKE_key_from_object(ob)) {
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
diff --git a/source/blender/editors/transform/transform_convert_armature.c b/source/blender/editors/transform/transform_convert_armature.c
index dd35ed3cbf5..a14ff6c500d 100644
--- a/source/blender/editors/transform/transform_convert_armature.c
+++ b/source/blender/editors/transform/transform_convert_armature.c
@@ -99,7 +99,7 @@ static void autokeyframe_pose(
bPoseChannel *pchan;
FCurve *fcu;
- // TODO: this should probably be done per channel instead...
+ /* TODO: this should probably be done per channel instead. */
if (!autokeyframe_cfra_can_key(scene, id)) {
/* tag channels that should have unkeyed data */
for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
@@ -337,7 +337,7 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan)
if (data->rootbone == 0) {
for (bPoseChannel *pchan_iter = pchan; pchan_iter; pchan_iter = pchan_iter->parent) {
/* here, we set ik-settings for bone from pchan->protectflag */
- // XXX: careful with quats/axis-angle rotations where we're locking 4d components
+ /* XXX: careful with quats/axis-angle rotations where we're locking 4d components. */
if (pchan_iter->protectflag & OB_LOCK_ROTX) {
pchan_iter->ikflag |= BONE_IK_NO_XDOF_TEMP;
}
@@ -373,7 +373,7 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan)
/* we only include bones that are part of a continual connected chain */
do {
/* here, we set ik-settings for bone from pchan->protectflag */
- // XXX: careful with quats/axis-angle rotations where we're locking 4d components
+ /* XXX: careful with quats/axis-angle rotations where we're locking 4d components. */
if (pchan->protectflag & OB_LOCK_ROTX) {
pchan->ikflag |= BONE_IK_NO_XDOF_TEMP;
}
@@ -683,7 +683,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
td->ival = bone->dist;
}
else if (t->mode == TFM_BONESIZE) {
- // abusive storage of scale in the loc pointer :)
+ /* Abusive storage of scale in the loc pointer :) */
td->loc = &bone->xwidth;
copy_v3_v3(td->iloc, td->loc);
td->val = NULL;
@@ -957,8 +957,9 @@ void createTransArmatureVerts(TransInfo *t)
for (ebo = edbo->first; ebo; ebo = ebo->next) {
td_old = td;
- ebo->oldlength =
- ebo->length; // length==0.0 on extrude, used for scaling radius of bone points
+
+ /* (length == 0.0) on extrude, used for scaling radius of bone points. */
+ ebo->oldlength = ebo->length;
if (EBONE_VISIBLE(arm, ebo) && !(ebo->flag & BONE_EDITMODE_LOCKED)) {
if (t->mode == TFM_BONE_ENVELOPE) {
@@ -1002,7 +1003,7 @@ void createTransArmatureVerts(TransInfo *t)
td->ival = ebo->dist;
}
else {
- // abusive storage of scale in the loc pointer :)
+ /* Abusive storage of scale in the loc pointer :). */
td->loc = &ebo->xwidth;
copy_v3_v3(td->iloc, td->loc);
td->val = NULL;
@@ -1330,8 +1331,8 @@ static void pose_transform_mirror_update(TransInfo *t, TransDataContainer *tc, O
/* We assume X-axis flipping for now. */
pchan->curve_in_x = pchan_orig->curve_in_x * -1;
pchan->curve_out_x = pchan_orig->curve_out_x * -1;
- pchan->roll1 = pchan_orig->roll1 * -1; // XXX?
- pchan->roll2 = pchan_orig->roll2 * -1; // XXX?
+ pchan->roll1 = pchan_orig->roll1 * -1; /* XXX? */
+ pchan->roll2 = pchan_orig->roll2 * -1; /* XXX? */
float pchan_mtx_final[4][4];
BKE_pchan_to_mat4(pchan_orig, pchan_mtx_final);
@@ -1465,7 +1466,8 @@ void recalcData_pose(TransInfo *t)
* (FPoints) instead of keyframes? */
if ((t->animtimer) && (t->context) && IS_AUTOKEY_ON(t->scene)) {
int targetless_ik =
- (t->flag & T_AUTOIK); // XXX this currently doesn't work, since flags aren't set yet!
+ (t->flag &
+ T_AUTOIK); /* XXX this currently doesn't work, since flags aren't set yet! */
animrecord_check_state(t, ob);
autokeyframe_pose(t->context, t->scene, ob, t->mode, targetless_ik);
@@ -1617,7 +1619,7 @@ static short apply_targetless_ik(Object *ob)
segcount++;
if (segcount == data->rootbone || segcount > 255) {
- break; // 255 is weak
+ break; /* 255 is weak */
}
}
for (; segcount; segcount--) {
diff --git a/source/blender/editors/transform/transform_convert_graph.c b/source/blender/editors/transform/transform_convert_graph.c
index 8886be9ac85..7daa6498334 100644
--- a/source/blender/editors/transform/transform_convert_graph.c
+++ b/source/blender/editors/transform/transform_convert_graph.c
@@ -260,7 +260,7 @@ void createTransGraphEditData(bContext *C, TransInfo *t)
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
/* which side of the current frame should be allowed */
- // XXX we still want this mode, but how to get this using standard transform too?
+ /* XXX we still want this mode, but how to get this using standard transform too? */
if (t->mode == TFM_TIME_EXTEND) {
t->frame_side = transform_convert_frame_side_dir_get(t, (float)CFRA);
}
diff --git a/source/blender/editors/transform/transform_convert_mesh_edge.c b/source/blender/editors/transform/transform_convert_mesh_edge.c
index febfa4cd367..7bdd33192da 100644
--- a/source/blender/editors/transform/transform_convert_mesh_edge.c
+++ b/source/blender/editors/transform/transform_convert_mesh_edge.c
@@ -86,7 +86,7 @@ void createTransEdge(TransInfo *t)
BM_mesh_cd_flag_ensure(em->bm, BKE_mesh_from_object(tc->obedit), ME_CDFLAG_EDGE_BWEIGHT);
cd_edge_float_offset = CustomData_get_offset(&em->bm->edata, CD_BWEIGHT);
}
- else { // if (t->mode == TFM_CREASE) {
+ else { /* if (t->mode == TFM_CREASE) { */
BLI_assert(t->mode == TFM_CREASE);
BM_mesh_cd_flag_ensure(em->bm, BKE_mesh_from_object(tc->obedit), ME_CDFLAG_EDGE_CREASE);
cd_edge_float_offset = CustomData_get_offset(&em->bm->edata, CD_CREASE);
diff --git a/source/blender/editors/transform/transform_convert_nla.c b/source/blender/editors/transform/transform_convert_nla.c
index afebf1c46a4..8f18f6a8c96 100644
--- a/source/blender/editors/transform/transform_convert_nla.c
+++ b/source/blender/editors/transform/transform_convert_nla.c
@@ -117,7 +117,7 @@ void createTransNlaData(bContext *C, TransInfo *t)
/* only consider selected strips */
for (strip = nlt->strips.first; strip; strip = strip->next) {
- // TODO: we can make strips have handles later on...
+ /* TODO: we can make strips have handles later on. */
/* transition strips can't get directly transformed */
if (strip->type != NLASTRIP_TYPE_TRANSITION) {
if (strip->flag & NLASTRIP_FLAG_SELECT) {
@@ -166,7 +166,7 @@ void createTransNlaData(bContext *C, TransInfo *t)
/* only consider selected strips */
for (strip = nlt->strips.first; strip; strip = strip->next) {
- // TODO: we can make strips have handles later on...
+ /* TODO: we can make strips have handles later on. */
/* transition strips can't get directly transformed */
if (strip->type != NLASTRIP_TYPE_TRANSITION) {
if (strip->flag & NLASTRIP_FLAG_SELECT) {
diff --git a/source/blender/editors/transform/transform_convert_object.c b/source/blender/editors/transform/transform_convert_object.c
index 97ef1e94d45..6664c41b0b6 100644
--- a/source/blender/editors/transform/transform_convert_object.c
+++ b/source/blender/editors/transform/transform_convert_object.c
@@ -251,8 +251,11 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
td->ext->irotAngle = ob->rotAngle;
copy_v3_v3(td->ext->irotAxis, ob->rotAxis);
- // td->ext->drotAngle = ob->drotAngle; // XXX, not implemented
- // copy_v3_v3(td->ext->drotAxis, ob->drotAxis); // XXX, not implemented
+ /* XXX, not implemented. */
+#if 0
+ td->ext->drotAngle = ob->drotAngle;
+ copy_v3_v3(td->ext->drotAxis, ob->drotAxis);
+#endif
}
else {
td->ext->rot = NULL;
@@ -726,7 +729,7 @@ void createTransTexspace(TransInfo *t)
ob = OBACT(view_layer);
- if (ob == NULL) { // Shouldn't logically happen, but still...
+ if (ob == NULL) { /* Shouldn't logically happen, but still. */
return;
}
@@ -788,7 +791,7 @@ static void autokeyframe_object(
ID *id = &ob->id;
FCurve *fcu;
- // TODO: this should probably be done per channel instead...
+ /* TODO: this should probably be done per channel instead. */
if (autokeyframe_cfra_can_key(scene, id)) {
ReportList *reports = CTX_wm_reports(C);
ToolSettings *ts = scene->toolsettings;
diff --git a/source/blender/editors/transform/transform_convert_sequencer.c b/source/blender/editors/transform/transform_convert_sequencer.c
index 80ce4770984..307fbbdf80b 100644
--- a/source/blender/editors/transform/transform_convert_sequencer.c
+++ b/source/blender/editors/transform/transform_convert_sequencer.c
@@ -381,7 +381,7 @@ static void freeSeqData(TransInfo *t, TransDataContainer *tc, TransCustomData *c
if (!(t->state == TRANS_CANCEL)) {
-#if 0 // default 2.4 behavior
+#if 0 /* Default 2.4 behavior. */
/* flush to 2d vector from internally used 3d vector */
for (a = 0; a < t->total; a++, td++) {
@@ -393,7 +393,7 @@ static void freeSeqData(TransInfo *t, TransDataContainer *tc, TransCustomData *c
seq_prev = seq;
}
-#else // durian hack
+#else /* durian hack */
{
int overlap = 0;
diff --git a/source/blender/editors/transform/transform_data.h b/source/blender/editors/transform/transform_data.h
index 726e70c5e4d..b59197fcd39 100644
--- a/source/blender/editors/transform/transform_data.h
+++ b/source/blender/editors/transform/transform_data.h
@@ -53,10 +53,12 @@ typedef struct TransDataMirror {
typedef struct TransDataExtension {
/** Initial object drot. */
float drot[3];
- // /* Initial object drotAngle, TODO: not yet implemented */
- // float drotAngle;
- // /* Initial object drotAxis, TODO: not yet implemented */
- // float drotAxis[3];
+#if 0 /* TODO: not yet implemented */
+ /* Initial object drotAngle */
+ float drotAngle;
+ /* Initial object drotAxis */
+ float drotAxis[3];
+#endif
/** Initial object delta quat. */
float dquat[4];
/** Initial object delta scale. */
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index e3ee6f51a26..1b8c9b47c04 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -390,7 +390,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
}
else if (t->spacetype == SPACE_IMAGE) {
SpaceImage *sima = area->spacedata.first;
- // XXX for now, get View2D from the active region
+ /* XXX for now, get View2D from the active region. */
t->view = &region->v2d;
t->around = sima->around;
@@ -409,7 +409,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
/* image not in uv edit, nor in mask mode, can happen for some tools */
}
else if (t->spacetype == SPACE_NODE) {
- // XXX for now, get View2D from the active region
+ /* XXX for now, get View2D from the active region. */
t->view = &region->v2d;
t->around = V3D_AROUND_CENTER_BOUNDS;
}
@@ -432,9 +432,9 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
}
else {
if (region) {
- // XXX for now, get View2D from the active region
+ /* XXX for now, get View2D from the active region */
t->view = &region->v2d;
- // XXX for now, the center point is the midpoint of the data
+ /* XXX for now, the center point is the midpoint of the data */
}
else {
t->view = NULL;
@@ -715,7 +715,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
}
}
- // Mirror is not supported with PET, turn it off.
+ /* Mirror is not supported with PET, turn it off. */
#if 0
if (t->flag & T_PROP_EDIT) {
t->flag &= ~T_MIRROR;
diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c
index 017cccdee15..a22f6c35139 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -915,7 +915,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
/* selection center */
if (totsel) {
- mul_v3_fl(tbounds->center, 1.0f / (float)totsel); // centroid!
+ mul_v3_fl(tbounds->center, 1.0f / (float)totsel); /* centroid! */
mul_m4_v3(obedit->obmat, tbounds->center);
mul_m4_v3(obedit->obmat, tbounds->min);
mul_m4_v3(obedit->obmat, tbounds->max);
@@ -958,7 +958,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
MEM_freeN(objects);
if (totsel) {
- mul_v3_fl(tbounds->center, 1.0f / (float)totsel); // centroid!
+ mul_v3_fl(tbounds->center, 1.0f / (float)totsel); /* centroid! */
mul_m4_v3(ob->obmat, tbounds->center);
mul_m4_v3(ob->obmat, tbounds->min);
mul_m4_v3(ob->obmat, tbounds->max);
@@ -996,7 +996,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
/* selection center */
if (totsel) {
- mul_v3_fl(tbounds->center, 1.0f / (float)totsel); // centroid!
+ mul_v3_fl(tbounds->center, 1.0f / (float)totsel); /* centroid! */
}
}
}
@@ -1044,7 +1044,7 @@ int ED_transform_calc_gizmo_stats(const bContext *C,
/* selection center */
if (totsel) {
- mul_v3_fl(tbounds->center, 1.0f / (float)totsel); // centroid!
+ mul_v3_fl(tbounds->center, 1.0f / (float)totsel); /* centroid! */
}
}
diff --git a/source/blender/editors/transform/transform_mode.c b/source/blender/editors/transform/transform_mode.c
index edc0781e18e..c525bc0e6ea 100644
--- a/source/blender/editors/transform/transform_mode.c
+++ b/source/blender/editors/transform/transform_mode.c
@@ -446,7 +446,7 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
*/
if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) {
/* scale val and reset size */
- return; // TODO: fix this case
+ return; /* TODO: fix this case */
}
/* Reset val if SINGLESIZE but using a constraint */
@@ -505,7 +505,7 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
/* copy results from cob->matrix */
if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) {
/* scale val and reset size */
- return; // TODO: fix this case
+ return; /* TODO: fix this case. */
}
/* Reset val if SINGLESIZE but using a constraint */
@@ -605,7 +605,7 @@ void ElementRotation_ex(TransInfo *t,
if (td->flag & TD_USEQUAT) {
mul_m3_series(fmat, td->smtx, mat, td->mtx);
- mat3_to_quat(quat, fmat); // Actual transform
+ mat3_to_quat(quat, fmat); /* Actual transform */
if (td->ext->quat) {
mul_qt_qtqt(td->ext->quat, quat, td->ext->iquat);
@@ -628,31 +628,31 @@ void ElementRotation_ex(TransInfo *t,
* has been computed, it has to be converted back into the bone's space.
*/
else if (t->flag & T_POSE) {
- // Extract and invert armature object matrix
+ /* Extract and invert armature object matrix */
if ((td->flag & TD_NO_LOC) == 0) {
sub_v3_v3v3(vec, td->center, center);
- mul_m3_v3(tc->mat3, vec); // To Global space
- mul_m3_v3(mat, vec); // Applying rotation
- mul_m3_v3(tc->imat3, vec); // To Local space
+ mul_m3_v3(tc->mat3, vec); /* To Global space. */
+ mul_m3_v3(mat, vec); /* Applying rotation. */
+ mul_m3_v3(tc->imat3, vec); /* To Local space. */
add_v3_v3(vec, center);
/* vec now is the location where the object has to be */
- sub_v3_v3v3(vec, vec, td->center); // Translation needed from the initial location
+ sub_v3_v3v3(vec, vec, td->center); /* Translation needed from the initial location */
/* special exception, see TD_PBONE_LOCAL_MTX definition comments */
if (td->flag & TD_PBONE_LOCAL_MTX_P) {
/* do nothing */
}
else if (td->flag & TD_PBONE_LOCAL_MTX_C) {
- mul_m3_v3(tc->mat3, vec); // To Global space
- mul_m3_v3(td->ext->l_smtx, vec); // To Pose space (Local Location)
+ mul_m3_v3(tc->mat3, vec); /* To Global space. */
+ mul_m3_v3(td->ext->l_smtx, vec); /* To Pose space (Local Location). */
}
else {
- mul_m3_v3(tc->mat3, vec); // To Global space
- mul_m3_v3(td->smtx, vec); // To Pose space
+ mul_m3_v3(tc->mat3, vec); /* To Global space. */
+ mul_m3_v3(td->smtx, vec); /* To Pose space. */
}
protectedTransBits(td->protectflag, vec);
@@ -738,13 +738,13 @@ void ElementRotation_ex(TransInfo *t,
constraintTransLim(t, td);
/* rotation */
- if ((t->flag & T_V3D_ALIGN) == 0) { // align mode doesn't rotate objects itself
+ if ((t->flag & T_V3D_ALIGN) == 0) { /* Align mode doesn't rotate objects itself. */
/* euler or quaternion? */
if ((td->ext->rotOrder == ROT_MODE_QUAT) || (td->flag & TD_USEQUAT)) {
/* can be called for texture space translate for example, then opt out */
if (td->ext->quat) {
mul_m3_series(fmat, td->smtx, mat, td->mtx);
- mat3_to_quat(quat, fmat); // Actual transform
+ mat3_to_quat(quat, fmat); /* Actual transform */
mul_qt_qtqt(td->ext->quat, quat, td->ext->iquat);
/* this function works on end result */
@@ -758,7 +758,7 @@ void ElementRotation_ex(TransInfo *t,
axis_angle_to_quat(iquat, td->ext->irotAxis, td->ext->irotAngle);
mul_m3_series(fmat, td->smtx, mat, td->mtx);
- mat3_to_quat(quat, fmat); // Actual transform
+ mat3_to_quat(quat, fmat); /* Actual transform */
mul_qt_qtqt(tquat, quat, iquat);
quat_to_axis_angle(td->ext->rotAxis, td->ext->rotAngle, tquat);
@@ -1045,10 +1045,12 @@ void ElementResize(TransInfo *t, TransDataContainer *tc, TransData *td, float ma
/** \name Transform Frame Utils
* \{ */
-/* This function returns the snapping 'mode' for Animation Editors only
+/**
+ * This function returns the snapping 'mode' for Animation Editors only.
* We cannot use the standard snapping due to NLA-strip scaling complexities.
+ *
+ * TODO: these modifier checks should be key-mappable.
*/
-// XXX these modifier checks should be keymappable
short getAnimEdit_SnapMode(TransInfo *t)
{
short autosnap = SACTSNAP_OFF;
diff --git a/source/blender/editors/transform/transform_mode_bbone_resize.c b/source/blender/editors/transform/transform_mode_bbone_resize.c
index 05c4bbedcb4..57e809a566a 100644
--- a/source/blender/editors/transform/transform_mode_bbone_resize.c
+++ b/source/blender/editors/transform/transform_mode_bbone_resize.c
@@ -142,7 +142,7 @@ static void applyBoneSize(TransInfo *t, const int UNUSED(mval[2]))
}
}
- copy_m3_m3(t->mat, mat); // used in gizmo
+ copy_m3_m3(t->mat, mat); /* used in gizmo */
headerBoneSize(t, t->values_final, str);
diff --git a/source/blender/editors/transform/transform_mode_resize.c b/source/blender/editors/transform/transform_mode_resize.c
index 06d61dd9ec8..33303b82567 100644
--- a/source/blender/editors/transform/transform_mode_resize.c
+++ b/source/blender/editors/transform/transform_mode_resize.c
@@ -121,7 +121,7 @@ static void applyResize(TransInfo *t, const int UNUSED(mval[2]))
headerResize(t, t->values_final, str);
}
- copy_m3_m3(t->mat, mat); // used in gizmo
+ copy_m3_m3(t->mat, mat); /* used in gizmo */
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
diff --git a/source/blender/editors/transform/transform_mode_rotate.c b/source/blender/editors/transform/transform_mode_rotate.c
index 943410e009d..d8857dbc31e 100644
--- a/source/blender/editors/transform/transform_mode_rotate.c
+++ b/source/blender/editors/transform/transform_mode_rotate.c
@@ -49,7 +49,7 @@ static float RotationBetween(TransInfo *t, const float p1[3], const float p2[3])
sub_v3_v3v3(start, p1, t->center_global);
sub_v3_v3v3(end, p2, t->center_global);
- // Angle around a constraint axis (error prone, will need debug)
+ /* Angle around a constraint axis (error prone, will need debug). */
if (t->con.applyRot != NULL && (t->con.mode & CON_APPLY)) {
float axis[3], tmp[3];
diff --git a/source/blender/editors/transform/transform_mode_shrink_fatten.c b/source/blender/editors/transform/transform_mode_shrink_fatten.c
index 679584cbfee..af33c2bb090 100644
--- a/source/blender/editors/transform/transform_mode_shrink_fatten.c
+++ b/source/blender/editors/transform/transform_mode_shrink_fatten.c
@@ -116,7 +116,7 @@ static void applyShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
void initShrinkFatten(TransInfo *t)
{
- // If not in mesh edit mode, fallback to Resize
+ /* If not in mesh edit mode, fallback to Resize. */
if ((t->flag & T_EDIT) == 0 || (t->obedit_type != OB_MESH)) {
initResize(t);
}
diff --git a/source/blender/editors/transform/transform_mode_timeslide.c b/source/blender/editors/transform/transform_mode_timeslide.c
index 9d112013398..9636b4f6e42 100644
--- a/source/blender/editors/transform/transform_mode_timeslide.c
+++ b/source/blender/editors/transform/transform_mode_timeslide.c
@@ -147,7 +147,7 @@ static void applyTimeSlide(TransInfo *t, const int mval[2])
UI_view2d_region_to_view(v2d, t->mouse.imval[0], t->mouse.imval[1], &sval[0], &sval[1]);
/* t->values_final[0] stores cval[0], which is the current mouse-pointer location (in frames) */
- // XXX Need to be able to repeat this
+ /* XXX Need to be able to repeat this. */
/* t->values_final[0] = cval[0]; */ /* UNUSED (reset again later). */
/* handle numeric-input stuff */
diff --git a/source/blender/editors/transform/transform_mode_tosphere.c b/source/blender/editors/transform/transform_mode_tosphere.c
index de85d586550..f49462ccc65 100644
--- a/source/blender/editors/transform/transform_mode_tosphere.c
+++ b/source/blender/editors/transform/transform_mode_tosphere.c
@@ -121,7 +121,7 @@ void initToSphere(TransInfo *t)
t->num.val_flag[0] |= NUM_NULL_ONE | NUM_NO_NEGATIVE;
t->flag |= T_NO_CONSTRAINT;
- // Calculate average radius
+ /* Calculate average radius */
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
TransData *td = tc->data;
for (i = 0; i < tc->data_len; i++, td++) {
diff --git a/source/blender/editors/transform/transform_mode_trackball.c b/source/blender/editors/transform/transform_mode_trackball.c
index a0d3bbac8e3..32019e151a1 100644
--- a/source/blender/editors/transform/transform_mode_trackball.c
+++ b/source/blender/editors/transform/transform_mode_trackball.c
@@ -131,8 +131,8 @@ static void applyTrackball(TransInfo *t, const int UNUSED(mval[2]))
mul_m3_m3m3(mat, smat, totmat);
- // TRANSFORM_FIX_ME
- //copy_m3_m3(t->mat, mat); // used in gizmo
+ /* TRANSFORM_FIX_ME */
+ // copy_m3_m3(t->mat, mat); /* used in gizmo. */
#endif
applyTrackballValue(t, axis1, axis2, phi);
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 6b6cab5c2a4..b164d0d443f 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -414,9 +414,9 @@ static int transform_modal(bContext *C, wmOperator *op, const wmEvent *event)
const enum TfmMode mode_prev = t->mode;
#if defined(WITH_INPUT_NDOF) && 0
- // stable 2D mouse coords map to different 3D coords while the 3D mouse is active
- // in other words, 2D deltas are no longer good enough!
- // disable until individual 'transformers' behave better
+ /* Stable 2D mouse coords map to different 3D coords while the 3D mouse is active
+ * in other words, 2D deltas are no longer good enough!
+ * disable until individual 'transformers' behave better. */
if (event->type == NDOF_MOTION) {
return OPERATOR_PASS_THROUGH;
@@ -520,7 +520,7 @@ static int transform_invoke(bContext *C, wmOperator *op, const wmEvent *event)
/* add temp handler */
WM_event_add_modal_handler(C, op);
- op->flag |= OP_IS_MODAL_GRAB_CURSOR; // XXX maybe we want this with the gizmo only?
+ op->flag |= OP_IS_MODAL_GRAB_CURSOR; /* XXX maybe we want this with the gizmo only? */
/* Use when modal input has some transformation to begin with. */
TransInfo *t = op->customdata;
@@ -888,7 +888,7 @@ static void TRANSFORM_OT_bend(struct wmOperatorType *ot)
/* api callbacks */
ot->invoke = transform_invoke;
- // ot->exec = transform_exec; // unsupported
+ // ot->exec = transform_exec; /* unsupported */
ot->modal = transform_modal;
ot->cancel = transform_cancel;
ot->poll = ED_operator_region_view3d_active;
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 1ab81ada398..e461bcb88e9 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -280,7 +280,7 @@ eRedrawFlag handleSnapping(TransInfo *t, const wmEvent *event)
{
eRedrawFlag status = TREDRAW_NOTHING;
-#if 0 // XXX need a proper selector for all snap mode
+#if 0 /* XXX need a proper selector for all snap mode */
if (BIF_snappingSupported(t->obedit) && event->type == TABKEY && event->shift) {
/* toggle snap and reinit */
t->settings->snap_flag ^= SCE_SNAP;
@@ -370,7 +370,9 @@ void applyProject(TransInfo *t)
}
}
- // XXX constraintTransLim(t, td);
+#if 0 /* TODO: sipport this? */
+ constraintTransLim(t, td);
+#endif
}
}
}
@@ -447,8 +449,8 @@ void applySnapping(TransInfo *t, float *vec)
activeSnap(t)) {
double current = PIL_check_seconds_timer();
- // Time base quirky code to go around findnearest slowness
- /* !TODO! add exception for object mode, no need to slow it down then */
+ /* Time base quirky code to go around findnearest slowness */
+ /* TODO: add exception for object mode, no need to slow it down then. */
if (current - t->tsnap.last >= 0.01) {
t->tsnap.calcSnap(t, vec);
t->tsnap.targetSnap(t);
@@ -831,7 +833,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
float mval[2];
bool found = false;
short snap_elem = 0;
- float dist_px = SNAP_MIN_DISTANCE; // Use a user defined value here
+ float dist_px = SNAP_MIN_DISTANCE; /* Use a user defined value here. */
mval[0] = t->mval[0];
mval[1] = t->mval[1];
@@ -890,7 +892,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
else if (t->spacetype == SPACE_NODE) {
if (t->tsnap.mode & (SCE_SNAP_MODE_NODE_X | SCE_SNAP_MODE_NODE_Y)) {
float loc[2];
- float dist_px = SNAP_MIN_DISTANCE; // Use a user defined value here
+ float dist_px = SNAP_MIN_DISTANCE; /* Use a user defined value here. */
char node_border;
if (snapNodesTransform(t, t->mval, loc, &dist_px, &node_border)) {
@@ -981,7 +983,7 @@ static void TargetSnapActive(TransInfo *t)
static void TargetSnapMedian(TransInfo *t)
{
- // Only need to calculate once
+ /* Only need to calculate once. */
if ((t->tsnap.status & TARGET_INIT) == 0) {
int i_accum = 0;
@@ -1024,7 +1026,7 @@ static void TargetSnapMedian(TransInfo *t)
static void TargetSnapClosest(TransInfo *t)
{
- // Only valid if a snap point has been selected
+ /* Only valid if a snap point has been selected. */
if (t->tsnap.status & POINT_INIT) {
float dist_closest = 0.0f;
TransData *closest = NULL;
@@ -1370,7 +1372,7 @@ void snapFrameTransform(TransInfo *t,
break;
case SACTSNAP_MARKER:
/* snap to nearest marker */
- // TODO: need some more careful checks for where data comes from
+ /* TODO: need some more careful checks for where data comes from. */
val = ED_markers_find_nearest_marker_time(&t->scene->markers, (float)val);
break;
case SACTSNAP_SECOND:
diff --git a/source/blender/editors/util/ed_util_imbuf.c b/source/blender/editors/util/ed_util_imbuf.c
index a6eed5d54d1..9a2b346132e 100644
--- a/source/blender/editors/util/ed_util_imbuf.c
+++ b/source/blender/editors/util/ed_util_imbuf.c
@@ -273,7 +273,7 @@ static void image_sample_apply(bContext *C, wmOperator *op, const wmEvent *event
}
}
- // XXX node curve integration ..
+ /* XXX node curve integration. */
#if 0
{
ScrArea *sa, *cur = curarea;
@@ -512,7 +512,7 @@ int ED_imbuf_sample_modal(bContext *C, wmOperator *op, const wmEvent *event)
{
switch (event->type) {
case LEFTMOUSE:
- case RIGHTMOUSE: // XXX hardcoded
+ case RIGHTMOUSE: /* XXX hardcoded */
if (event->val == KM_RELEASE) {
ED_imbuf_sample_exit(C, op);
return OPERATOR_CANCELLED;
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.h b/source/blender/editors/uvedit/uvedit_parametrizer.h
index de021adb4f0..0de792cb915 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.h
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.h
@@ -20,7 +20,7 @@
* \ingroup eduv
*/
-#include "BLI_sys_types.h" // for intptr_t support
+#include "BLI_sys_types.h" /* for intptr_t support */
#ifdef __cplusplus
extern "C" {
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_edituvs_points_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_edituvs_points_vert.glsl
index 3f3bfa5410c..bec565be1df 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_edituvs_points_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_edituvs_points_vert.glsl
@@ -30,15 +30,15 @@ void main()
fillColor = (is_selected) ? selectColor : deselect_col;
outlineColor = (is_pinned) ? pinnedColor : vec4(fillColor.rgb, 0.0);
- // calculate concentric radii in pixels
+ /* Calculate concentric radii in pixels. */
float radius = 0.5 * pointSize;
- // start at the outside and progress toward the center
+ /* Start at the outside and progress toward the center. */
radii[0] = radius;
radii[1] = radius - 1.0;
radii[2] = radius - outlineWidth;
radii[3] = radius - outlineWidth - 1.0;
- // convert to PointCoord units
+ /* Convert to PointCoord units. */
radii /= pointSize;
}
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_aa_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_aa_vert.glsl
index a7681353d49..1453393aa9f 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_aa_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_aa_vert.glsl
@@ -10,13 +10,13 @@ void main()
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
gl_PointSize = size;
- // calculate concentric radii in pixels
+ /* calculate concentric radii in pixels */
float radius = 0.5 * size;
- // start at the outside and progress toward the center
+ /* start at the outside and progress toward the center */
radii[0] = radius;
radii[1] = radius - 1.0;
- // convert to PointCoord units
+ /* convert to PointCoord units */
radii /= size;
}
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_outline_aa_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_outline_aa_vert.glsl
index a3439ebe3c4..5c555b2d3e7 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_outline_aa_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_outline_aa_vert.glsl
@@ -11,15 +11,15 @@ void main()
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
gl_PointSize = size;
- // calculate concentric radii in pixels
+ /* calculate concentric radii in pixels */
float radius = 0.5 * size;
- // start at the outside and progress toward the center
+ /* start at the outside and progress toward the center */
radii[0] = radius;
radii[1] = radius - 1.0;
radii[2] = radius - outlineWidth;
radii[3] = radius - outlineWidth - 1.0;
- // convert to PointCoord units
+ /* convert to PointCoord units */
radii /= size;
}
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_varying_color_outline_aa_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_varying_color_outline_aa_vert.glsl
index 287bd351534..3eec271913a 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_varying_color_outline_aa_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_varying_color_outline_aa_vert.glsl
@@ -14,15 +14,15 @@ void main()
gl_PointSize = size;
fillColor = color;
- // calculate concentric radii in pixels
+ /* Calculate concentric radii in pixels. */
float radius = 0.5 * size;
- // start at the outside and progress toward the center
+ /* Start at the outside and progress toward the center. */
radii[0] = radius;
radii[1] = radius - 1.0;
radii[2] = radius - outlineWidth;
radii[3] = radius - outlineWidth - 1.0;
- // convert to PointCoord units
+ /* Convert to PointCoord units. */
radii /= size;
}
diff --git a/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl
index 8bd344ed0e7..fb5506a778d 100644
--- a/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl
@@ -15,16 +15,16 @@ void main()
gl_Position = ModelViewProjectionMatrix * pos_4d;
gl_PointSize = size;
- // calculate concentric radii in pixels
+ /* calculate concentric radii in pixels */
float radius = 0.5 * size;
- // start at the outside and progress toward the center
+ /* start at the outside and progress toward the center */
radii[0] = radius;
radii[1] = radius - 1.0;
radii[2] = radius - outlineWidth;
radii[3] = radius - outlineWidth - 1.0;
- // convert to PointCoord units
+ /* convert to PointCoord units */
radii /= size;
#ifdef USE_WORLD_CLIP_PLANES
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 21c925560b9..da6e6502e62 100644
--- a/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_geom.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_geom.glsl
@@ -69,10 +69,10 @@ void main(void)
vec4 P3 = gl_in[3].gl_Position;
/* get the four vertices passed to the shader */
- vec2 sp0 = toScreenSpace(P0); // start of previous segment
- vec2 sp1 = toScreenSpace(P1); // end of previous segment, start of current segment
- vec2 sp2 = toScreenSpace(P2); // end of current segment, start of next segment
- vec2 sp3 = toScreenSpace(P3); // end of next segment
+ vec2 sp0 = toScreenSpace(P0); /* start of previous segment */
+ vec2 sp1 = toScreenSpace(P1); /* end of previous segment, start of current segment */
+ vec2 sp2 = toScreenSpace(P2); /* end of current segment, start of next segment */
+ vec2 sp3 = toScreenSpace(P3); /* end of next segment */
/* culling outside viewport */
vec2 area = Viewport * 4.0;
@@ -100,8 +100,8 @@ void main(void)
vec2 n2 = vec2(-v2.y, v2.x);
/* determine miter lines by averaging the normals of the 2 segments */
- vec2 miter_a = normalize(n0 + n1); // miter at start of current segment
- vec2 miter_b = normalize(n1 + n2); // miter at end of current segment
+ vec2 miter_a = normalize(n0 + n1); /* miter at start of current segment */
+ vec2 miter_b = normalize(n1 + n2); /* miter at end of current segment */
/* determine the length of the miter by projecting it onto normal and then inverse it */
float an1 = dot(miter_a, n1);
diff --git a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_aa_frag.glsl b/source/blender/gpu/shaders/gpu_shader_point_uniform_color_aa_frag.glsl
index a8e9c620535..52d59d2030f 100644
--- a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_aa_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_point_uniform_color_aa_frag.glsl
@@ -8,13 +8,13 @@ void main()
{
float dist = length(gl_PointCoord - vec2(0.5));
- // transparent outside of point
- // --- 0 ---
- // smooth transition
- // --- 1 ---
- // pure point color
- // ...
- // dist = 0 at center of point
+ /* transparent outside of point
+ * --- 0 ---
+ * smooth transition
+ * --- 1 ---
+ * pure point color
+ * ...
+ * dist = 0 at center of point */
fragColor.rgb = color.rgb;
fragColor.a = mix(color.a, 0.0, smoothstep(radii[1], radii[0], dist));
diff --git a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl b/source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl
index 1c1301dd818..2ece73b3845 100644
--- a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl
@@ -9,17 +9,17 @@ void main()
{
float dist = length(gl_PointCoord - vec2(0.5));
- // transparent outside of point
- // --- 0 ---
- // smooth transition
- // --- 1 ---
- // pure outline color
- // --- 2 ---
- // smooth transition
- // --- 3 ---
- // pure point color
- // ...
- // dist = 0 at center of point
+ /* transparent outside of point
+ * --- 0 ---
+ * smooth transition
+ * --- 1 ---
+ * pure outline color
+ * --- 2 ---
+ * smooth transition
+ * --- 3 ---
+ * pure point color
+ * ...
+ * dist = 0 at center of point */
float midStroke = 0.5 * (radii[1] + radii[2]);
diff --git a/source/blender/gpu/shaders/gpu_shader_point_varying_color_outline_aa_frag.glsl b/source/blender/gpu/shaders/gpu_shader_point_varying_color_outline_aa_frag.glsl
index 11694de38ca..1d936e4e072 100644
--- a/source/blender/gpu/shaders/gpu_shader_point_varying_color_outline_aa_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_point_varying_color_outline_aa_frag.glsl
@@ -9,17 +9,17 @@ void main()
{
float dist = length(gl_PointCoord - vec2(0.5));
- // transparent outside of point
- // --- 0 ---
- // smooth transition
- // --- 1 ---
- // pure outline color
- // --- 2 ---
- // smooth transition
- // --- 3 ---
- // pure fill color
- // ...
- // dist = 0 at center of point
+ /* transparent outside of point
+ * --- 0 ---
+ * smooth transition
+ * --- 1 ---
+ * pure outline color
+ * --- 2 ---
+ * smooth transition
+ * --- 3 ---
+ * pure fill color
+ * ...
+ * dist = 0 at center of point */
float midStroke = 0.5 * (radii[1] + radii[2]);
diff --git a/source/blender/gpu/shaders/gpu_shader_point_varying_color_varying_outline_aa_frag.glsl b/source/blender/gpu/shaders/gpu_shader_point_varying_color_varying_outline_aa_frag.glsl
index 6d997ec14cc..c9bd9e881bf 100644
--- a/source/blender/gpu/shaders/gpu_shader_point_varying_color_varying_outline_aa_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_point_varying_color_varying_outline_aa_frag.glsl
@@ -8,17 +8,17 @@ void main()
{
float dist = length(gl_PointCoord - vec2(0.5));
- // transparent outside of point
- // --- 0 ---
- // smooth transition
- // --- 1 ---
- // pure outline color
- // --- 2 ---
- // smooth transition
- // --- 3 ---
- // pure fill color
- // ...
- // dist = 0 at center of point
+ /* transparent outside of point
+ * --- 0 ---
+ * smooth transition
+ * --- 1 ---
+ * pure outline color
+ * --- 2 ---
+ * smooth transition
+ * --- 3 ---
+ * pure fill color
+ * ...
+ * dist = 0 at center of point */
float midStroke = 0.5 * (radii[1] + radii[2]);
diff --git a/source/blender/ikplugin/intern/iksolver_plugin.c b/source/blender/ikplugin/intern/iksolver_plugin.c
index a4381f0ca8f..f569634defc 100644
--- a/source/blender/ikplugin/intern/iksolver_plugin.c
+++ b/source/blender/ikplugin/intern/iksolver_plugin.c
@@ -89,12 +89,12 @@ static void initialize_posetree(struct Object *UNUSED(ob), bPoseChannel *pchan_t
for (curchan = pchan_tip; curchan; curchan = curchan->parent) {
pchan_root = curchan;
- curchan->flag |= POSE_CHAIN; // don't forget to clear this
+ curchan->flag |= POSE_CHAIN; /* don't forget to clear this */
chanlist[segcount] = curchan;
segcount++;
if (segcount == data->rootbone || segcount > 255) {
- break; // 255 is weak
+ break; /* 255 is weak */
}
}
if (!segcount) {
@@ -220,7 +220,7 @@ static void make_dmats(bPoseChannel *pchan)
if (pchan->parent) {
float iR_parmat[4][4];
invert_m4_m4(iR_parmat, pchan->parent->pose_mat);
- mul_m4_m4m4(pchan->chan_mat, iR_parmat, pchan->pose_mat); // delta mat
+ mul_m4_m4m4(pchan->chan_mat, iR_parmat, pchan->pose_mat); /* delta mat */
}
else {
copy_m4_m4(pchan->chan_mat, pchan->pose_mat);
@@ -231,7 +231,7 @@ static void make_dmats(bPoseChannel *pchan)
/* formula: pose_mat(b) = pose_mat(b-1) * diffmat(b-1, b) * ik_mat(b) */
/* to make this work, the diffmats have to be precalculated! Stored in chan_mat */
static void where_is_ik_bone(bPoseChannel *pchan,
- float ik_mat[3][3]) // nr = to detect if this is first bone
+ float ik_mat[3][3]) /* nr = to detect if this is first bone */
{
float vec[3], ikmat[4][4];
@@ -594,8 +594,8 @@ void iksolver_initialize_tree(struct Depsgraph *UNUSED(depsgraph),
bPoseChannel *pchan;
for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
- if (pchan->constflag & PCHAN_HAS_IK) { // flag is set on editing constraints
- initialize_posetree(ob, pchan); // will attach it to root!
+ if (pchan->constflag & PCHAN_HAS_IK) { /* flag is set on editing constraints */
+ initialize_posetree(ob, pchan); /* will attach it to root! */
}
}
ob->pose->flag &= ~POSE_WAS_REBUILT;
@@ -618,7 +618,7 @@ void iksolver_execute_tree(struct Depsgraph *depsgraph,
/* 4. walk over the tree for regular solving */
for (a = 0; a < tree->totchannel; a++) {
- if (!(tree->pchan[a]->flag & POSE_DONE)) { // successive trees can set the flag
+ if (!(tree->pchan[a]->flag & POSE_DONE)) { /* successive trees can set the flag */
BKE_pose_where_is_bone(depsgraph, scene, ob, tree->pchan[a], ctime, 1);
}
/* Tell blender that this channel was controlled by IK,
diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp
index 0bc73d4812b..e127e377858 100644
--- a/source/blender/ikplugin/intern/itasc_plugin.cpp
+++ b/source/blender/ikplugin/intern/itasc_plugin.cpp
@@ -27,7 +27,7 @@
#include <string.h>
#include <vector>
-// iTaSC headers
+/* iTaSC headers */
#ifdef WITH_IK_ITASC
# include "Armature.hpp"
# include "Cache.hpp"
@@ -58,17 +58,17 @@
#include "itasc_plugin.h"
-// default parameters
+/* default parameters */
static bItasc DefIKParam;
-// in case of animation mode, feedback and timestep is fixed
+/* in case of animation mode, feedback and timestep is fixed */
// #define ANIM_TIMESTEP 1.0
#define ANIM_FEEDBACK 0.8
// #define ANIM_QMAX 0.52
-// Structure pointed by bPose.ikdata
-// It contains everything needed to simulate the armatures
-// There can be several simulation islands independent to each other
+/* Structure pointed by bPose.ikdata
+ * It contains everything needed to simulate the armatures
+ * There can be several simulation islands independent to each other */
struct IK_Data {
struct IK_Scene *first;
};
@@ -80,7 +80,7 @@ typedef void (*ErrorCallback)(const iTaSC::ConstraintValues *values,
unsigned int nvalues,
IK_Target *iktarget);
-// one structure for each target in the scene
+/* one structure for each target in the scene */
struct IK_Target {
struct Depsgraph *bldepsgraph;
struct Scene *blscene;
@@ -88,16 +88,16 @@ struct IK_Target {
iTaSC::ConstraintSet *constraint;
struct bConstraint *blenderConstraint;
struct bPoseChannel *rootChannel;
- Object *owner; // for auto IK
+ Object *owner; /* for auto IK */
ErrorCallback errorCallback;
std::string targetName;
std::string constraintName;
unsigned short controlType;
- short channel; // index in IK channel array of channel on which this target is defined
- short ee; // end effector number
- bool simulation; // true when simulation mode is used (update feedback)
- bool eeBlend; // end effector affected by enforce blending
- float eeRest[4][4]; // end effector initial pose relative to armature
+ short channel; /* index in IK channel array of channel on which this target is defined */
+ short ee; /* end effector number */
+ bool simulation; /* true when simulation mode is used (update feedback) */
+ bool eeBlend; /* end effector affected by enforce blending */
+ float eeRest[4][4]; /* end effector initial pose relative to armature */
IK_Target()
{
@@ -124,17 +124,17 @@ struct IK_Target {
};
struct IK_Channel {
- bPoseChannel *pchan; // channel where we must copy matrix back
- KDL::Frame frame; // frame of the bone relative to object base, not armature base
- std::string tail; // segment name of the joint from which we get the bone tail
- std::string head; // segment name of the joint from which we get the bone head
- int parent; // index in this array of the parent channel
- short jointType; // type of joint, combination of IK_SegmentFlag
- char ndof; // number of joint angles for this channel
- char jointValid; // set to 1 when jointValue has been computed
- // for joint constraint
- Object *owner; // for pose and IK param
- double jointValue[4]; // computed joint value
+ bPoseChannel *pchan; /* channel where we must copy matrix back */
+ KDL::Frame frame; /* frame of the bone relative to object base, not armature base */
+ std::string tail; /* segment name of the joint from which we get the bone tail */
+ std::string head; /* segment name of the joint from which we get the bone head */
+ int parent; /* index in this array of the parent channel */
+ short jointType; /* type of joint, combination of IK_SegmentFlag */
+ char ndof; /* number of joint angles for this channel */
+ char jointValid; /* set to 1 when jointValue has been computed */
+ /* for joint constraint */
+ Object *owner; /* for pose and IK param */
+ double jointValue[4]; /* computed joint value */
IK_Channel()
{
@@ -155,20 +155,20 @@ struct IK_Scene {
struct Depsgraph *bldepsgraph;
struct Scene *blscene;
IK_Scene *next;
- int numchan; // number of channel in pchan
- int numjoint; // number of joint in jointArray
- // array of bone information, one per channel in the tree
+ int numchan; /* number of channel in pchan */
+ int numjoint; /* number of joint in jointArray */
+ /* array of bone information, one per channel in the tree */
IK_Channel *channels;
iTaSC::Armature *armature;
iTaSC::Cache *cache;
iTaSC::Scene *scene;
- iTaSC::MovingFrame *base; // armature base object
- KDL::Frame baseFrame; // frame of armature base relative to blArmature
- KDL::JntArray jointArray; // buffer for storing temporary joint array
+ iTaSC::MovingFrame *base; /* armature base object */
+ KDL::Frame baseFrame; /* frame of armature base relative to blArmature */
+ KDL::JntArray jointArray; /* buffer for storing temporary joint array */
iTaSC::Solver *solver;
Object *blArmature;
- float blScale; // scale of the Armature object (assume uniform scaling)
- float blInvScale; // inverse of Armature object scale
+ float blScale; /* scale of the Armature object (assume uniform scaling) */
+ float blInvScale; /* inverse of Armature object scale */
struct bConstraint *polarConstraint;
std::vector<IK_Target *> targets;
@@ -192,7 +192,7 @@ struct IK_Scene {
~IK_Scene()
{
- // delete scene first
+ /* delete scene first */
delete scene;
for (std::vector<IK_Target *>::iterator it = targets.begin(); it != targets.end(); ++it) {
delete (*it);
@@ -202,12 +202,12 @@ struct IK_Scene {
delete solver;
delete armature;
delete base;
- // delete cache last
+ /* delete cache last */
delete cache;
}
};
-// type of IK joint, can be combined to list the joints corresponding to a bone
+/* type of IK joint, can be combined to list the joints corresponding to a bone */
enum IK_SegmentFlag {
IK_XDOF = 1,
IK_YDOF = 2,
@@ -246,13 +246,13 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co
for (curchan = pchan_tip; curchan; curchan = curchan->parent) {
pchan_root = curchan;
- if (++segcount > 255) { // 255 is weak
+ if (++segcount > 255) { /* 255 is weak */
break;
}
if (segcount == rootbone) {
- // reached this end of the chain but if the chain is overlapping with a
- // previous one, we must go back up to the root of the other chain
+ /* reached this end of the chain but if the chain is overlapping with a
+ * previous one, we must go back up to the root of the other chain */
if ((curchan->flag & POSE_CHAIN) && BLI_listbase_is_empty(&curchan->iktree)) {
rootbone++;
continue;
@@ -261,21 +261,21 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co
}
if (BLI_listbase_is_empty(&curchan->iktree) == false) {
- // Oh oh, there is already a chain starting from this channel and our chain is longer...
- // Should handle this by moving the previous chain up to the beginning of our chain
- // For now we just stop here
+ /* Oh oh, there is already a chain starting from this channel and our chain is longer...
+ * Should handle this by moving the previous chain up to the beginning of our chain
+ * For now we just stop here */
break;
}
}
if (!segcount) {
return 0;
}
- // we reached a limit and still not the end of a previous chain, quit
+ /* we reached a limit and still not the end of a previous chain, quit */
if ((pchan_root->flag & POSE_CHAIN) && BLI_listbase_is_empty(&pchan_root->iktree)) {
return 0;
}
- // now that we know how many segment we have, set the flag
+ /* now that we know how many segment we have, set the flag */
for (rootbone = segcount, segcount = 0, curchan = pchan_tip; segcount < rootbone;
segcount++, curchan = curchan->parent) {
chanlist[segcount] = curchan;
@@ -286,8 +286,8 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co
/* create a target */
target = (PoseTarget *)MEM_callocN(sizeof(PoseTarget), "posetarget");
target->con = con;
- // by construction there can be only one tree per channel
- // and each channel can be part of at most one tree.
+ /* by construction there can be only one tree per channel
+ * and each channel can be part of at most one tree. */
tree = (PoseTree *)pchan_root->iktree.first;
if (tree == NULL) {
@@ -308,7 +308,7 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co
/* AND! link the tree to the root */
BLI_addtail(&pchan_root->iktree, tree);
- // new tree
+ /* new tree */
treecount = 1;
}
else {
@@ -319,7 +319,7 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co
size = MIN2(segcount, tree->totchannel);
a = t = 0;
while (a < size && t < tree->totchannel) {
- // locate first matching channel
+ /* locate first matching channel */
for (; t < tree->totchannel && tree->pchan[t] != chanlist[segcount - a - 1]; t++) {
/* pass */
}
@@ -368,7 +368,7 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co
tree->totchannel = newsize;
}
- // reusing tree
+ /* reusing tree */
treecount = 0;
}
@@ -431,8 +431,8 @@ static IK_Data *get_ikdata(bPose *pose)
return (IK_Data *)pose->ikdata;
}
pose->ikdata = MEM_callocN(sizeof(IK_Data), "iTaSC ikdata");
- // here init ikdata if needed
- // now that we have scene, make sure the default param are initialized
+ /* here init ikdata if needed
+ * now that we have scene, make sure the default param are initialized */
if (!DefIKParam.iksolver) {
BKE_pose_itasc_init(&DefIKParam);
}
@@ -466,7 +466,7 @@ static double EulerAngleFromMatrix(const KDL::Rotation &R, int axis)
static double ComputeTwist(const KDL::Rotation &R)
{
- // qy and qw are the y and w components of the quaternion from R
+ /* qy and qw are the y and w components of the quaternion from R */
double qy = R(0, 2) - R(2, 0);
double qw = R(0, 0) + R(1, 1) + R(2, 2) + 1;
@@ -477,7 +477,7 @@ static double ComputeTwist(const KDL::Rotation &R)
static void RemoveEulerAngleFromMatrix(KDL::Rotation &R, double angle, int axis)
{
- // compute twist parameter
+ /* compute twist parameter */
KDL::Rotation T;
switch (axis) {
case 0:
@@ -492,7 +492,7 @@ static void RemoveEulerAngleFromMatrix(KDL::Rotation &R, double angle, int axis)
default:
return;
}
- // remove angle
+ /* remove angle */
R = R * T;
}
@@ -530,18 +530,18 @@ static void GetJointRotation(KDL::Rotation &boneRot, int type, double *rot)
{
switch (type & ~IK_TRANSY) {
default:
- // fixed bone, no joint
+ /* fixed bone, no joint */
break;
case IK_XDOF:
- // RX only, get the X rotation
+ /* RX only, get the X rotation */
rot[0] = EulerAngleFromMatrix(boneRot, 0);
break;
case IK_YDOF:
- // RY only, get the Y rotation
+ /* RY only, get the Y rotation */
rot[0] = ComputeTwist(boneRot);
break;
case IK_ZDOF:
- // RZ only, get the Z rotation
+ /* RZ only, get the Z rotation */
rot[0] = EulerAngleFromMatrix(boneRot, 2);
break;
case IK_XDOF | IK_YDOF:
@@ -550,11 +550,11 @@ static void GetJointRotation(KDL::Rotation &boneRot, int type, double *rot)
rot[0] = EulerAngleFromMatrix(boneRot, 0);
break;
case IK_SWING:
- // RX+RZ
+ /* RX+RZ */
boneRot.GetXZRot().GetValue(rot);
break;
case IK_YDOF | IK_ZDOF:
- // RZ+RY
+ /* RZ+RY */
rot[1] = ComputeTwist(boneRot);
RemoveEulerAngleFromMatrix(boneRot, rot[1], 1);
rot[0] = EulerAngleFromMatrix(boneRot, 2);
@@ -576,8 +576,8 @@ static bool target_callback(const iTaSC::Timestamp &timestamp,
void *param)
{
IK_Target *target = (IK_Target *)param;
- // compute next target position
- // get target matrix from constraint.
+ /* compute next target position
+ * get target matrix from constraint. */
bConstraint *constraint = (bConstraint *)target->blenderConstraint;
float tarmat[4][4];
@@ -590,12 +590,12 @@ static bool target_callback(const iTaSC::Timestamp &timestamp,
tarmat,
1.0);
- // rootmat contains the target pose in world coordinate
- // if enforce is != 1.0, blend the target position with the end effector position
- // if the armature was in rest position. This information is available in eeRest
+ /* rootmat contains the target pose in world coordinate
+ * if enforce is != 1.0, blend the target position with the end effector position
+ * if the armature was in rest position. This information is available in eeRest */
if (constraint->enforce != 1.0f && target->eeBlend) {
- // eeRest is relative to the reference frame of the IK root
- // get this frame in world reference
+ /* eeRest is relative to the reference frame of the IK root
+ * get this frame in world reference */
float restmat[4][4];
bPoseChannel *pchan = target->rootChannel;
if (pchan->parent) {
@@ -608,7 +608,7 @@ static bool target_callback(const iTaSC::Timestamp &timestamp,
else {
mul_m4_m4m4(restmat, target->owner->obmat, target->eeRest);
}
- // blend the target
+ /* blend the target */
blend_m4_m4m4(tarmat, restmat, tarmat, constraint->enforce);
}
next.setValue(&tarmat[0][0]);
@@ -621,11 +621,11 @@ static bool base_callback(const iTaSC::Timestamp &timestamp,
void *param)
{
IK_Scene *ikscene = (IK_Scene *)param;
- // compute next armature base pose
- // algorithm:
- // ikscene->pchan[0] is the root channel of the tree
- // if it has a parent, get the pose matrix from it and replace [3] by parent pchan->tail
- // then multiply by the armature matrix to get ikscene->armature base position
+ /* compute next armature base pose
+ * algorithm:
+ * ikscene->pchan[0] is the root channel of the tree
+ * if it has a parent, get the pose matrix from it and replace [3] by parent pchan->tail
+ * then multiply by the armature matrix to get ikscene->armature base position */
bPoseChannel *pchan = ikscene->channels[0].pchan;
float rootmat[4][4];
if (pchan->parent) {
@@ -633,9 +633,9 @@ static bool base_callback(const iTaSC::Timestamp &timestamp,
float chanmat[4][4];
copy_m4_m4(chanmat, pchan->pose_mat);
copy_v3_v3(chanmat[3], pchan->pose_tail);
- // save the base as a frame too so that we can compute deformation after simulation
+ /* save the base as a frame too so that we can compute deformation after simulation */
ikscene->baseFrame.setValue(&chanmat[0][0]);
- // iTaSC armature is scaled to object scale, scale the base frame too
+ /* iTaSC armature is scaled to object scale, scale the base frame too */
ikscene->baseFrame.p *= ikscene->blScale;
mul_m4_m4m4(rootmat, ikscene->blArmature->obmat, chanmat);
}
@@ -644,22 +644,22 @@ static bool base_callback(const iTaSC::Timestamp &timestamp,
ikscene->baseFrame = iTaSC::F_identity;
}
next.setValue(&rootmat[0][0]);
- // if there is a polar target (only during solving otherwise we don't have end efffector)
+ /* if there is a polar target (only during solving otherwise we don't have end efffector) */
if (ikscene->polarConstraint && timestamp.update) {
- // compute additional rotation of base frame so that armature follows the polar target
- float imat[4][4]; // IK tree base inverse matrix
- float polemat[4][4]; // polar target in IK tree base frame
- float goalmat[4][4]; // target in IK tree base frame
- float mat[4][4]; // temp matrix
+ /* compute additional rotation of base frame so that armature follows the polar target */
+ float imat[4][4]; /* IK tree base inverse matrix */
+ float polemat[4][4]; /* polar target in IK tree base frame */
+ float goalmat[4][4]; /* target in IK tree base frame */
+ float mat[4][4]; /* temp matrix */
bKinematicConstraint *poledata = (bKinematicConstraint *)ikscene->polarConstraint->data;
invert_m4_m4(imat, rootmat);
- // polar constraint imply only one target
+ /* polar constraint imply only one target */
IK_Target *iktarget = ikscene->targets[0];
- // root channel from which we take the bone initial orientation
+ /* root channel from which we take the bone initial orientation */
IK_Channel &rootchan = ikscene->channels[0];
- // get polar target matrix in world space
+ /* get polar target matrix in world space */
BKE_constraint_target_matrix_get(ikscene->bldepsgraph,
ikscene->blscene,
ikscene->polarConstraint,
@@ -668,23 +668,23 @@ static bool base_callback(const iTaSC::Timestamp &timestamp,
ikscene->blArmature,
mat,
1.0);
- // convert to armature space
+ /* convert to armature space */
mul_m4_m4m4(polemat, imat, mat);
- // get the target in world space
- // (was computed before as target object are defined before base object).
+ /* get the target in world space
+ * (was computed before as target object are defined before base object). */
iktarget->target->getPose().getValue(mat[0]);
- // convert to armature space
+ /* convert to armature space */
mul_m4_m4m4(goalmat, imat, mat);
- // take position of target, polar target, end effector, in armature space
+ /* take position of target, polar target, end effector, in armature space */
KDL::Vector goalpos(goalmat[3]);
KDL::Vector polepos(polemat[3]);
KDL::Vector endpos = ikscene->armature->getPose(iktarget->ee).p;
- // get root bone orientation
+ /* get root bone orientation */
KDL::Frame rootframe;
ikscene->armature->getRelativeFrame(rootframe, rootchan.tail);
KDL::Vector rootx = rootframe.M.UnitX();
KDL::Vector rootz = rootframe.M.UnitZ();
- // and compute root bone head
+ /* and compute root bone head */
double q_rest[3], q[3], length;
const KDL::Joint *joint;
const KDL::Frame *tip;
@@ -692,27 +692,27 @@ static bool base_callback(const iTaSC::Timestamp &timestamp,
length = (joint->getType() == KDL::Joint::TransY) ? q[0] : tip->p(1);
KDL::Vector rootpos = rootframe.p - length * rootframe.M.UnitY();
- // compute main directions
+ /* compute main directions */
KDL::Vector dir = KDL::Normalize(endpos - rootpos);
KDL::Vector poledir = KDL::Normalize(goalpos - rootpos);
- // compute up directions
+ /* compute up directions */
KDL::Vector poleup = KDL::Normalize(polepos - rootpos);
KDL::Vector up = rootx * KDL::cos(poledata->poleangle) + rootz * KDL::sin(poledata->poleangle);
- // from which we build rotation matrix
+ /* from which we build rotation matrix */
KDL::Rotation endrot, polerot;
- // for the armature, using the root bone orientation
+ /* for the armature, using the root bone orientation */
KDL::Vector x = KDL::Normalize(dir * up);
endrot.UnitX(x);
endrot.UnitY(KDL::Normalize(x * dir));
endrot.UnitZ(-dir);
- // for the polar target
+ /* for the polar target */
x = KDL::Normalize(poledir * poleup);
polerot.UnitX(x);
polerot.UnitY(KDL::Normalize(x * poledir));
polerot.UnitZ(-poledir);
- // the difference between the two is the rotation we want to apply
+ /* the difference between the two is the rotation we want to apply */
KDL::Rotation result(polerot * endrot.Inverse());
- // apply on base frame as this is an artificial additional rotation
+ /* apply on base frame as this is an artificial additional rotation */
next.M = next.M * result;
ikscene->baseFrame.M = ikscene->baseFrame.M * result;
}
@@ -729,7 +729,7 @@ static bool copypose_callback(const iTaSC::Timestamp &timestamp,
iTaSC::ConstraintValues *values = _values;
bItasc *ikparam = (bItasc *)iktarget->owner->pose->ikparam;
- // we need default parameters
+ /* we need default parameters */
if (!ikparam) {
ikparam = &DefIKParam;
}
@@ -748,14 +748,14 @@ static bool copypose_callback(const iTaSC::Timestamp &timestamp,
}
else {
if (iktarget->controlType & iTaSC::CopyPose::CTL_POSITION) {
- // update error
+ /* update error */
values->alpha = condata->weight;
values->action = iTaSC::ACT_ALPHA | iTaSC::ACT_FEEDBACK;
values->feedback = (iktarget->simulation) ? ikparam->feedback : ANIM_FEEDBACK;
values++;
}
if (iktarget->controlType & iTaSC::CopyPose::CTL_ROTATION) {
- // update error
+ /* update error */
values->alpha = condata->orientweight;
values->action = iTaSC::ACT_ALPHA | iTaSC::ACT_FEEDBACK;
values->feedback = (iktarget->simulation) ? ikparam->feedback : ANIM_FEEDBACK;
@@ -774,7 +774,7 @@ static void copypose_error(const iTaSC::ConstraintValues *values,
int i;
if (iktarget->controlType & iTaSC::CopyPose::CTL_POSITION) {
- // update error
+ /* update error */
for (i = 0, error = 0.0, value = values->values; i < values->number; i++, value++) {
error += KDL::sqr(value->y - value->yd);
}
@@ -782,7 +782,7 @@ static void copypose_error(const iTaSC::ConstraintValues *values,
values++;
}
if (iktarget->controlType & iTaSC::CopyPose::CTL_ROTATION) {
- // update error
+ /* update error */
for (i = 0, error = 0.0, value = values->values; i < values->number; i++, value++) {
error += KDL::sqr(value->y - value->yd);
}
@@ -800,12 +800,12 @@ static bool distance_callback(const iTaSC::Timestamp &timestamp,
bKinematicConstraint *condata = (bKinematicConstraint *)iktarget->blenderConstraint->data;
iTaSC::ConstraintValues *values = _values;
bItasc *ikparam = (bItasc *)iktarget->owner->pose->ikparam;
- // we need default parameters
+ /* we need default parameters */
if (!ikparam) {
ikparam = &DefIKParam;
}
- // update weight according to mode
+ /* update weight according to mode */
if (iktarget->blenderConstraint->flag & CONSTRAINT_OFF) {
values->alpha = 0.0;
}
@@ -822,7 +822,7 @@ static bool distance_callback(const iTaSC::Timestamp &timestamp,
break;
}
if (!timestamp.substep) {
- // only update value on first timestep
+ /* only update value on first timestep */
switch (condata->mode) {
case LIMITDIST_INSIDE:
values->values[0].yd = condata->dist * 0.95;
@@ -859,11 +859,11 @@ static bool joint_callback(const iTaSC::Timestamp &timestamp,
bPoseChannel *chan = ikchan->pchan;
int dof;
- // a channel can be split into multiple joints, so we get called multiple
- // times for one channel (this callback is only for 1 joint in the armature)
- // the IK_JointTarget structure is shared between multiple joint constraint
- // and the target joint values is computed only once, remember this in jointValid
- // Don't forget to reset it before each frame
+ /* a channel can be split into multiple joints, so we get called multiple
+ * times for one channel (this callback is only for 1 joint in the armature)
+ * the IK_JointTarget structure is shared between multiple joint constraint
+ * and the target joint values is computed only once, remember this in jointValid
+ * Don't forget to reset it before each frame */
if (!ikchan->jointValid) {
float rmat[3][3];
@@ -894,8 +894,8 @@ static bool joint_callback(const iTaSC::Timestamp &timestamp,
GetJointRotation(jointRot, ikchan->jointType, ikchan->jointValue);
ikchan->jointValid = 1;
}
- // determine which part of jointValue is used for this joint
- // closely related to the way the joints are defined
+ /* determine which part of jointValue is used for this joint
+ * closely related to the way the joints are defined */
switch (ikchan->jointType & ~IK_TRANSY) {
case IK_XDOF:
case IK_YDOF:
@@ -903,19 +903,19 @@ static bool joint_callback(const iTaSC::Timestamp &timestamp,
dof = 0;
break;
case IK_XDOF | IK_YDOF:
- // X + Y
+ /* X + Y */
dof = (_values[0].id == iTaSC::Armature::ID_JOINT_RX) ? 0 : 1;
break;
case IK_SWING:
- // XZ
+ /* XZ */
dof = 0;
break;
case IK_YDOF | IK_ZDOF:
- // Z + Y
+ /* Z + Y */
dof = (_values[0].id == iTaSC::Armature::ID_JOINT_RZ) ? 0 : 1;
break;
case IK_SWING | IK_YDOF:
- // XZ + Y
+ /* XZ + Y */
dof = (_values[0].id == iTaSC::Armature::ID_JOINT_RY) ? 2 : 0;
break;
case IK_REVOLUTE:
@@ -935,7 +935,7 @@ static bool joint_callback(const iTaSC::Timestamp &timestamp,
return true;
}
-// build array of joint corresponding to IK chain
+/* build array of joint corresponding to IK chain */
static int convert_channels(struct Depsgraph *depsgraph,
IK_Scene *ikscene,
PoseTree *tree,
@@ -952,14 +952,14 @@ static int convert_channels(struct Depsgraph *depsgraph,
ikchan->parent = (a > 0) ? tree->parent[a] : -1;
ikchan->owner = ikscene->blArmature;
- // the constraint and channels must be applied before we build the iTaSC scene,
- // this is because some of the pose data (e.g. pose head) don't have corresponding
- // joint angles and can't be applied to the iTaSC armature dynamically
+ /* the constraint and channels must be applied before we build the iTaSC scene,
+ * this is because some of the pose data (e.g. pose head) don't have corresponding
+ * joint angles and can't be applied to the iTaSC armature dynamically */
if (!(pchan->flag & POSE_DONE)) {
BKE_pose_where_is_bone(depsgraph, ikscene->blscene, ikscene->blArmature, pchan, ctime, 1);
}
- // tell blender that this channel was controlled by IK,
- // it's cleared on each BKE_pose_where_is()
+ /* tell blender that this channel was controlled by IK,
+ * it's cleared on each BKE_pose_where_is() */
pchan->flag |= (POSE_DONE | POSE_CHAIN);
/* set DoF flag */
@@ -1016,17 +1016,17 @@ static int convert_channels(struct Depsgraph *depsgraph,
ikchan->ndof = 0;
break;
case IK_XDOF:
- // RX only, get the X rotation
+ /* RX only, get the X rotation */
ikchan->jointType = IK_XDOF;
ikchan->ndof = 1;
break;
case IK_YDOF:
- // RY only, get the Y rotation
+ /* RY only, get the Y rotation */
ikchan->jointType = IK_YDOF;
ikchan->ndof = 1;
break;
case IK_ZDOF:
- // RZ only, get the Zz rotation
+ /* RZ only, get the Zz rotation */
ikchan->jointType = IK_ZDOF;
ikchan->ndof = 1;
break;
@@ -1035,19 +1035,19 @@ static int convert_channels(struct Depsgraph *depsgraph,
ikchan->ndof = 2;
break;
case IK_XDOF | IK_ZDOF:
- // RX+RZ
+ /* RX+RZ */
ikchan->jointType = IK_SWING;
ikchan->ndof = 2;
break;
case IK_YDOF | IK_ZDOF:
- // RZ+RY
+ /* RZ+RY */
ikchan->jointType = IK_ZDOF | IK_YDOF;
ikchan->ndof = 2;
break;
case IK_XDOF | IK_YDOF | IK_ZDOF:
- // spherical joint
+ /* spherical joint */
if (pchan->ikflag & (BONE_IK_XLIMIT | BONE_IK_YLIMIT | BONE_IK_ZLIMIT)) {
- // decompose in a Swing+RotY joint
+ /* decompose in a Swing+RotY joint */
ikchan->jointType = IK_SWING | IK_YDOF;
}
else {
@@ -1062,26 +1062,26 @@ static int convert_channels(struct Depsgraph *depsgraph,
}
njoint += ikchan->ndof;
}
- // njoint is the joint coordinate, create the Joint Array
+ /* njoint is the joint coordinate, create the Joint Array */
ikscene->jointArray.resize(njoint);
ikscene->numjoint = njoint;
return njoint;
}
-// compute array of joint value corresponding to current pose
+/* compute array of joint value corresponding to current pose */
static void convert_pose(IK_Scene *ikscene)
{
KDL::Rotation boneRot;
bPoseChannel *pchan;
IK_Channel *ikchan;
Bone *bone;
- float rmat[4][4]; // rest pose of bone with parent taken into account
- float bmat[4][4]; // difference
+ float rmat[4][4]; /* rest pose of bone with parent taken into account */
+ float bmat[4][4]; /* difference */
float scale;
double *rot;
int a, joint;
- // assume uniform scaling and take Y scale as general scale for the armature
+ /* assume uniform scaling and take Y scale as general scale for the armature */
scale = len_v3(ikscene->blArmature->obmat[1]);
rot = ikscene->jointArray(0);
for (joint = a = 0, ikchan = ikscene->channels;
@@ -1103,7 +1103,7 @@ static void convert_pose(IK_Scene *ikscene)
boneRot.setValue(bmat[0]);
GetJointRotation(boneRot, ikchan->jointType, rot);
if (ikchan->jointType & IK_TRANSY) {
- // compute actual length
+ /* compute actual length */
rot[ikchan->ndof - 1] = len_v3v3(pchan->pose_tail, pchan->pose_head) * scale;
}
rot += ikchan->ndof;
@@ -1111,7 +1111,7 @@ static void convert_pose(IK_Scene *ikscene)
}
}
-// compute array of joint value corresponding to current pose
+/* compute array of joint value corresponding to current pose */
static void BKE_pose_rest(IK_Scene *ikscene)
{
bPoseChannel *pchan;
@@ -1121,11 +1121,11 @@ static void BKE_pose_rest(IK_Scene *ikscene)
double *rot;
int a, joint;
- // assume uniform scaling and take Y scale as general scale for the armature
+ /* assume uniform scaling and take Y scale as general scale for the armature */
scale = len_v3(ikscene->blArmature->obmat[1]);
- // rest pose is 0
+ /* rest pose is 0 */
SetToZero(ikscene->jointArray);
- // except for transY joints
+ /* except for transY joints */
rot = ikscene->jointArray(0);
for (joint = a = 0, ikchan = ikscene->channels;
a < ikscene->numchan && joint < ikscene->numjoint;
@@ -1178,12 +1178,12 @@ static IK_Scene *convert_tree(
ikparam = (bItasc *)ob->pose->ikparam;
if (!ikparam) {
- // you must have our own copy
+ /* you must have our own copy */
ikparam = &DefIKParam;
}
if (ikparam->flag & ITASC_SIMULATION) {
- // no cache in animation mode
+ /* no cache in animation mode */
ikscene->cache = new iTaSC::Cache();
}
@@ -1199,7 +1199,7 @@ static IK_Scene *convert_tree(
return NULL;
}
ikscene->blArmature = ob;
- // assume uniform scaling and take Y scale as general scale for the armature
+ /* assume uniform scaling and take Y scale as general scale for the armature */
ikscene->blScale = len_v3(ob->obmat[1]);
ikscene->blInvScale = (ikscene->blScale < KDL::epsilon) ? 0.0f : 1.0f / ikscene->blScale;
@@ -1208,9 +1208,9 @@ static IK_Scene *convert_tree(
std::string parent;
std::vector<double> weights;
double weight[3];
- // build the array of joints corresponding to the IK chain
+ /* build the array of joints corresponding to the IK chain */
convert_channels(depsgraph, ikscene, tree, ctime);
- // in Blender, the rest pose is always 0 for joints
+ /* in Blender, the rest pose is always 0 for joints */
BKE_pose_rest(ikscene);
rot = ikscene->jointArray(0);
@@ -1219,13 +1219,13 @@ static IK_Scene *convert_tree(
bone = pchan->bone;
KDL::Frame tip(iTaSC::F_identity);
- // compute the position and rotation of the head from previous segment
+ /* compute the position and rotation of the head from previous segment */
Vector3 *fl = bone->bone_mat;
KDL::Rotation brot(
fl[0][0], fl[1][0], fl[2][0], fl[0][1], fl[1][1], fl[2][1], fl[0][2], fl[1][2], fl[2][2]);
- // if the bone is disconnected, the head is movable in pose mode
- // take that into account by using pose matrix instead of bone
- // Note that pose is expressed in armature space, convert to previous bone space
+ /* if the bone is disconnected, the head is movable in pose mode
+ * take that into account by using pose matrix instead of bone
+ * Note that pose is expressed in armature space, convert to previous bone space */
{
float R_parmat[3][3];
float iR_parmat[3][3];
@@ -1249,10 +1249,10 @@ static IK_Scene *convert_tree(
bpos *= ikscene->blScale;
KDL::Frame head(brot, bpos);
- // rest pose length of the bone taking scaling into account
+ /* rest pose length of the bone taking scaling into account */
length = bone->length * ikscene->blScale;
parent = (a > 0) ? ikscene->channels[tree->parent[a]].tail : root;
- // first the fixed segment to the bone head
+ /* first the fixed segment to the bone head */
if (!(ikchan->pchan->bone->flag & BONE_CONNECTED) || head.M.GetRot().Norm() > KDL::epsilon) {
joint = bone->name;
joint += ":H";
@@ -1260,7 +1260,7 @@ static IK_Scene *convert_tree(
parent = joint;
}
if (!(ikchan->jointType & IK_TRANSY)) {
- // fixed length, put it in tip
+ /* fixed length, put it in tip */
tip.p[1] = length;
}
joint = bone->name;
@@ -1269,24 +1269,24 @@ static IK_Scene *convert_tree(
weight[2] = (1.0 - pchan->stiffness[2]);
switch (ikchan->jointType & ~IK_TRANSY) {
case 0:
- // fixed bone
+ /* fixed bone */
joint += ":F";
ret = arm->addSegment(joint, parent, KDL::Joint::None, 0.0, tip);
break;
case IK_XDOF:
- // RX only, get the X rotation
+ /* RX only, get the X rotation */
joint += ":RX";
ret = arm->addSegment(joint, parent, KDL::Joint::RotX, rot[0], tip);
weights.push_back(weight[0]);
break;
case IK_YDOF:
- // RY only, get the Y rotation
+ /* RY only, get the Y rotation */
joint += ":RY";
ret = arm->addSegment(joint, parent, KDL::Joint::RotY, rot[0], tip);
weights.push_back(weight[1]);
break;
case IK_ZDOF:
- // RZ only, get the Zz rotation
+ /* RZ only, get the Zz rotation */
joint += ":RZ";
ret = arm->addSegment(joint, parent, KDL::Joint::RotZ, rot[0], tip);
weights.push_back(weight[2]);
@@ -1310,7 +1310,7 @@ static IK_Scene *convert_tree(
weights.push_back(weight[2]);
break;
case IK_YDOF | IK_ZDOF:
- // RZ+RY
+ /* RZ+RY */
joint += ":RZ";
ret = arm->addSegment(joint, parent, KDL::Joint::RotZ, rot[0]);
weights.push_back(weight[2]);
@@ -1323,7 +1323,7 @@ static IK_Scene *convert_tree(
}
break;
case IK_SWING | IK_YDOF:
- // decompose in a Swing+RotY joint
+ /* decompose in a Swing+RotY joint */
joint += ":SW";
ret = arm->addSegment(joint, parent, KDL::Joint::Swing, rot[0]);
weights.push_back(weight[0]);
@@ -1355,13 +1355,13 @@ static IK_Scene *convert_tree(
weights.push_back(weight[1]);
}
if (!ret) {
- // error making the armature??
+ /* error making the armature?? */
break;
}
- // joint points to the segment that correspond to the bone per say
+ /* joint points to the segment that correspond to the bone per say */
ikchan->tail = joint;
ikchan->head = parent;
- // in case of error
+ /* in case of error */
ret = false;
if ((ikchan->jointType & IK_XDOF) && (pchan->ikflag & (BONE_IK_XLIMIT | BONE_IK_ROTCTL))) {
joint = bone->name;
@@ -1432,7 +1432,7 @@ static IK_Scene *convert_tree(
break;
}
}
- // no error, so restore
+ /* no error, so restore */
ret = true;
rot += ikchan->ndof;
}
@@ -1440,7 +1440,7 @@ static IK_Scene *convert_tree(
delete ikscene;
return NULL;
}
- // for each target, we need to add an end effector in the armature
+ /* for each target, we need to add an end effector in the armature */
for (numtarget = 0, polarcon = NULL, ret = true, target = (PoseTarget *)tree->targets.first;
target;
target = (PoseTarget *)target->next) {
@@ -1448,7 +1448,7 @@ static IK_Scene *convert_tree(
pchan = tree->pchan[target->tip];
if (is_cartesian_constraint(target->con)) {
- // add the end effector
+ /* add the end effector */
IK_Target *iktarget = new IK_Target();
ikscene->targets.push_back(iktarget);
iktarget->ee = arm->addEndEffector(ikscene->channels[target->tip].tail);
@@ -1456,7 +1456,7 @@ static IK_Scene *convert_tree(
ret = false;
break;
}
- // initialize all the fields that we can set at this time
+ /* initialize all the fields that we can set at this time */
iktarget->blenderConstraint = target->con;
iktarget->channel = target->tip;
iktarget->simulation = (ikparam->flag & ITASC_SIMULATION);
@@ -1470,18 +1470,18 @@ static IK_Scene *convert_tree(
iktarget->constraintName += target->con->name;
numtarget++;
if (condata->poletar) {
- // this constraint has a polar target
+ /* this constraint has a polar target */
polarcon = target->con;
}
}
}
- // deal with polar target if any
+ /* deal with polar target if any */
if (numtarget == 1 && polarcon) {
ikscene->polarConstraint = polarcon;
}
- // we can now add the armature
- // the armature is based on a moving frame.
- // initialize with the correct position in case there is no cache
+ /* we can now add the armature
+ * the armature is based on a moving frame.
+ * initialize with the correct position in case there is no cache */
base_callback(iTaSC::Timestamp(), iTaSC::F_identity, initPose, ikscene);
ikscene->base = new iTaSC::MovingFrame(initPose);
ikscene->base->setCallback(base_callback, ikscene);
@@ -1498,31 +1498,31 @@ static IK_Scene *convert_tree(
delete ikscene;
return NULL;
}
- // set the weight
+ /* set the weight */
e_matrix &Wq = arm->getWq();
assert(Wq.cols() == (int)weights.size());
for (int q = 0; q < Wq.cols(); q++) {
Wq(q, q) = weights[q];
}
- // get the inverse rest pose frame of the base to compute relative rest pose of end effectors
- // this is needed to handle the enforce parameter
- // ikscene->pchan[0] is the root channel of the tree
- // if it has no parent, then it's just the identify Frame
+ /* get the inverse rest pose frame of the base to compute relative rest pose of end effectors
+ * this is needed to handle the enforce parameter
+ * ikscene->pchan[0] is the root channel of the tree
+ * if it has no parent, then it's just the identify Frame */
float invBaseFrame[4][4];
pchan = ikscene->channels[0].pchan;
if (pchan->parent) {
- // it has a parent, get the pose matrix from it
+ /* it has a parent, get the pose matrix from it */
float baseFrame[4][4];
pchan = pchan->parent;
copy_m4_m4(baseFrame, pchan->bone->arm_mat);
- // move to the tail and scale to get rest pose of armature base
+ /* move to the tail and scale to get rest pose of armature base */
copy_v3_v3(baseFrame[3], pchan->bone->arm_tail);
invert_m4_m4(invBaseFrame, baseFrame);
}
else {
unit_m4(invBaseFrame);
}
- // finally add the constraint
+ /* finally add the constraint */
for (t = 0; t < ikscene->targets.size(); t++) {
IK_Target *iktarget = ikscene->targets[t];
iktarget->blscene = blscene;
@@ -1533,23 +1533,23 @@ static IK_Scene *convert_tree(
double bonelen;
float mat[4][4];
- // add the end effector
- // estimate the average bone length, used to clamp feedback error
+ /* add the end effector
+ * estimate the average bone length, used to clamp feedback error */
for (bonecnt = 0, bonelen = 0.f, a = iktarget->channel; a >= 0;
a = tree->parent[a], bonecnt++) {
bonelen += ikscene->blScale * tree->pchan[a]->bone->length;
}
bonelen /= bonecnt;
- // store the rest pose of the end effector to compute enforce target
+ /* store the rest pose of the end effector to compute enforce target */
copy_m4_m4(mat, pchan->bone->arm_mat);
copy_v3_v3(mat[3], pchan->bone->arm_tail);
- // get the rest pose relative to the armature base
+ /* get the rest pose relative to the armature base */
mul_m4_m4m4(iktarget->eeRest, invBaseFrame, mat);
iktarget->eeBlend = (!ikscene->polarConstraint && condata->type == CONSTRAINT_IK_COPYPOSE) ?
true :
false;
- // use target_callback to make sure the initPose includes enforce coefficient
+ /* use target_callback to make sure the initPose includes enforce coefficient */
target_callback(iTaSC::Timestamp(), iTaSC::F_identity, initPose, iktarget);
iktarget->target = new iTaSC::MovingFrame(initPose);
iktarget->target->setCallback(target_callback, iktarget);
@@ -1585,7 +1585,7 @@ static IK_Scene *convert_tree(
}
if (controltype) {
iktarget->constraint = new iTaSC::CopyPose(controltype, controltype, bonelen);
- // set the gain
+ /* set the gain */
if (controltype & iTaSC::CopyPose::CTL_POSITION) {
iktarget->constraint->setControlParameter(
iTaSC::CopyPose::ID_POSITION, iTaSC::ACT_ALPHA, condata->weight);
@@ -1597,7 +1597,7 @@ static IK_Scene *convert_tree(
iktarget->constraint->registerCallback(copypose_callback, iktarget);
iktarget->errorCallback = copypose_error;
iktarget->controlType = controltype;
- // add the constraint
+ /* add the constraint */
if (condata->flag & CONSTRAINT_IK_TARGETAXIS) {
ret = scene->addConstraintSet(iktarget->constraintName,
iktarget->constraint,
@@ -1621,9 +1621,9 @@ static IK_Scene *convert_tree(
iTaSC::Distance::ID_DISTANCE, iTaSC::ACT_VALUE, condata->dist);
iktarget->constraint->registerCallback(distance_callback, iktarget);
iktarget->errorCallback = distance_error;
- // we can update the weight on each substep
+ /* we can update the weight on each substep */
iktarget->constraint->substep(true);
- // add the constraint
+ /* add the constraint */
ret = scene->addConstraintSet(iktarget->constraintName,
iktarget->constraint,
armname,
@@ -1647,20 +1647,20 @@ static void create_scene(struct Depsgraph *depsgraph, Scene *scene, Object *ob,
{
bPoseChannel *pchan;
- // create the IK scene
+ /* create the IK scene */
for (pchan = (bPoseChannel *)ob->pose->chanbase.first; pchan;
pchan = (bPoseChannel *)pchan->next) {
- // by construction there is only one tree
+ /* by construction there is only one tree */
PoseTree *tree = (PoseTree *)pchan->iktree.first;
if (tree) {
IK_Data *ikdata = get_ikdata(ob->pose);
- // convert tree in iTaSC::Scene
+ /* convert tree in iTaSC::Scene */
IK_Scene *ikscene = convert_tree(depsgraph, scene, ob, pchan, ctime);
if (ikscene) {
ikscene->next = ikdata->first;
ikdata->first = ikscene;
}
- // delete the trees once we are done
+ /* delete the trees once we are done */
while (tree) {
BLI_remlink(&pchan->iktree, tree);
BLI_freelistN(&tree->targets);
@@ -1683,7 +1683,7 @@ static void create_scene(struct Depsgraph *depsgraph, Scene *scene, Object *ob,
/* returns 1 if scaling has changed and tree must be reinitialized */
static int init_scene(Object *ob)
{
- // check also if scaling has changed
+ /* check also if scaling has changed */
float scale = len_v3(ob->obmat[1]);
IK_Scene *scene;
@@ -1709,26 +1709,26 @@ static void execute_scene(struct Depsgraph *depsgraph,
IK_Channel *ikchan;
if (ikparam->flag & ITASC_SIMULATION) {
for (i = 0, ikchan = ikscene->channels; i < ikscene->numchan; i++, ikchan++) {
- // In simulation mode we don't allow external constraint to change our bones,
- // mark the channel done also tell Blender that this channel is part of IK tree.
- // Cleared on each BKE_pose_where_is()
+ /* In simulation mode we don't allow external constraint to change our bones,
+ * mark the channel done also tell Blender that this channel is part of IK tree.
+ * Cleared on each BKE_pose_where_is() */
ikchan->pchan->flag |= (POSE_DONE | POSE_CHAIN);
ikchan->jointValid = 0;
}
}
else {
- // in animation mode, we must get the bone position from action and constraints
+ /* in animation mode, we must get the bone position from action and constraints */
for (i = 0, ikchan = ikscene->channels; i < ikscene->numchan; i++, ikchan++) {
if (!(ikchan->pchan->flag & POSE_DONE)) {
BKE_pose_where_is_bone(depsgraph, blscene, ikscene->blArmature, ikchan->pchan, ctime, 1);
}
- // tell blender that this channel was controlled by IK,
- // it's cleared on each BKE_pose_where_is()
+ /* tell blender that this channel was controlled by IK,
+ * it's cleared on each BKE_pose_where_is() */
ikchan->pchan->flag |= (POSE_DONE | POSE_CHAIN);
ikchan->jointValid = 0;
}
}
- // only run execute the scene if at least one of our target is enabled
+ /* only run execute the scene if at least one of our target is enabled */
for (i = ikscene->targets.size(); i > 0; i--) {
IK_Target *iktarget = ikscene->targets[i - 1];
if (!(iktarget->blenderConstraint->flag & CONSTRAINT_OFF)) {
@@ -1736,11 +1736,11 @@ static void execute_scene(struct Depsgraph *depsgraph,
}
}
if (i == 0 && ikscene->armature->getNrOfConstraints() == 0) {
- // all constraint disabled
+ /* all constraint disabled */
return;
}
- // compute timestep
+ /* compute timestep */
double timestamp = ctime * frtime + 2147483.648;
double timestep = frtime;
bool reiterate = (ikparam->flag & ITASC_REITERATION) ? true : false;
@@ -1751,16 +1751,16 @@ static void execute_scene(struct Depsgraph *depsgraph,
ikscene->solver->setParam(iTaSC::Solver::DLS_QMAX, ikparam->maxvel);
}
else {
- // in animation mode we start from the pose after action and constraint
+ /* in animation mode we start from the pose after action and constraint */
convert_pose(ikscene);
ikscene->armature->setJointArray(ikscene->jointArray);
- // and we don't handle velocity
+ /* and we don't handle velocity */
reiterate = true;
simulation = false;
- // time is virtual, so take fixed value for velocity parameters (see itasc_update_param)
- // and choose 1s timestep to allow having velocity parameters in radiant
+ /* time is virtual, so take fixed value for velocity parameters (see itasc_update_param)
+ * and choose 1s timestep to allow having velocity parameters in radiant */
timestep = 1.0;
- // use auto setup to let the solver test the variation of the joints
+ /* use auto setup to let the solver test the variation of the joints */
numstep = 0;
}
@@ -1768,21 +1768,21 @@ static void execute_scene(struct Depsgraph *depsgraph,
iTaSC::CacheTS sts, cts;
sts = cts = (iTaSC::CacheTS)std::round(timestamp * 1000.0);
if (ikscene->cache->getPreviousCacheItem(ikscene->armature, 0, &cts) == NULL || cts == 0) {
- // the cache is empty before this time, reiterate
+ /* the cache is empty before this time, reiterate */
if (ikparam->flag & ITASC_INITIAL_REITERATION) {
reiterate = true;
}
}
else {
- // can take the cache as a start point.
+ /* can take the cache as a start point. */
sts -= cts;
timestep = sts / 1000.0;
}
}
- // don't cache if we are reiterating because we don't want to destroy the cache unnecessarily
+ /* don't cache if we are reiterating because we don't want to destroy the cache unnecessarily */
ikscene->scene->update(timestamp, timestep, numstep, false, !reiterate, simulation);
if (reiterate) {
- // how many times do we reiterate?
+ /* how many times do we reiterate? */
for (i = 0; i < ikparam->numiter; i++) {
if (ikscene->armature->getMaxJointChange() < ikparam->precision ||
ikscene->armature->getMaxEndEffectorChange() < ikparam->precision) {
@@ -1791,11 +1791,11 @@ static void execute_scene(struct Depsgraph *depsgraph,
ikscene->scene->update(timestamp, timestep, numstep, true, false, simulation);
}
if (simulation) {
- // one more fake iteration to cache
+ /* one more fake iteration to cache */
ikscene->scene->update(timestamp, 0.0, 1, true, true, true);
}
}
- // compute constraint error
+ /* compute constraint error */
for (i = ikscene->targets.size(); i > 0; i--) {
IK_Target *iktarget = ikscene->targets[i - 1];
if (!(iktarget->blenderConstraint->flag & CONSTRAINT_OFF) && iktarget->constraint) {
@@ -1805,12 +1805,12 @@ static void execute_scene(struct Depsgraph *depsgraph,
iktarget->errorCallback(values, nvalues, iktarget);
}
}
- // Apply result to bone:
- // walk the ikscene->channels
- // for each, get the Frame of the joint corresponding to the bone relative to its parent
- // combine the parent and the joint frame to get the frame relative to armature
- // a backward translation of the bone length gives the head
- // if TY, compute the scale as the ratio of the joint length with rest pose length
+ /* Apply result to bone:
+ * walk the ikscene->channels
+ * for each, get the Frame of the joint corresponding to the bone relative to its parent
+ * combine the parent and the joint frame to get the frame relative to armature
+ * a backward translation of the bone length gives the head
+ * if TY, compute the scale as the ratio of the joint length with rest pose length */
iTaSC::Armature *arm = ikscene->armature;
KDL::Frame frame;
double q_rest[3], q[3];
@@ -1825,59 +1825,59 @@ static void execute_scene(struct Depsgraph *depsgraph,
if (!arm->getRelativeFrame(frame, ikchan->tail)) {
break;
}
- // this frame is relative to base, make it relative to object
+ /* this frame is relative to base, make it relative to object */
ikchan->frame = ikscene->baseFrame * frame;
}
else {
if (!arm->getRelativeFrame(frame, ikchan->tail, ikscene->channels[ikchan->parent].tail)) {
break;
}
- // combine with parent frame to get frame relative to object
+ /* combine with parent frame to get frame relative to object */
ikchan->frame = ikscene->channels[ikchan->parent].frame * frame;
}
- // ikchan->frame is the tail frame relative to object
- // get bone length
+ /* ikchan->frame is the tail frame relative to object
+ * get bone length */
if (!arm->getSegment(ikchan->tail, 3, joint, q_rest[0], q[0], tip)) {
break;
}
if (joint->getType() == KDL::Joint::TransY) {
- // stretch bones have a TY joint, compute the scale
+ /* stretch bones have a TY joint, compute the scale */
scale = (float)(q[0] / q_rest[0]);
- // the length is the joint itself
+ /* the length is the joint itself */
length = (float)q[0];
}
else {
scale = 1.0f;
- // for fixed bone, the length is in the tip (always along Y axis)
+ /* for fixed bone, the length is in the tip (always along Y axis) */
length = tip->p(1);
}
- // ready to compute the pose mat
+ /* ready to compute the pose mat */
pchan = ikchan->pchan;
- // tail mat
+ /* tail mat */
ikchan->frame.getValue(&pchan->pose_mat[0][0]);
- // the scale of the object was included in the ik scene, take it out now
- // because the pose channels are relative to the object
+ /* the scale of the object was included in the ik scene, take it out now
+ * because the pose channels are relative to the object */
mul_v3_fl(pchan->pose_mat[3], ikscene->blInvScale);
length *= ikscene->blInvScale;
copy_v3_v3(pchan->pose_tail, pchan->pose_mat[3]);
- // shift to head
+ /* shift to head */
copy_v3_v3(yaxis, pchan->pose_mat[1]);
mul_v3_fl(yaxis, length);
sub_v3_v3v3(pchan->pose_mat[3], pchan->pose_mat[3], yaxis);
copy_v3_v3(pchan->pose_head, pchan->pose_mat[3]);
- // add scale
+ /* add scale */
mul_v3_fl(pchan->pose_mat[0], scale);
mul_v3_fl(pchan->pose_mat[1], scale);
mul_v3_fl(pchan->pose_mat[2], scale);
}
if (i < ikscene->numchan) {
- // big problem
+ /* big problem */
}
}
-//---------------------------------------------------
-// plugin interface
-//
+/*---------------------------------------------------
+ * plugin interface
+ * */
void itasc_initialize_tree(struct Depsgraph *depsgraph,
struct Scene *scene,
Object *ob,
@@ -1891,23 +1891,23 @@ void itasc_initialize_tree(struct Depsgraph *depsgraph,
return;
}
}
- // first remove old scene
+ /* first remove old scene */
itasc_clear_data(ob->pose);
- // we should handle all the constraint and mark them all disabled
- // for blender but we'll start with the IK constraint alone
+ /* we should handle all the constraint and mark them all disabled
+ * for blender but we'll start with the IK constraint alone */
for (pchan = (bPoseChannel *)ob->pose->chanbase.first; pchan;
pchan = (bPoseChannel *)pchan->next) {
if (pchan->constflag & PCHAN_HAS_IK) {
count += initialize_scene(ob, pchan);
}
}
- // if at least one tree, create the scenes from the PoseTree stored in the channels
- // postpone until execute_tree: this way the pose constraint are included
+ /* if at least one tree, create the scenes from the PoseTree stored in the channels
+ * postpone until execute_tree: this way the pose constraint are included */
if (count) {
create_scene(depsgraph, scene, ob, ctime);
}
itasc_update_param(ob->pose);
- // make sure we don't rebuilt until the user changes something important
+ /* make sure we don't rebuilt until the user changes something important */
ob->pose->flag &= ~POSE_WAS_REBUILT;
}
@@ -1920,7 +1920,7 @@ void itasc_execute_tree(struct Depsgraph *depsgraph,
if (ob->pose->ikdata) {
IK_Data *ikdata = (IK_Data *)ob->pose->ikdata;
bItasc *ikparam = (bItasc *)ob->pose->ikparam;
- // we need default parameters
+ /* we need default parameters */
if (!ikparam) {
ikparam = &DefIKParam;
}
@@ -1937,7 +1937,7 @@ void itasc_execute_tree(struct Depsgraph *depsgraph,
void itasc_release_tree(struct Scene *scene, struct Object *ob, float ctime)
{
- // not used for iTaSC
+ /* not used for iTaSC */
}
void itasc_clear_data(struct bPose *pose)
@@ -1959,7 +1959,7 @@ void itasc_clear_cache(struct bPose *pose)
IK_Data *ikdata = (IK_Data *)pose->ikdata;
for (IK_Scene *scene = ikdata->first; scene; scene = scene->next) {
if (scene->cache) {
- // clear all cache but leaving the timestamp 0 (=rest pose)
+ /* clear all cache but leaving the timestamp 0 (=rest pose) */
scene->cache->clearCacheFrom(NULL, 1);
}
}
@@ -1983,8 +1983,8 @@ void itasc_update_param(struct bPose *pose)
CONSTRAINT_ID_ALL, iTaSC::Armature::ID_JOINT, iTaSC::ACT_FEEDBACK, ikparam->feedback);
}
else {
- // in animation mode timestep is 1s by convention => qmax becomes radiant and feedback
- // becomes fraction of error gap corrected in one iteration.
+ /* in animation mode timestep is 1s by convention => qmax becomes radiant and feedback
+ * becomes fraction of error gap corrected in one iteration. */
ikscene->scene->setParam(iTaSC::Scene::MIN_TIMESTEP, 1.0);
ikscene->scene->setParam(iTaSC::Scene::MAX_TIMESTEP, 1.0);
ikscene->solver->setParam(iTaSC::Solver::DLS_QMAX, 0.52);
diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h
index babff5c34cd..1239d3881de 100644
--- a/source/blender/imbuf/intern/IMB_anim.h
+++ b/source/blender/imbuf/intern/IMB_anim.h
@@ -32,9 +32,9 @@
# include <windows.h>
# include <windowsx.h>
-# undef AVIIF_KEYFRAME // redefined in AVI_avi.h
-# undef AVIIF_LIST // redefined in AVI_avi.h
-#endif /* _WIN32 */
+# undef AVIIF_KEYFRAME /* redefined in AVI_avi.h */
+# undef AVIIF_LIST /* redefined in AVI_avi.h */
+#endif /* _WIN32 */
#include <ctype.h>
#include <stdio.h>
@@ -117,7 +117,7 @@ struct anim {
int firstvideo;
int pfileopen;
PAVIFILE pfile;
- PAVISTREAM pavi[MAXNUMSTREAMS]; // the current streams
+ PAVISTREAM pavi[MAXNUMSTREAMS]; /* the current streams */
PGETFRAME pgf;
#endif
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index f5ae602946e..d825b20f5f2 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -82,7 +82,7 @@
# include <libswscale/swscale.h>
# include "ffmpeg_compat.h"
-#endif // WITH_FFMPEG
+#endif /* WITH_FFMPEG */
int ismovie(const char *UNUSED(filepath))
{
@@ -467,7 +467,7 @@ static ImBuf *avi_fetchibuf(struct anim *anim, int position)
if (lpbi) {
ibuf = IMB_ibImageFromMemory(
(const unsigned char *)lpbi, 100, IB_rect, anim->colorspace, "<avi_fetchibuf>");
- // Oh brother...
+ /* Oh brother... */
}
}
}
diff --git a/source/blender/imbuf/intern/cineon/logImageCore.c b/source/blender/imbuf/intern/cineon/logImageCore.c
index 74a0684c35c..446f360a3e7 100644
--- a/source/blender/imbuf/intern/cineon/logImageCore.c
+++ b/source/blender/imbuf/intern/cineon/logImageCore.c
@@ -1689,7 +1689,7 @@ static int convertLogElementToRGBA(
if (dstIsLinearRGB) {
/* convert data from sRGB to Linear RGB via lut */
float *lut = getSrgbToLinLut(logElement);
- src_ptr = dst; // no error here
+ src_ptr = dst; /* no error here */
dst_ptr = dst;
for (i = 0; i < logImage->width * logImage->height; i++) {
*(dst_ptr++) = lut[float_uint(*(src_ptr++), logElement.maxValue)];
diff --git a/source/blender/imbuf/intern/dds/BlockDXT.cpp b/source/blender/imbuf/intern/dds/BlockDXT.cpp
index 8978b823e2a..2d9c300a147 100644
--- a/source/blender/imbuf/intern/dds/BlockDXT.cpp
+++ b/source/blender/imbuf/intern/dds/BlockDXT.cpp
@@ -25,28 +25,28 @@
* Original license from NVIDIA follows.
*/
-// Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com>
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
+/* Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE. */
#include <BlockDXT.h>
#include <ColorBlock.h>
@@ -59,32 +59,32 @@
uint BlockDXT1::evaluatePalette(Color32 color_array[4]) const
{
- // Does bit expansion before interpolation.
+ /* Does bit expansion before interpolation. */
color_array[0].b = (col0.b << 3) | (col0.b >> 2);
color_array[0].g = (col0.g << 2) | (col0.g >> 4);
color_array[0].r = (col0.r << 3) | (col0.r >> 2);
color_array[0].a = 0xFF;
- // @@ Same as above, but faster?
- // Color32 c;
- // c.u = ((col0.u << 3) & 0xf8) | ((col0.u << 5) & 0xfc00) | ((col0.u << 8) & 0xf80000);
- // c.u |= (c.u >> 5) & 0x070007;
- // c.u |= (c.u >> 6) & 0x000300;
- // color_array[0].u = c.u;
+ /* @@ Same as above, but faster?
+ * Color32 c;
+ * c.u = ((col0.u << 3) & 0xf8) | ((col0.u << 5) & 0xfc00) | ((col0.u << 8) & 0xf80000);
+ * c.u |= (c.u >> 5) & 0x070007;
+ * c.u |= (c.u >> 6) & 0x000300;
+ * color_array[0].u = c.u; */
color_array[1].r = (col1.r << 3) | (col1.r >> 2);
color_array[1].g = (col1.g << 2) | (col1.g >> 4);
color_array[1].b = (col1.b << 3) | (col1.b >> 2);
color_array[1].a = 0xFF;
- // @@ Same as above, but faster?
- // c.u = ((col1.u << 3) & 0xf8) | ((col1.u << 5) & 0xfc00) | ((col1.u << 8) & 0xf80000);
- // c.u |= (c.u >> 5) & 0x070007;
- // c.u |= (c.u >> 6) & 0x000300;
- // color_array[1].u = c.u;
+ /* @@ Same as above, but faster?
+ * c.u = ((col1.u << 3) & 0xf8) | ((col1.u << 5) & 0xfc00) | ((col1.u << 8) & 0xf80000);
+ * c.u |= (c.u >> 5) & 0x070007;
+ * c.u |= (c.u >> 6) & 0x000300;
+ * color_array[1].u = c.u; */
if (col0.u > col1.u) {
- // Four-color block: derive the other two colors.
+ /* Four-color block: derive the other two colors. */
color_array[2].r = (2 * color_array[0].r + color_array[1].r) / 3;
color_array[2].g = (2 * color_array[0].g + color_array[1].g) / 3;
color_array[2].b = (2 * color_array[0].b + color_array[1].b) / 3;
@@ -98,16 +98,16 @@ uint BlockDXT1::evaluatePalette(Color32 color_array[4]) const
return 4;
}
- // Three-color block: derive the other color.
+ /* Three-color block: derive the other color. */
color_array[2].r = (color_array[0].r + color_array[1].r) / 2;
color_array[2].g = (color_array[0].g + color_array[1].g) / 2;
color_array[2].b = (color_array[0].b + color_array[1].b) / 2;
color_array[2].a = 0xFF;
- // Set all components to 0 to match DXT specs.
- color_array[3].r = 0x00; // color_array[2].r;
- color_array[3].g = 0x00; // color_array[2].g;
- color_array[3].b = 0x00; // color_array[2].b;
+ /* Set all components to 0 to match DXT specs. */
+ color_array[3].r = 0x00; /* color_array[2].r; */
+ color_array[3].g = 0x00; /* color_array[2].g; */
+ color_array[3].b = 0x00; /* color_array[2].b; */
color_array[3].a = 0x00;
return 3;
@@ -115,7 +115,7 @@ uint BlockDXT1::evaluatePalette(Color32 color_array[4]) const
uint BlockDXT1::evaluatePaletteNV5x(Color32 color_array[4]) const
{
- // Does bit expansion before interpolation.
+ /* Does bit expansion before interpolation. */
color_array[0].b = (3 * col0.b * 22) / 8;
color_array[0].g = (col0.g << 2) | (col0.g >> 4);
color_array[0].r = (3 * col0.r * 22) / 8;
@@ -129,7 +129,7 @@ uint BlockDXT1::evaluatePaletteNV5x(Color32 color_array[4]) const
int gdiff = color_array[1].g - color_array[0].g;
if (col0.u > col1.u) {
- // Four-color block: derive the other two colors.
+ /* Four-color block: derive the other two colors. */
color_array[2].r = ((2 * col0.r + col1.r) * 22) / 8;
color_array[2].g = (256 * color_array[0].g + gdiff / 4 + 128 + gdiff * 80) / 256;
color_array[2].b = ((2 * col0.b + col1.b) * 22) / 8;
@@ -143,22 +143,22 @@ uint BlockDXT1::evaluatePaletteNV5x(Color32 color_array[4]) const
return 4;
}
- // Three-color block: derive the other color.
+ /* Three-color block: derive the other color. */
color_array[2].r = ((col0.r + col1.r) * 33) / 8;
color_array[2].g = (256 * color_array[0].g + gdiff / 4 + 128 + gdiff * 128) / 256;
color_array[2].b = ((col0.b + col1.b) * 33) / 8;
color_array[2].a = 0xFF;
- // Set all components to 0 to match DXT specs.
- color_array[3].r = 0x00; // color_array[2].r;
- color_array[3].g = 0x00; // color_array[2].g;
- color_array[3].b = 0x00; // color_array[2].b;
+ /* Set all components to 0 to match DXT specs. */
+ color_array[3].r = 0x00; /* color_array[2].r; */
+ color_array[3].g = 0x00; /* color_array[2].g; */
+ color_array[3].b = 0x00; /* color_array[2].b; */
color_array[3].a = 0x00;
return 3;
}
-// Evaluate palette assuming 3 color block.
+/* Evaluate palette assuming 3 color block. */
void BlockDXT1::evaluatePalette3(Color32 color_array[4]) const
{
color_array[0].b = (col0.b << 3) | (col0.b >> 2);
@@ -171,20 +171,20 @@ void BlockDXT1::evaluatePalette3(Color32 color_array[4]) const
color_array[1].b = (col1.b << 3) | (col1.b >> 2);
color_array[1].a = 0xFF;
- // Three-color block: derive the other color.
+ /* Three-color block: derive the other color. */
color_array[2].r = (color_array[0].r + color_array[1].r) / 2;
color_array[2].g = (color_array[0].g + color_array[1].g) / 2;
color_array[2].b = (color_array[0].b + color_array[1].b) / 2;
color_array[2].a = 0xFF;
- // Set all components to 0 to match DXT specs.
- color_array[3].r = 0x00; // color_array[2].r;
- color_array[3].g = 0x00; // color_array[2].g;
- color_array[3].b = 0x00; // color_array[2].b;
+ /* Set all components to 0 to match DXT specs. */
+ color_array[3].r = 0x00; /* color_array[2].r; */
+ color_array[3].g = 0x00; /* color_array[2].g; */
+ color_array[3].b = 0x00; /* color_array[2].b; */
color_array[3].a = 0x00;
}
-// Evaluate palette assuming 4 color block.
+/* Evaluate palette assuming 4 color block. */
void BlockDXT1::evaluatePalette4(Color32 color_array[4]) const
{
color_array[0].b = (col0.b << 3) | (col0.b >> 2);
@@ -197,7 +197,7 @@ void BlockDXT1::evaluatePalette4(Color32 color_array[4]) const
color_array[1].b = (col1.b << 3) | (col1.b >> 2);
color_array[1].a = 0xFF;
- // Four-color block: derive the other two colors.
+ /* Four-color block: derive the other two colors. */
color_array[2].r = (2 * color_array[0].r + color_array[1].r) / 3;
color_array[2].g = (2 * color_array[0].g + color_array[1].g) / 3;
color_array[2].b = (2 * color_array[0].b + color_array[1].b) / 3;
@@ -211,11 +211,11 @@ void BlockDXT1::evaluatePalette4(Color32 color_array[4]) const
void BlockDXT1::decodeBlock(ColorBlock *block) const
{
- // Decode color block.
+ /* Decode color block. */
Color32 color_array[4];
evaluatePalette(color_array);
- // Write color block.
+ /* Write color block. */
for (uint j = 0; j < 4; j++) {
for (uint i = 0; i < 4; i++) {
uint idx = (row[j] >> (2 * i)) & 3;
@@ -226,11 +226,11 @@ void BlockDXT1::decodeBlock(ColorBlock *block) const
void BlockDXT1::decodeBlockNV5x(ColorBlock *block) const
{
- // Decode color block.
+ /* Decode color block. */
Color32 color_array[4];
evaluatePaletteNV5x(color_array);
- // Write color block.
+ /* Write color block. */
for (uint j = 0; j < 4; j++) {
for (uint i = 0; i < 4; i++) {
uint idx = (row[j] >> (2 * i)) & 3;
@@ -266,10 +266,10 @@ inline void BlockDXT1::flip2()
void BlockDXT3::decodeBlock(ColorBlock *block) const
{
- // Decode color.
+ /* Decode color. */
color.decodeBlock(block);
- // Decode alpha.
+ /* Decode alpha. */
alpha.decodeBlock(block);
}
@@ -342,30 +342,30 @@ void AlphaBlockDXT5::evaluatePalette(uint8 alpha[8]) const
void AlphaBlockDXT5::evaluatePalette8(uint8 alpha[8]) const
{
- // 8-alpha block: derive the other six alphas.
- // Bit code 000 = alpha0, 001 = alpha1, others are interpolated.
+ /* 8-alpha block: derive the other six alphas.
+ * Bit code 000 = alpha0, 001 = alpha1, others are interpolated. */
alpha[0] = alpha0();
alpha[1] = alpha1();
- alpha[2] = (6 * alpha[0] + 1 * alpha[1]) / 7; // bit code 010
- alpha[3] = (5 * alpha[0] + 2 * alpha[1]) / 7; // bit code 011
- alpha[4] = (4 * alpha[0] + 3 * alpha[1]) / 7; // bit code 100
- alpha[5] = (3 * alpha[0] + 4 * alpha[1]) / 7; // bit code 101
- alpha[6] = (2 * alpha[0] + 5 * alpha[1]) / 7; // bit code 110
- alpha[7] = (1 * alpha[0] + 6 * alpha[1]) / 7; // bit code 111
+ alpha[2] = (6 * alpha[0] + 1 * alpha[1]) / 7; /* bit code 010 */
+ alpha[3] = (5 * alpha[0] + 2 * alpha[1]) / 7; /* bit code 011 */
+ alpha[4] = (4 * alpha[0] + 3 * alpha[1]) / 7; /* bit code 100 */
+ alpha[5] = (3 * alpha[0] + 4 * alpha[1]) / 7; /* bit code 101 */
+ alpha[6] = (2 * alpha[0] + 5 * alpha[1]) / 7; /* bit code 110 */
+ alpha[7] = (1 * alpha[0] + 6 * alpha[1]) / 7; /* bit code 111 */
}
void AlphaBlockDXT5::evaluatePalette6(uint8 alpha[8]) const
{
- // 6-alpha block.
- // Bit code 000 = alpha0, 001 = alpha1, others are interpolated.
+ /* 6-alpha block.
+ * Bit code 000 = alpha0, 001 = alpha1, others are interpolated. */
alpha[0] = alpha0();
alpha[1] = alpha1();
- alpha[2] = (4 * alpha[0] + 1 * alpha[1]) / 5; // Bit code 010
- alpha[3] = (3 * alpha[0] + 2 * alpha[1]) / 5; // Bit code 011
- alpha[4] = (2 * alpha[0] + 3 * alpha[1]) / 5; // Bit code 100
- alpha[5] = (1 * alpha[0] + 4 * alpha[1]) / 5; // Bit code 101
- alpha[6] = 0x00; // Bit code 110
- alpha[7] = 0xFF; // Bit code 111
+ alpha[2] = (4 * alpha[0] + 1 * alpha[1]) / 5; /* Bit code 010 */
+ alpha[3] = (3 * alpha[0] + 2 * alpha[1]) / 5; /* Bit code 011 */
+ alpha[4] = (2 * alpha[0] + 3 * alpha[1]) / 5; /* Bit code 100 */
+ alpha[5] = (1 * alpha[0] + 4 * alpha[1]) / 5; /* Bit code 101 */
+ alpha[6] = 0x00; /* Bit code 110 */
+ alpha[7] = 0xFF; /* Bit code 111 */
}
void AlphaBlockDXT5::indices(uint8 index_array[16]) const
@@ -418,7 +418,7 @@ void AlphaBlockDXT5::flip4()
{
uint64 *b = (uint64 *)this;
- // @@ The masks might have to be byte swapped.
+ /* @@ The masks might have to be byte swapped. */
uint64 tmp = (*b & (uint64)(0x000000000000FFFFLL));
tmp |= (*b & (uint64)(0x000000000FFF0000LL)) << 36;
tmp |= (*b & (uint64)(0x000000FFF0000000LL)) << 12;
@@ -432,7 +432,7 @@ void AlphaBlockDXT5::flip2()
{
uint *b = (uint *)this;
- // @@ The masks might have to be byte swapped.
+ /* @@ The masks might have to be byte swapped. */
uint tmp = (*b & 0xFF000000);
tmp |= (*b & 0x00000FFF) << 12;
tmp |= (*b & 0x00FFF000) >> 12;
@@ -442,19 +442,19 @@ void AlphaBlockDXT5::flip2()
void BlockDXT5::decodeBlock(ColorBlock *block) const
{
- // Decode color.
+ /* Decode color. */
color.decodeBlock(block);
- // Decode alpha.
+ /* Decode alpha. */
alpha.decodeBlock(block);
}
void BlockDXT5::decodeBlockNV5x(ColorBlock *block) const
{
- // Decode color.
+ /* Decode color. */
color.decodeBlockNV5x(block);
- // Decode alpha.
+ /* Decode alpha. */
alpha.decodeBlock(block);
}
@@ -541,7 +541,7 @@ void BlockATI2::flip2()
void BlockCTX1::evaluatePalette(Color32 color_array[4]) const
{
- // Does bit expansion before interpolation.
+ /* Does bit expansion before interpolation. */
color_array[0].b = 0x00;
color_array[0].g = col0[1];
color_array[0].r = col0[0];
@@ -565,11 +565,11 @@ void BlockCTX1::evaluatePalette(Color32 color_array[4]) const
void BlockCTX1::decodeBlock(ColorBlock *block) const
{
- // Decode color block.
+ /* Decode color block. */
Color32 color_array[4];
evaluatePalette(color_array);
- // Write color block.
+ /* Write color block. */
for (uint j = 0; j < 4; j++) {
for (uint i = 0; i < 4; i++) {
uint idx = (row[j] >> (2 * i)) & 3;
diff --git a/source/blender/imbuf/intern/dds/BlockDXT.h b/source/blender/imbuf/intern/dds/BlockDXT.h
index 83cc147c76c..1fefa7c739d 100644
--- a/source/blender/imbuf/intern/dds/BlockDXT.h
+++ b/source/blender/imbuf/intern/dds/BlockDXT.h
@@ -25,28 +25,28 @@
* Original license from NVIDIA follows.
*/
-// Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com>
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
+/* Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE. */
#pragma once
@@ -131,28 +131,28 @@ struct BlockDXT3 {
/** DXT5 alpha block. */
struct AlphaBlockDXT5 {
- // uint64 unions do not compile on all platforms
+ /* uint64 unions do not compile on all platforms */
#if 0
union {
struct {
- uint64 alpha0 : 8; // 8
- uint64 alpha1 : 8; // 16
- uint64 bits0 : 3; // 3 - 19
- uint64 bits1 : 3; // 6 - 22
- uint64 bits2 : 3; // 9 - 25
- uint64 bits3 : 3; // 12 - 28
- uint64 bits4 : 3; // 15 - 31
- uint64 bits5 : 3; // 18 - 34
- uint64 bits6 : 3; // 21 - 37
- uint64 bits7 : 3; // 24 - 40
- uint64 bits8 : 3; // 27 - 43
- uint64 bits9 : 3; // 30 - 46
- uint64 bitsA : 3; // 33 - 49
- uint64 bitsB : 3; // 36 - 52
- uint64 bitsC : 3; // 39 - 55
- uint64 bitsD : 3; // 42 - 58
- uint64 bitsE : 3; // 45 - 61
- uint64 bitsF : 3; // 48 - 64
+ uint64 alpha0 : 8; /* 8 */
+ uint64 alpha1 : 8; /* 16 */
+ uint64 bits0 : 3; /* 3 - 19 */
+ uint64 bits1 : 3; /* 6 - 22 */
+ uint64 bits2 : 3; /* 9 - 25 */
+ uint64 bits3 : 3; /* 12 - 28 */
+ uint64 bits4 : 3; /* 15 - 31 */
+ uint64 bits5 : 3; /* 18 - 34 */
+ uint64 bits6 : 3; /* 21 - 37 */
+ uint64 bits7 : 3; /* 24 - 40 */
+ uint64 bits8 : 3; /* 27 - 43 */
+ uint64 bits9 : 3; /* 30 - 46 */
+ uint64 bitsA : 3; /* 33 - 49 */
+ uint64 bitsB : 3; /* 36 - 52 */
+ uint64 bitsC : 3; /* 39 - 55 */
+ uint64 bitsD : 3; /* 42 - 58 */
+ uint64 bitsE : 3; /* 45 - 61 */
+ uint64 bitsF : 3; /* 48 - 64 */
};
uint64 u;
};
diff --git a/source/blender/imbuf/intern/dds/Color.h b/source/blender/imbuf/intern/dds/Color.h
index 4a9202617f5..03d49391e59 100644
--- a/source/blender/imbuf/intern/dds/Color.h
+++ b/source/blender/imbuf/intern/dds/Color.h
@@ -25,7 +25,7 @@
* Original license from NVIDIA follows.
*/
-// This code is in the public domain -- castanyo@yahoo.es
+/* This code is in the public domain -- <castanyo@yahoo.es> */
#pragma once
diff --git a/source/blender/imbuf/intern/dds/ColorBlock.cpp b/source/blender/imbuf/intern/dds/ColorBlock.cpp
index f2e8e0b0313..7c8b7c1d345 100644
--- a/source/blender/imbuf/intern/dds/ColorBlock.cpp
+++ b/source/blender/imbuf/intern/dds/ColorBlock.cpp
@@ -25,20 +25,20 @@
* Original license from NVIDIA follows.
*/
-// This code is in the public domain -- castanyo@yahoo.es
+/* This code is in the public domain - <castanyo@yahoo.es> */
#include <ColorBlock.h>
#include <Common.h>
#include <Image.h>
#if 0
-// Get approximate luminance.
+/* Get approximate luminance. */
inline static uint colorLuminance(Color32 c)
{
return c.r + c.g + c.b;
}
-// Get the euclidean distance between the given colors.
+/* Get the euclidean distance between the given colors. */
inline static uint colorDistance(Color32 c0, Color32 c1)
{
return (c0.r - c1.r) * (c0.r - c1.r) + (c0.g - c1.g) * (c0.g - c1.g) +
@@ -83,9 +83,9 @@ void ColorBlock::init(uint w, uint h, const uint *data, uint x, uint y)
const uint bw = MIN(w - x, 4U);
const uint bh = MIN(h - y, 4U);
- // Blocks that are smaller than 4x4 are handled by repeating the pixels.
- // @@ That's only correct when block size is 1, 2 or 4, but not with 3. :(
- // @@ Ideally we should zero the weights of the pixels out of range.
+ /* Blocks that are smaller than 4x4 are handled by repeating the pixels.
+ * @@ That's only correct when block size is 1, 2 or 4, but not with 3. :(
+ * @@ Ideally we should zero the weights of the pixels out of range. */
for (uint i = 0; i < 4; i++) {
const int by = i % bh;
@@ -104,9 +104,9 @@ void ColorBlock::init(uint w, uint h, const float *data, uint x, uint y)
const uint bw = MIN(w - x, 4U);
const uint bh = MIN(h - y, 4U);
- // Blocks that are smaller than 4x4 are handled by repeating the pixels.
- // @@ That's only correct when block size is 1, 2 or 4, but not with 3. :(
- // @@ Ideally we should zero the weights of the pixels out of range.
+ /* Blocks that are smaller than 4x4 are handled by repeating the pixels.
+ * @@ That's only correct when block size is 1, 2 or 4, but not with 3. :(
+ * @@ Ideally we should zero the weights of the pixels out of range. */
uint srcPlane = w * h;
@@ -120,7 +120,7 @@ void ColorBlock::init(uint w, uint h, const float *data, uint x, uint y)
Color32 &c = color(e, i);
c.r = uint8(255 * CLAMP(data[idx + 0 * srcPlane],
0.0f,
- 1.0f)); // @@ Is this the right way to quantize floats to bytes?
+ 1.0f)); /* @@ Is this the right way to quantize floats to bytes? */
c.g = uint8(255 * CLAMP(data[idx + 1 * srcPlane], 0.0f, 1.0f));
c.b = uint8(255 * CLAMP(data[idx + 2 * srcPlane], 0.0f, 1.0f));
c.a = uint8(255 * CLAMP(data[idx + 3 * srcPlane], 0.0f, 1.0f));
@@ -204,7 +204,7 @@ uint ColorBlock::countUniqueColors() const
{
uint count = 0;
- // @@ This does not have to be o(n^2)
+ /* @@ This does not have to be o(n^2) */
for (int i = 0; i < 16; i++) {
bool unique = true;
for (int j = 0; j < i; j++) {
@@ -326,7 +326,7 @@ void ColorBlock::boundsRange(Color32 *start, Color32 *end) const
}
}
- // Offset range by 1/16 of the extents
+ /* Offset range by 1/16 of the extents */
Color32 inset;
inset.r = (maxColor.r - minColor.r) >> 4;
inset.g = (maxColor.g - minColor.g) >> 4;
@@ -377,7 +377,7 @@ void ColorBlock::boundsRangeAlpha(Color32 *start, Color32 *end) const
}
}
- // Offset range by 1/16 of the extents
+ /* Offset range by 1/16 of the extents */
Color32 inset;
inset.r = (maxColor.r - minColor.r) >> 4;
inset.g = (maxColor.g - minColor.g) >> 4;
@@ -403,7 +403,7 @@ void ColorBlock::boundsRangeAlpha(Color32 *start, Color32 *end) const
/** Sort colors by abosolute value in their 16 bit representation. */
void ColorBlock::sortColorsByAbsoluteValue()
{
- // Dummy selection sort.
+ /* Dummy selection sort. */
for (uint a = 0; a < 16; a++) {
uint max = a;
Color16 cmax(m_color[a]);
@@ -462,7 +462,7 @@ void ColorBlock::sortColors(const Vector3 &axis)
luma_array[i] = dot(vec, axis);
}
- // Dummy selection sort.
+ /* Dummy selection sort. */
for (uint a = 0; a < 16; a++) {
uint min = a;
for (uint b = a + 1; b < 16; b++) {
diff --git a/source/blender/imbuf/intern/dds/ColorBlock.h b/source/blender/imbuf/intern/dds/ColorBlock.h
index 98b4c9cb40a..0271c7964b8 100644
--- a/source/blender/imbuf/intern/dds/ColorBlock.h
+++ b/source/blender/imbuf/intern/dds/ColorBlock.h
@@ -43,12 +43,12 @@ struct ColorBlock {
void init(uint w, uint h, const uint *data, uint x, uint y);
void init(uint w, uint h, const float *data, uint x, uint y);
- void swizzle(uint x, uint y, uint z, uint w); // 0=r, 1=g, 2=b, 3=a, 4=0xFF, 5=0
+ void swizzle(uint x, uint y, uint z, uint w); /* 0=r, 1=g, 2=b, 3=a, 4=0xFF, 5=0 */
bool isSingleColor(Color32 mask = Color32(0xFF, 0xFF, 0xFF, 0x00)) const;
bool hasAlpha() const;
- // Accessors
+ /* Accessors */
const Color32 *colors() const;
Color32 color(uint i) const;
diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
index 7ec059607c5..3e459934db7 100644
--- a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
+++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
@@ -25,36 +25,36 @@
* Original license from NVIDIA follows.
*/
-// Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com>
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
+/* Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE. */
#include <BlockDXT.h>
#include <DirectDrawSurface.h>
#include <PixelFormat.h>
-#include <math.h> // sqrt
-#include <stdio.h> // printf
-#include <stdlib.h> // malloc
+#include <math.h> /* sqrt */
+#include <stdio.h> /* printf */
+#include <stdlib.h> /* malloc */
#include <sys/types.h>
/*** declarations ***/
@@ -76,13 +76,15 @@ static const uint FOURCC_RXGB = DDS_MAKEFOURCC('R', 'X', 'G', 'B');
static const uint FOURCC_ATI1 = DDS_MAKEFOURCC('A', 'T', 'I', '1');
static const uint FOURCC_ATI2 = DDS_MAKEFOURCC('A', 'T', 'I', '2');
-// static const uint FOURCC_A2XY = DDS_MAKEFOURCC('A', '2', 'X', 'Y');
+#if 0 /* Valid but currently unused. */
+static const uint FOURCC_A2XY = DDS_MAKEFOURCC('A', '2', 'X', 'Y');
+#endif
static const uint FOURCC_DX10 = DDS_MAKEFOURCC('D', 'X', '1', '0');
static const uint FOURCC_UVER = DDS_MAKEFOURCC('U', 'V', 'E', 'R');
-// 32 bit RGB formats.
+/* 32 bit RGB formats. */
static const uint D3DFMT_R8G8B8 = 20;
static const uint D3DFMT_A8R8G8B8 = 21;
static const uint D3DFMT_X8R8G8B8 = 22;
@@ -100,25 +102,33 @@ static const uint D3DFMT_X8B8G8R8 = 33;
static const uint D3DFMT_G16R16 = 34;
static const uint D3DFMT_A2R10G10B10 = 35;
-// static const uint D3DFMT_A16B16G16R16 = 36;
+#if 0 /* Valid but currently unused. */
+static const uint D3DFMT_A16B16G16R16 = 36;
+#endif
-// Palette formats.
-// static const uint D3DFMT_A8P8 = 40;
-// static const uint D3DFMT_P8 = 41;
+/* Palette formats. */
+#if 0 /* Valid but currently unused. */
+static const uint D3DFMT_A8P8 = 40;
+static const uint D3DFMT_P8 = 41;
+#endif
-// Luminance formats.
+/* Luminance formats. */
static const uint D3DFMT_L8 = 50;
-// static const uint D3DFMT_A8L8 = 51;
-// static const uint D3DFMT_A4L4 = 52;
+#if 0 /* Valid but currently unused. */
+static const uint D3DFMT_A8L8 = 51;
+static const uint D3DFMT_A4L4 = 52;
+#endif
static const uint D3DFMT_L16 = 81;
-// Floating point formats
-// static const uint D3DFMT_R16F = 111;
-// static const uint D3DFMT_G16R16F = 112;
-// static const uint D3DFMT_A16B16G16R16F = 113;
-// static const uint D3DFMT_R32F = 114;
-// static const uint D3DFMT_G32R32F = 115;
-// static const uint D3DFMT_A32B32G32R32F = 116;
+/* Floating point formats */
+#if 0 /* Valid but currently unused. */
+static const uint D3DFMT_R16F = 111;
+static const uint D3DFMT_G16R16F = 112;
+static const uint D3DFMT_A16B16G16R16F = 113;
+static const uint D3DFMT_R32F = 114;
+static const uint D3DFMT_G32R32F = 115;
+static const uint D3DFMT_A32B32G32R32F = 116;
+#endif
static const uint DDSD_CAPS = 0x00000001U;
static const uint DDSD_PIXELFORMAT = 0x00001000U;
@@ -154,11 +164,11 @@ static const uint DDPF_PALETTEINDEXED8 = 0x00000020U;
static const uint DDPF_LUMINANCE = 0x00020000U;
static const uint DDPF_ALPHAPREMULT = 0x00008000U;
-// Custom NVTT flags.
+/* Custom NVTT flags. */
static const uint DDPF_NORMAL = 0x80000000U;
static const uint DDPF_SRGB = 0x40000000U;
-// DX10 formats.
+/* DX10 formats. */
enum DXGI_FORMAT {
DXGI_FORMAT_UNKNOWN = 0,
@@ -526,7 +536,7 @@ const FormatDescriptor s_d3dFormats[] = {
const uint s_d3dFormatCount = sizeof(s_d3dFormats) / sizeof(s_d3dFormats[0]);
-} // namespace
+} /* namespace */
static uint findD3D9Format(uint bitcount, uint rmask, uint gmask, uint bmask, uint amask)
{
@@ -555,9 +565,9 @@ DDSHeader::DDSHeader()
this->reserved[i] = 0;
}
- // Store version information on the reserved header attributes.
+ /* Store version information on the reserved header attributes. */
this->reserved[9] = FOURCC_NVTT;
- this->reserved[10] = (2 << 16) | (1 << 8) | (0); // major.minor.revision
+ this->reserved[10] = (2 << 16) | (1 << 8) | (0); /* major.minor.revision */
this->pf.size = 32;
this->pf.flags = 0;
@@ -658,7 +668,7 @@ void DDSHeader::setPitch(uint pitch)
void DDSHeader::setFourCC(uint8 c0, uint8 c1, uint8 c2, uint8 c3)
{
- // set fourcc pixel format.
+ /* set fourcc pixel format. */
this->pf.flags = DDPF_FOURCC;
this->pf.fourcc = DDS_MAKEFOURCC(c0, c1, c2, c3);
@@ -671,7 +681,7 @@ void DDSHeader::setFourCC(uint8 c0, uint8 c1, uint8 c2, uint8 c3)
void DDSHeader::setFormatCode(uint32 code)
{
- // set fourcc pixel format.
+ /* set fourcc pixel format. */
this->pf.flags = DDPF_FOURCC;
this->pf.fourcc = code;
@@ -689,7 +699,7 @@ void DDSHeader::setSwizzleCode(uint8 c0, uint8 c1, uint8 c2, uint8 c3)
void DDSHeader::setPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask, uint amask)
{
- // Make sure the masks are correct.
+ /* Make sure the masks are correct. */
if ((rmask & gmask) || (rmask & bmask) || (rmask & amask) || (gmask & bmask) ||
(gmask & amask) || (bmask & amask)) {
printf("DDS: bad RGBA masks, pixel format not set\n");
@@ -713,7 +723,7 @@ void DDSHeader::setPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask
}
if (bitcount == 0) {
- // Compute bit count from the masks.
+ /* Compute bit count from the masks. */
uint total = rmask | gmask | bmask | amask;
while (total != 0) {
bitcount++;
@@ -721,7 +731,7 @@ void DDSHeader::setPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask
}
}
- // D3DX functions do not like this:
+ /* D3DX functions do not like this: */
this->pf.fourcc = 0; // findD3D9Format(bitcount, rmask, gmask, bmask, amask);
#if 0
if (this->pf.fourcc) {
@@ -872,9 +882,9 @@ DirectDrawSurface::DirectDrawSurface(unsigned char *mem, uint size) : stream(mem
{
mem_read(stream, header);
- // some ATI2 compressed normal maps do not have their
- // normal flag set, so force it here (the original nvtt don't do
- // this, but the decompressor has a -forcenormal flag)
+ /* Some ATI2 compressed normal maps do not have their
+ * normal flag set, so force it here (the original nvtt don't do
+ * this, but the decompressor has a -forcenormal flag). */
if (header.pf.fourcc == FOURCC_ATI2) {
header.setNormalFlag(true);
}
@@ -928,12 +938,12 @@ bool DirectDrawSurface::isSupported() const
header.pf.fourcc != FOURCC_DXT3 && header.pf.fourcc != FOURCC_DXT4 &&
header.pf.fourcc != FOURCC_DXT5 && header.pf.fourcc != FOURCC_RXGB &&
header.pf.fourcc != FOURCC_ATI1 && header.pf.fourcc != FOURCC_ATI2) {
- // Unknown fourcc code.
+ /* Unknown fourcc code. */
return false;
}
}
else if ((header.pf.flags & DDPF_RGB) || (header.pf.flags & DDPF_LUMINANCE)) {
- // All RGB and luminance formats are supported now.
+ /* All RGB and luminance formats are supported now. */
}
else {
return false;
@@ -941,12 +951,12 @@ bool DirectDrawSurface::isSupported() const
if (isTextureCube() &&
(header.caps.caps2 & DDSCAPS2_CUBEMAP_ALL_FACES) != DDSCAPS2_CUBEMAP_ALL_FACES) {
- // Cubemaps must contain all faces.
+ /* Cubemaps must contain all faces. */
return false;
}
if (isTexture3D()) {
- // @@ 3D textures not supported yet.
+ /* @@ 3D textures not supported yet. */
return false;
}
@@ -971,7 +981,7 @@ bool DirectDrawSurface::hasAlpha() const
return false;
}
- // @@ Here we could check the ALPHA_PIXELS flag, but nobody sets it. (except us?)
+ /* @@ Here we could check the ALPHA_PIXELS flag, but nobody sets it. (except us?) */
return true;
}
@@ -1072,7 +1082,7 @@ void DirectDrawSurface::mipmap(Image *img, uint face, uint mipmap)
uint w = width();
uint h = height();
- // Compute width and height.
+ /* Compute width and height. */
for (uint m = 0; m < mipmap; m++) {
w = MAX(1U, w / 2);
h = MAX(1U, h / 2);
@@ -1088,7 +1098,7 @@ void DirectDrawSurface::mipmap(Image *img, uint face, uint mipmap)
}
if (header.hasDX10Header()) {
- // So far only block formats supported.
+ /* So far only block formats supported. */
readBlockImage(img);
}
else {
@@ -1101,8 +1111,8 @@ void DirectDrawSurface::mipmap(Image *img, uint face, uint mipmap)
}
}
-// It was easier to copy this function from upstream than to resync.
-// This should be removed if a resync ever occurs.
+/* It was easier to copy this function from upstream than to resync.
+ * This should be removed if a resync ever occurs. */
void *DirectDrawSurface::readData(uint &rsize)
{
uint header_size = 128; // sizeof(DDSHeader);
@@ -1124,7 +1134,7 @@ void *DirectDrawSurface::readData(uint &rsize)
rsize = 0;
}
- // Maybe check if size == rsize? assert() isn't in this scope...
+ /* Maybe check if size == rsize? assert() isn't in this scope. */
return data;
}
@@ -1155,7 +1165,7 @@ void DirectDrawSurface::readLinearImage(Image *img)
return;
}
- // Read linear RGB images.
+ /* Read linear RGB images. */
for (uint y = 0; y < h; y++) {
for (uint x = 0; x < w; x++) {
uint c = 0;
@@ -1185,10 +1195,10 @@ void DirectDrawSurface::readBlockImage(Image *img)
for (uint bx = 0; bx < bw; bx++) {
ColorBlock block;
- // Read color block.
+ /* Read color block. */
readBlock(&block);
- // Write color block.
+ /* Write color block. */
for (uint y = 0; y < MIN(4U, h - 4 * by); y++) {
for (uint x = 0; x < MIN(4U, w - 4 * bx); x++) {
img->pixel(4 * bx + x, 4 * by + y) = block.color(x, y);
@@ -1215,7 +1225,7 @@ void DirectDrawSurface::readBlock(ColorBlock *rgba)
{
uint fourcc = header.pf.fourcc;
- // Map DX10 block formats to fourcc codes.
+ /* Map DX10 block formats to fourcc codes. */
if (header.hasDX10Header()) {
if (header.header10.dxgiFormat == DXGI_FORMAT_BC1_UNORM) {
fourcc = FOURCC_DXT1;
@@ -1251,7 +1261,7 @@ void DirectDrawSurface::readBlock(ColorBlock *rgba)
block.decodeBlock(rgba);
if (fourcc == FOURCC_RXGB) {
- // Swap R & A.
+ /* Swap R & A. */
for (int i = 0; i < 16; i++) {
Color32 &c = rgba->color(i);
uint tmp = c.r;
@@ -1271,7 +1281,7 @@ void DirectDrawSurface::readBlock(ColorBlock *rgba)
block.decodeBlock(rgba);
}
- // If normal flag set, convert to normal.
+ /* If normal flag set, convert to normal. */
if (header.pf.flags & DDPF_NORMAL) {
if (fourcc == FOURCC_ATI2) {
for (int i = 0; i < 16; i++) {
@@ -1323,7 +1333,7 @@ uint DirectDrawSurface::blockSize() const
}
}
- // Not a block image.
+ /* Not a block image. */
return 0;
}
@@ -1340,14 +1350,14 @@ uint DirectDrawSurface::mipmapSize(uint mipmap) const
}
if (header.pf.flags & DDPF_FOURCC) {
- // @@ How are 3D textures aligned?
+ /* @@ How are 3D textures aligned? */
w = (w + 3) / 4;
h = (h + 3) / 4;
return blockSize() * w * h;
}
if (header.pf.flags & DDPF_RGB || (header.pf.flags & DDPF_LUMINANCE)) {
- uint pitch = computePitch(
- w, header.pf.bitcount, 8); // Assuming 8 bit alignment, which is the same D3DX expects.
+ /* Assuming 8 bit alignment, which is the same D3DX expects. */
+ uint pitch = computePitch(w, header.pf.bitcount, 8);
return pitch * h * d;
}
@@ -1463,7 +1473,7 @@ void DirectDrawSurface::printInfo() const
}
if (header.pf.fourcc != 0) {
- // Display fourcc code even when DDPF_FOURCC flag not set.
+ /* Display fourcc code even when DDPF_FOURCC flag not set. */
printf("\tFourCC: '%c%c%c%c' (0x%.8X)\n",
(int)((header.pf.fourcc >> 0) & 0xFF),
(int)((header.pf.fourcc >> 8) & 0xFF),
diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.h b/source/blender/imbuf/intern/dds/DirectDrawSurface.h
index 373d5974a5e..b6c2d1962e2 100644
--- a/source/blender/imbuf/intern/dds/DirectDrawSurface.h
+++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.h
@@ -25,28 +25,28 @@
* Original license from NVIDIA follows.
*/
-// Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com>
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
+/* Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE. */
#pragma once
@@ -98,7 +98,7 @@ struct DDSHeader {
uint notused;
DDSHeader10 header10;
- // Helper methods.
+ /* Helper methods. */
DDSHeader();
void setWidth(uint w);
@@ -175,7 +175,7 @@ class DirectDrawSurface {
void readBlock(ColorBlock *rgba);
private:
- Stream stream; // memory where DDS file resides
+ Stream stream; /* Memory where DDS file resides. */
DDSHeader header;
};
diff --git a/source/blender/imbuf/intern/dds/FlipDXT.cpp b/source/blender/imbuf/intern/dds/FlipDXT.cpp
index f46f50eb2b9..9b07084bf81 100644
--- a/source/blender/imbuf/intern/dds/FlipDXT.cpp
+++ b/source/blender/imbuf/intern/dds/FlipDXT.cpp
@@ -31,8 +31,8 @@
* All rights reserved.
*/
-// This file comes from the chromium project, adapted to Blender to add DDS
-// flipping to OpenGL convention for Blender
+/* This file comes from the chromium project, adapted to Blender to add DDS
+ * flipping to OpenGL convention for Blender */
#include "IMB_imbuf_types.h"
@@ -44,18 +44,18 @@
#include <FlipDXT.h>
#include <Stream.h>
-// A function that flips a DXTC block.
+/* A function that flips a DXTC block. */
typedef void (*FlipBlockFunction)(uint8_t *block);
-// Flips a full DXT1 block in the y direction.
+/* Flips a full DXT1 block in the y direction. */
static void FlipDXT1BlockFull(uint8_t *block)
{
- // A DXT1 block layout is:
- // [0-1] color0.
- // [2-3] color1.
- // [4-7] color bitmap, 2 bits per pixel.
- // So each of the 4-7 bytes represents one line, flipping a block is just
- // flipping those bytes.
+ /* A DXT1 block layout is:
+ * [0-1] color0.
+ * [2-3] color1.
+ * [4-7] color bitmap, 2 bits per pixel.
+ * So each of the 4-7 bytes represents one line, flipping a block is just
+ * flipping those bytes. */
uint8_t tmp = block[4];
block[4] = block[7];
block[7] = tmp;
@@ -64,23 +64,23 @@ static void FlipDXT1BlockFull(uint8_t *block)
block[6] = tmp;
}
-// Flips the first 2 lines of a DXT1 block in the y direction.
+/* Flips the first 2 lines of a DXT1 block in the y direction. */
static void FlipDXT1BlockHalf(uint8_t *block)
{
- // See layout above.
+ /* See layout above. */
uint8_t tmp = block[4];
block[4] = block[5];
block[5] = tmp;
}
-// Flips a full DXT3 block in the y direction.
+/* Flips a full DXT3 block in the y direction. */
static void FlipDXT3BlockFull(uint8_t *block)
{
- // A DXT3 block layout is:
- // [0-7] alpha bitmap, 4 bits per pixel.
- // [8-15] a DXT1 block.
+ /* A DXT3 block layout is:
+ * [0-7] alpha bitmap, 4 bits per pixel.
+ * [8-15] a DXT1 block. */
- // We can flip the alpha bits at the byte level (2 bytes per line).
+ /* We can flip the alpha bits at the byte level (2 bytes per line). */
uint8_t tmp = block[0];
block[0] = block[6];
@@ -95,14 +95,14 @@ static void FlipDXT3BlockFull(uint8_t *block)
block[3] = block[5];
block[5] = tmp;
- // And flip the DXT1 block using the above function.
+ /* And flip the DXT1 block using the above function. */
FlipDXT1BlockFull(block + 8);
}
-// Flips the first 2 lines of a DXT3 block in the y direction.
+/* Flips the first 2 lines of a DXT3 block in the y direction. */
static void FlipDXT3BlockHalf(uint8_t *block)
{
- // See layout above.
+ /* See layout above. */
uint8_t tmp = block[0];
block[0] = block[2];
@@ -113,36 +113,36 @@ static void FlipDXT3BlockHalf(uint8_t *block)
FlipDXT1BlockHalf(block + 8);
}
-// Flips a full DXT5 block in the y direction.
+/* Flips a full DXT5 block in the y direction. */
static void FlipDXT5BlockFull(uint8_t *block)
{
- // A DXT5 block layout is:
- // [0] alpha0.
- // [1] alpha1.
- // [2-7] alpha bitmap, 3 bits per pixel.
- // [8-15] a DXT1 block.
+ /* A DXT5 block layout is:
+ * [0] alpha0.
+ * [1] alpha1.
+ * [2-7] alpha bitmap, 3 bits per pixel.
+ * [8-15] a DXT1 block. */
- // The alpha bitmap doesn't easily map lines to bytes, so we have to
- // interpret it correctly. Extracted from
- // http://www.opengl.org/registry/specs/EXT/texture_compression_s3tc.txt :
- //
- // The 6 "bits" bytes of the block are decoded into one 48-bit integer:
- //
- // bits = bits_0 + 256 * (bits_1 + 256 * (bits_2 + 256 * (bits_3 +
- // 256 * (bits_4 + 256 * bits_5))))
- //
- // bits is a 48-bit unsigned integer, from which a three-bit control code
- // is extracted for a texel at location (x,y) in the block using:
- //
- // code(x,y) = bits[3*(4*y+x)+1..3*(4*y+x)+0]
- //
- // where bit 47 is the most significant and bit 0 is the least
- // significant bit.
+ /* The alpha bitmap doesn't easily map lines to bytes, so we have to
+ * interpret it correctly. Extracted from
+ * http://www.opengl.org/registry/specs/EXT/texture_compression_s3tc.txt :
+ *
+ * The 6 "bits" bytes of the block are decoded into one 48-bit integer:
+ *
+ * bits = bits_0 + 256 * (bits_1 + 256 * (bits_2 + 256 * (bits_3 +
+ * 256 * (bits_4 + 256 * bits_5))))
+ *
+ * bits is a 48-bit unsigned integer, from which a three-bit control code
+ * is extracted for a texel at location (x,y) in the block using:
+ *
+ * code(x,y) = bits[3*(4*y+x)+1..3*(4*y+x)+0]
+ *
+ * where bit 47 is the most significant and bit 0 is the least
+ * significant bit. */
unsigned int line_0_1 = block[2] + 256 * (block[3] + 256 * block[4]);
unsigned int line_2_3 = block[5] + 256 * (block[6] + 256 * block[7]);
- // swap lines 0 and 1 in line_0_1.
+ /* swap lines 0 and 1 in line_0_1. */
unsigned int line_1_0 = ((line_0_1 & 0x000fff) << 12) | ((line_0_1 & 0xfff000) >> 12);
- // swap lines 2 and 3 in line_2_3.
+ /* swap lines 2 and 3 in line_2_3. */
unsigned int line_3_2 = ((line_2_3 & 0x000fff) << 12) | ((line_2_3 & 0xfff000) >> 12);
block[2] = line_3_2 & 0xff;
@@ -152,14 +152,14 @@ static void FlipDXT5BlockFull(uint8_t *block)
block[6] = (line_1_0 & 0xff00) >> 8;
block[7] = (line_1_0 & 0xff0000) >> 16;
- // And flip the DXT1 block using the above function.
+ /* And flip the DXT1 block using the above function. */
FlipDXT1BlockFull(block + 8);
}
-// Flips the first 2 lines of a DXT5 block in the y direction.
+/* Flips the first 2 lines of a DXT5 block in the y direction. */
static void FlipDXT5BlockHalf(uint8_t *block)
{
- // See layout above.
+ /* See layout above. */
unsigned int line_0_1 = block[2] + 256 * (block[3] + 256 * block[4]);
unsigned int line_1_0 = ((line_0_1 & 0x000fff) << 12) | ((line_0_1 & 0xfff000) >> 12);
block[2] = line_1_0 & 0xff;
@@ -168,15 +168,15 @@ static void FlipDXT5BlockHalf(uint8_t *block)
FlipDXT1BlockHalf(block + 8);
}
-// Flips a DXTC image, by flipping and swapping DXTC blocks as appropriate.
+/* Flips a DXTC image, by flipping and swapping DXTC blocks as appropriate. */
int FlipDXTCImage(
unsigned int width, unsigned int height, unsigned int levels, int fourcc, uint8_t *data)
{
- // must have valid dimensions
+ /* Must have valid dimensions. */
if (width == 0 || height == 0) {
return 0;
}
- // height must be a power-of-two
+ /* Height must be a power-of-two. */
if ((height & (height - 1)) != 0) {
return 0;
}
@@ -214,24 +214,24 @@ int FlipDXTCImage(
unsigned int blocks = blocks_per_row * blocks_per_col;
if (mip_height == 1) {
- // no flip to do, and we're done.
+ /* no flip to do, and we're done. */
break;
}
if (mip_height == 2) {
- // flip the first 2 lines in each block.
+ /* flip the first 2 lines in each block. */
for (unsigned int i = 0; i < blocks_per_row; i++) {
half_block_function(data + i * block_bytes);
}
}
else {
- // flip each block.
+ /* flip each block. */
for (unsigned int i = 0; i < blocks; i++) {
full_block_function(data + i * block_bytes);
}
- // swap each block line in the first half of the image with the
- // corresponding one in the second half.
- // note that this is a no-op if mip_height is 4.
+ /* Swap each block line in the first half of the image with the
+ * corresponding one in the second half.
+ * note that this is a no-op if mip_height is 4. */
unsigned int row_bytes = block_bytes * blocks_per_row;
uint8_t *temp_line = new uint8_t[row_bytes];
@@ -247,7 +247,7 @@ int FlipDXTCImage(
delete[] temp_line;
}
- // mip levels are contiguous.
+ /* mip levels are contiguous. */
data += block_bytes * blocks;
mip_width = MAX(1U, mip_width >> 1);
mip_height = MAX(1U, mip_height >> 1);
diff --git a/source/blender/imbuf/intern/dds/Image.cpp b/source/blender/imbuf/intern/dds/Image.cpp
index 31a9927557b..4cfd7178f29 100644
--- a/source/blender/imbuf/intern/dds/Image.cpp
+++ b/source/blender/imbuf/intern/dds/Image.cpp
@@ -25,12 +25,12 @@
* Original license from NVIDIA follows.
*/
-// This code is in the public domain -- castanyo@yahoo.es
+/* This code is in the public domain -- <castanyo@yahoo.es>. */
#include <Color.h>
#include <Image.h>
-#include <stdio.h> // printf
+#include <stdio.h> /* printf */
Image::Image() : m_width(0), m_height(0), m_format(Format_RGB), m_data(NULL)
{
diff --git a/source/blender/imbuf/intern/dds/Image.h b/source/blender/imbuf/intern/dds/Image.h
index 0f977641d89..bc46b839952 100644
--- a/source/blender/imbuf/intern/dds/Image.h
+++ b/source/blender/imbuf/intern/dds/Image.h
@@ -25,7 +25,7 @@
* Original license from NVIDIA follows.
*/
-// This code is in the public domain -- castanyo@yahoo.es
+/* This code is in the public domain -- <castanyo@yahoo.es> */
#pragma once
diff --git a/source/blender/imbuf/intern/dds/PixelFormat.h b/source/blender/imbuf/intern/dds/PixelFormat.h
index a9125c64121..5c1d8e981a6 100644
--- a/source/blender/imbuf/intern/dds/PixelFormat.h
+++ b/source/blender/imbuf/intern/dds/PixelFormat.h
@@ -25,28 +25,29 @@
* Original license from NVIDIA follows.
*/
-// Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com>
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
+/* Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com>
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
#pragma once
@@ -54,23 +55,23 @@
namespace PixelFormat {
-// Convert component \a c having \a inbits to the returned value having \a outbits.
+/** Convert component \a c having \a inbits to the returned value having \a outbits. */
inline uint convert(uint c, uint inbits, uint outbits)
{
if (inbits == 0) {
return 0;
}
else if (inbits >= outbits) {
- // truncate
+ /* truncate */
return c >> (inbits - outbits);
}
else {
- // bitexpand
+ /* bitexpand */
return (c << (outbits - inbits)) | convert(c, inbits, outbits - inbits);
}
}
-// Get pixel component shift and size given its mask.
+/* Get pixel component shift and size given its mask. */
inline void maskShiftAndSize(uint mask, uint *shift, uint *size)
{
if (!mask) {
@@ -94,11 +95,14 @@ inline void maskShiftAndSize(uint mask, uint *shift, uint *size)
inline float quantizeCeil(float f, int inbits, int outbits)
{
- // uint i = f * (float(1 << inbits) - 1);
- // i = convert(i, inbits, outbits);
- // float result = float(i) / (float(1 << outbits) - 1);
- // nvCheck(result >= f);
+#if 0
+ uint i = f * (float(1 << inbits) - 1);
+ i = convert(i, inbits, outbits);
+ float result = float(i) / (float(1 << outbits) - 1);
+ nvCheck(result >= f);
+#endif
float result;
+
int offset = 0;
do {
uint i = offset + uint(f * (float(1 << inbits) - 1));
@@ -124,4 +128,4 @@ inline float quantizeFloor(float f, int bits)
}
#endif
-} // namespace PixelFormat
+} /* namespace PixelFormat */
diff --git a/source/blender/imbuf/intern/dds/Stream.cpp b/source/blender/imbuf/intern/dds/Stream.cpp
index e1c5eb1d505..59892a0a228 100644
--- a/source/blender/imbuf/intern/dds/Stream.cpp
+++ b/source/blender/imbuf/intern/dds/Stream.cpp
@@ -20,8 +20,8 @@
#include <Stream.h>
-#include <stdio.h> // printf
-#include <string.h> // memcpy
+#include <stdio.h> /* printf */
+#include <string.h> /* memcpy */
static const char *msg_error_seek = "DDS: trying to seek beyond end of stream (corrupt file?)";
static const char *msg_error_read = "DDS: trying to read beyond end of stream (corrupt file?)";
@@ -44,7 +44,7 @@ unsigned int mem_read(Stream &mem, unsigned long long &i)
mem.set_failed(msg_error_seek);
return 0;
}
- memcpy(&i, mem.mem + mem.pos, 8); // @@ todo: make sure little endian
+ memcpy(&i, mem.mem + mem.pos, 8); /* @@ todo: make sure little endian */
mem.pos += 8;
return 8;
}
@@ -55,7 +55,7 @@ unsigned int mem_read(Stream &mem, unsigned int &i)
mem.set_failed(msg_error_read);
return 0;
}
- memcpy(&i, mem.mem + mem.pos, 4); // @@ todo: make sure little endian
+ memcpy(&i, mem.mem + mem.pos, 4); /* @@ todo: make sure little endian */
mem.pos += 4;
return 4;
}
@@ -66,7 +66,7 @@ unsigned int mem_read(Stream &mem, unsigned short &i)
mem.set_failed(msg_error_read);
return 0;
}
- memcpy(&i, mem.mem + mem.pos, 2); // @@ todo: make sure little endian
+ memcpy(&i, mem.mem + mem.pos, 2); /* @@ todo: make sure little endian */
mem.pos += 2;
return 2;
}
diff --git a/source/blender/imbuf/intern/dds/Stream.h b/source/blender/imbuf/intern/dds/Stream.h
index ad6b9165801..acf0345b3a6 100644
--- a/source/blender/imbuf/intern/dds/Stream.h
+++ b/source/blender/imbuf/intern/dds/Stream.h
@@ -23,10 +23,10 @@
#pragma once
struct Stream {
- unsigned char *mem; // location in memory
- unsigned int size; // size
- unsigned int pos; // current position
- bool failed; // error occurred when seeking
+ unsigned char *mem; /* location in memory */
+ unsigned int size; /* size */
+ unsigned int pos; /* current position */
+ bool failed; /* error occurred when seeking */
Stream(unsigned char *m, unsigned int s) : mem(m), size(s), pos(0), failed(false)
{
}
diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp
index 309b5d6410f..1d29dd4a26b 100644
--- a/source/blender/imbuf/intern/dds/dds_api.cpp
+++ b/source/blender/imbuf/intern/dds/dds_api.cpp
@@ -26,7 +26,7 @@
#include <dds_api.h>
#include <fstream>
#include <stddef.h>
-#include <stdio.h> // printf
+#include <stdio.h> /* printf */
#if defined(WIN32)
# include "utfconv.h"
@@ -72,7 +72,7 @@ int imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/)
return 1;
}
-int imb_is_a_dds(const unsigned char *mem) // note: use at most first 32 bytes
+int imb_is_a_dds(const unsigned char *mem) /* note: use at most first 32 bytes */
{
/* heuristic check to see if mem contains a DDS file */
/* header.fourcc == FOURCC_DDS */
@@ -199,4 +199,4 @@ struct ImBuf *imb_load_dds(const unsigned char *mem,
return ibuf;
}
-} // extern "C"
+} /* extern "C" */
diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.cpp b/source/blender/imbuf/intern/oiio/openimageio_api.cpp
index 86bb5934db6..71774b335d7 100644
--- a/source/blender/imbuf/intern/oiio/openimageio_api.cpp
+++ b/source/blender/imbuf/intern/oiio/openimageio_api.cpp
@@ -290,4 +290,4 @@ int OIIO_getVersionHex(void)
return openimageio_version();
}
-} // export "C"
+} /* export "C" */
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 480bb15aa87..ca70ec633c1 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -699,7 +699,7 @@ void *IMB_exr_get_handle_name(const char *name)
}
/* multiview functions */
-} // extern "C"
+} /* extern "C" */
extern "C" {
@@ -1918,7 +1918,7 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem,
// printf("OpenEXR-load: image data window %d %d %d %d\n",
// dw.min.x, dw.min.y, dw.max.x, dw.max.y);
- if (0) { // debug
+ if (0) { /* debug */
exr_print_filecontents(*file);
}
@@ -2022,17 +2022,18 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem,
in.setFrameBuffer(frameBuffer);
in.readPixels(dw.min.y, dw.max.y);
- // XXX, ImBuf has no nice way to deal with this.
- // ideally IM_rect would be used when the caller wants a rect BUT
- // at the moment all functions use IM_rect.
- // Disabling this is ok because all functions should check
- // if a rect exists and create one on demand.
- //
- // Disabling this because the sequencer frees immediate.
- //
- // if (flag & IM_rect) {
- // IMB_rect_from_float(ibuf);
- // }
+ /* XXX, ImBuf has no nice way to deal with this.
+ * ideally IM_rect would be used when the caller wants a rect BUT
+ * at the moment all functions use IM_rect.
+ * Disabling this is ok because all functions should check
+ * if a rect exists and create one on demand.
+ *
+ * Disabling this because the sequencer frees immediate. */
+#if 0
+ if (flag & IM_rect) {
+ IMB_rect_from_float(ibuf);
+ }
+#endif
if (num_rgb_channels == 0 && has_luma && exr_has_chroma(*file)) {
for (size_t a = 0; a < (size_t)ibuf->x * ibuf->y; a++) {
@@ -2102,4 +2103,4 @@ void imb_exitopenexr(void)
setGlobalThreadCount(0);
}
-} // export "C"
+} /* export "C" */
diff --git a/source/blender/imbuf/intern/openexr/openexr_multi.h b/source/blender/imbuf/intern/openexr/openexr_multi.h
index 7008447313d..556717ad618 100644
--- a/source/blender/imbuf/intern/openexr/openexr_multi.h
+++ b/source/blender/imbuf/intern/openexr/openexr_multi.h
@@ -96,5 +96,5 @@ void IMB_exr_add_view(void *handle, const char *name);
bool IMB_exr_has_multilayer(void *handle);
#ifdef __cplusplus
-} // extern "C"
+} /* extern "C" */
#endif
diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c
index 10d35b24cab..4a964c64917 100644
--- a/source/blender/imbuf/intern/scaling.c
+++ b/source/blender/imbuf/intern/scaling.c
@@ -35,7 +35,7 @@
#include "IMB_filter.h"
-#include "BLI_sys_types.h" // for intptr_t support
+#include "BLI_sys_types.h" /* for intptr_t support */
static void imb_half_x_no_alloc(struct ImBuf *ibuf2, struct ImBuf *ibuf1)
{
diff --git a/source/blender/io/alembic/exporter/abc_archive.cc b/source/blender/io/alembic/exporter/abc_archive.cc
index a181a721de9..68ad2089a3e 100644
--- a/source/blender/io/alembic/exporter/abc_archive.cc
+++ b/source/blender/io/alembic/exporter/abc_archive.cc
@@ -177,10 +177,10 @@ ABCArchive::ABCArchive(const Main *bmain,
double scene_fps = FPS;
MetaData abc_metadata = create_abc_metadata(bmain, scene_fps);
- // Create the Archive.
+ /* Create the Archive. */
archive = create_archive(&abc_ostream_, filename, abc_metadata);
- // Create time samples for transforms and shapes.
+ /* Create time samples for transforms and shapes. */
TimeSamplingPtr ts_xform;
TimeSamplingPtr ts_shapes;
@@ -197,11 +197,11 @@ ABCArchive::ABCArchive(const Main *bmain,
time_sampling_index_shapes_ = archive->addTimeSampling(*ts_shapes);
}
- // Construct the frames to export.
+ /* Construct the frames to export. */
get_frames(scene_fps, params, params.frame_samples_xform, xform_frames_);
get_frames(scene_fps, params, params.frame_samples_shape, shape_frames_);
- // Merge all frames to get the final set of frames to export.
+ /* Merge all frames to get the final set of frames to export. */
export_frames_.insert(xform_frames_.begin(), xform_frames_.end());
export_frames_.insert(shape_frames_.begin(), shape_frames_.end());
diff --git a/source/blender/io/alembic/exporter/abc_export_capi.cc b/source/blender/io/alembic/exporter/abc_export_capi.cc
index c22864a5433..892109dc578 100644
--- a/source/blender/io/alembic/exporter/abc_export_capi.cc
+++ b/source/blender/io/alembic/exporter/abc_export_capi.cc
@@ -64,7 +64,7 @@ struct ExportJobData {
namespace blender::io::alembic {
-// Construct the depsgraph for exporting.
+/* Construct the depsgraph for exporting. */
static void build_depsgraph(Depsgraph *depsgraph, const bool visible_objects_only)
{
if (visible_objects_only) {
@@ -99,12 +99,12 @@ static void export_startjob(void *customdata,
}
BKE_scene_graph_update_tagged(data->depsgraph, data->bmain);
- // For restoring the current frame after exporting animation is done.
+ /* For restoring the current frame after exporting animation is done. */
Scene *scene = DEG_get_input_scene(data->depsgraph);
const int orig_frame = CFRA;
const bool export_animation = (data->params.frame_start != data->params.frame_end);
- // Create the Alembic archive.
+ /* Create the Alembic archive. */
std::unique_ptr<ABCArchive> abc_archive;
try {
abc_archive = std::make_unique<ABCArchive>(
@@ -115,15 +115,15 @@ static void export_startjob(void *customdata,
error_message_stream << "Error writing to " << data->filename;
const std::string &error_message = error_message_stream.str();
- // The exception message can be very cryptic (just "iostream error" on Linux, for example), so
- // better not to include it in the report.
+ /* The exception message can be very cryptic (just "iostream error" on Linux, for example),
+ * so better not to include it in the report. */
CLOG_ERROR(&LOG, "%s: %s", error_message.c_str(), ex.what());
WM_report(RPT_ERROR, error_message.c_str());
data->export_ok = false;
return;
}
catch (...) {
- // Unknown exception class, so we cannot include its message.
+ /* Unknown exception class, so we cannot include its message. */
std::stringstream error_message_stream;
error_message_stream << "Unknown error writing to " << data->filename;
WM_report(RPT_ERROR, error_message_stream.str().c_str());
@@ -136,7 +136,7 @@ static void export_startjob(void *customdata,
if (export_animation) {
CLOG_INFO(&LOG, 2, "Exporting animation");
- // Writing the animated frames is not 100% of the work, but it's our best guess.
+ /* Writing the animated frames is not 100% of the work, but it's our best guess. */
const float progress_per_frame = 1.0f / std::max(size_t(1), abc_archive->total_frame_count());
ABCArchive::Frames::const_iterator frame_it = abc_archive->frames_begin();
const ABCArchive::Frames::const_iterator frames_end = abc_archive->frames_end();
@@ -148,7 +148,7 @@ static void export_startjob(void *customdata,
break;
}
- // Update the scene for the next frame to render.
+ /* Update the scene for the next frame to render. */
scene->r.cfra = static_cast<int>(frame);
scene->r.subframe = frame - scene->r.cfra;
BKE_scene_graph_update_for_newframe(data->depsgraph);
@@ -163,13 +163,13 @@ static void export_startjob(void *customdata,
}
}
else {
- // If we're not animating, a single iteration over all objects is enough.
+ /* If we're not animating, a single iteration over all objects is enough. */
iter.iterate_and_write();
}
iter.release_writers();
- // Finish up by going back to the keyframe that was current before we started.
+ /* Finish up by going back to the keyframe that was current before we started. */
if (CFRA != orig_frame) {
CFRA = orig_frame;
BKE_scene_graph_update_for_newframe(data->depsgraph);
diff --git a/source/blender/io/alembic/exporter/abc_writer_transform.cc b/source/blender/io/alembic/exporter/abc_writer_transform.cc
index 79e460e56e9..7b1fa87de64 100644
--- a/source/blender/io/alembic/exporter/abc_writer_transform.cc
+++ b/source/blender/io/alembic/exporter/abc_writer_transform.cc
@@ -66,10 +66,10 @@ const IDProperty *ABCTransformWriter::get_id_properties(const HierarchyContext &
void ABCTransformWriter::do_write(HierarchyContext &context)
{
- float parent_relative_matrix[4][4]; // The object matrix relative to the parent.
+ float parent_relative_matrix[4][4]; /* The object matrix relative to the parent. */
mul_m4_m4m4(parent_relative_matrix, context.parent_matrix_inv_world, context.matrix_world);
- // After this, parent_relative_matrix uses Y=up.
+ /* After this, parent_relative_matrix uses Y=up. */
copy_m44_axis_swap(parent_relative_matrix, parent_relative_matrix, ABC_YUP_FROM_ZUP);
/* If the parent is a camera, undo its to-Maya rotation (see below). */
diff --git a/source/blender/io/alembic/intern/abc_reader_mesh.cc b/source/blender/io/alembic/intern/abc_reader_mesh.cc
index b7fcdbc2087..31a8cf46fa7 100644
--- a/source/blender/io/alembic/intern/abc_reader_mesh.cc
+++ b/source/blender/io/alembic/intern/abc_reader_mesh.cc
@@ -339,11 +339,11 @@ static void process_normals(CDStreamConfig &config,
Alembic::AbcGeom::GeometryScope scope = normals.getScope();
switch (scope) {
- case Alembic::AbcGeom::kFacevaryingScope: // 'Vertex Normals' in Houdini.
+ case Alembic::AbcGeom::kFacevaryingScope: /* 'Vertex Normals' in Houdini. */
process_loop_normals(config, normsamp.getVals());
break;
case Alembic::AbcGeom::kVertexScope:
- case Alembic::AbcGeom::kVaryingScope: // 'Point Normals' in Houdini.
+ case Alembic::AbcGeom::kVaryingScope: /* 'Point Normals' in Houdini. */
process_vertex_normals(config, normsamp.getVals());
break;
case Alembic::AbcGeom::kConstantScope:
@@ -614,7 +614,7 @@ bool AbcMeshReader::topology_changed(Mesh *existing_mesh, const ISampleSelector
m_schema.getName().c_str(),
sample_sel.getRequestedTime(),
ex.what());
- // A similar error in read_mesh() would just return existing_mesh.
+ /* A similar error in read_mesh() would just return existing_mesh. */
return false;
}
diff --git a/source/blender/io/alembic/tests/abc_export_test.cc b/source/blender/io/alembic/tests/abc_export_test.cc
index 625dbfd176f..e1a9bd34f6b 100644
--- a/source/blender/io/alembic/tests/abc_export_test.cc
+++ b/source/blender/io/alembic/tests/abc_export_test.cc
@@ -1,6 +1,6 @@
#include "testing/testing.h"
-// Keep first since utildefines defines AT which conflicts with STL
+/* Keep first since utildefines defines AT which conflicts with STL */
#include "exporter/abc_archive.h"
#include "intern/abc_util.h"
@@ -49,7 +49,7 @@ class AlembicExportTest : public testing::Test {
deleteArchive();
}
- // Call after setting up the parameters.
+ /* Call after setting up the parameters. */
void createArchive()
{
if (abc_archive != nullptr) {
@@ -108,28 +108,28 @@ TEST_F(AlembicExportTest, TimeSamplesFullShutterDifferent)
createArchive();
std::vector<double> frames(abc_archive->frames_begin(), abc_archive->frames_end());
EXPECT_EQ(8, frames.size());
- EXPECT_NEAR(31.0, frames[0], 1e-5); // transform + shape
+ EXPECT_NEAR(31.0, frames[0], 1e-5); /* transform + shape */
EXPECT_TRUE(abc_archive->is_xform_frame(frames[0]));
EXPECT_TRUE(abc_archive->is_shape_frame(frames[0]));
- EXPECT_NEAR(31.33333, frames[1], 1e-5); // transform
+ EXPECT_NEAR(31.33333, frames[1], 1e-5); /* transform */
EXPECT_TRUE(abc_archive->is_xform_frame(frames[1]));
EXPECT_FALSE(abc_archive->is_shape_frame(frames[1]));
- EXPECT_NEAR(31.5, frames[2], 1e-5); // shape
+ EXPECT_NEAR(31.5, frames[2], 1e-5); /* shape */
EXPECT_FALSE(abc_archive->is_xform_frame(frames[2]));
EXPECT_TRUE(abc_archive->is_shape_frame(frames[2]));
- EXPECT_NEAR(31.66666, frames[3], 1e-5); // transform
+ EXPECT_NEAR(31.66666, frames[3], 1e-5); /* transform */
EXPECT_TRUE(abc_archive->is_xform_frame(frames[3]));
EXPECT_FALSE(abc_archive->is_shape_frame(frames[3]));
- EXPECT_NEAR(32.0, frames[4], 1e-5); // transform + shape
+ EXPECT_NEAR(32.0, frames[4], 1e-5); /* transform + shape */
EXPECT_TRUE(abc_archive->is_xform_frame(frames[4]));
EXPECT_TRUE(abc_archive->is_shape_frame(frames[4]));
- EXPECT_NEAR(32.33333, frames[5], 1e-5); // transform
+ EXPECT_NEAR(32.33333, frames[5], 1e-5); /* transform */
EXPECT_TRUE(abc_archive->is_xform_frame(frames[5]));
EXPECT_FALSE(abc_archive->is_shape_frame(frames[5]));
- EXPECT_NEAR(32.5, frames[6], 1e-5); // shape
+ EXPECT_NEAR(32.5, frames[6], 1e-5); /* shape */
EXPECT_FALSE(abc_archive->is_xform_frame(frames[6]));
EXPECT_TRUE(abc_archive->is_shape_frame(frames[6]));
- EXPECT_NEAR(32.66666, frames[7], 1e-5); // transform
+ EXPECT_NEAR(32.66666, frames[7], 1e-5); /* transform */
EXPECT_TRUE(abc_archive->is_xform_frame(frames[7]));
EXPECT_FALSE(abc_archive->is_shape_frame(frames[7]));
}
diff --git a/source/blender/io/alembic/tests/abc_matrix_test.cc b/source/blender/io/alembic/tests/abc_matrix_test.cc
index 02ef1a99348..fc5b645987e 100644
--- a/source/blender/io/alembic/tests/abc_matrix_test.cc
+++ b/source/blender/io/alembic/tests/abc_matrix_test.cc
@@ -10,15 +10,15 @@ namespace blender::io::alembic {
TEST(abc_matrix, CreateRotationMatrixY_YfromZ)
{
- // Input variables
+ /* Input variables */
float rot_x_mat[3][3];
float rot_y_mat[3][3];
float rot_z_mat[3][3];
float euler[3] = {0.f, M_PI_4, 0.f};
- // Construct expected matrices
+ /* Construct expected matrices */
float unit[3][3];
- float rot_z_min_quart_pi[3][3]; // rotation of -pi/4 radians over z-axis
+ float rot_z_min_quart_pi[3][3]; /* rotation of -pi/4 radians over z-axis */
unit_m3(unit);
unit_m3(rot_z_min_quart_pi);
@@ -27,7 +27,7 @@ TEST(abc_matrix, CreateRotationMatrixY_YfromZ)
rot_z_min_quart_pi[1][0] = M_SQRT1_2;
rot_z_min_quart_pi[1][1] = M_SQRT1_2;
- // Run tests
+ /* Run tests */
create_swapped_rotation_matrix(rot_x_mat, rot_y_mat, rot_z_mat, euler, ABC_YUP_FROM_ZUP);
EXPECT_M3_NEAR(rot_x_mat, unit, 1e-5f);
@@ -37,15 +37,15 @@ TEST(abc_matrix, CreateRotationMatrixY_YfromZ)
TEST(abc_matrix, CreateRotationMatrixZ_YfromZ)
{
- // Input variables
+ /* Input variables */
float rot_x_mat[3][3];
float rot_y_mat[3][3];
float rot_z_mat[3][3];
float euler[3] = {0.f, 0.f, M_PI_4};
- // Construct expected matrices
+ /* Construct expected matrices */
float unit[3][3];
- float rot_y_quart_pi[3][3]; // rotation of pi/4 radians over y-axis
+ float rot_y_quart_pi[3][3]; /* rotation of pi/4 radians over y-axis */
unit_m3(unit);
unit_m3(rot_y_quart_pi);
@@ -54,7 +54,7 @@ TEST(abc_matrix, CreateRotationMatrixZ_YfromZ)
rot_y_quart_pi[2][0] = M_SQRT1_2;
rot_y_quart_pi[2][2] = M_SQRT1_2;
- // Run tests
+ /* Run tests */
create_swapped_rotation_matrix(rot_x_mat, rot_y_mat, rot_z_mat, euler, ABC_YUP_FROM_ZUP);
EXPECT_M3_NEAR(rot_x_mat, unit, 1e-5f);
@@ -64,17 +64,17 @@ TEST(abc_matrix, CreateRotationMatrixZ_YfromZ)
TEST(abc_matrix, CreateRotationMatrixXYZ_YfromZ)
{
- // Input variables
+ /* Input variables */
float rot_x_mat[3][3];
float rot_y_mat[3][3];
float rot_z_mat[3][3];
- // in degrees: X=10, Y=20, Z=30
+ /* in degrees: X=10, Y=20, Z=30 */
float euler[3] = {0.17453292012214f, 0.34906581044197f, 0.52359879016876f};
- // Construct expected matrices
- float rot_x_p10[3][3]; // rotation of +10 degrees over x-axis
- float rot_y_p30[3][3]; // rotation of +30 degrees over y-axis
- float rot_z_m20[3][3]; // rotation of -20 degrees over z-axis
+ /* Construct expected matrices */
+ float rot_x_p10[3][3]; /* rotation of +10 degrees over x-axis */
+ float rot_y_p30[3][3]; /* rotation of +30 degrees over y-axis */
+ float rot_z_m20[3][3]; /* rotation of -20 degrees over z-axis */
unit_m3(rot_x_p10);
rot_x_p10[1][1] = 0.9848077297210693f;
@@ -94,7 +94,7 @@ TEST(abc_matrix, CreateRotationMatrixXYZ_YfromZ)
rot_z_m20[1][0] = 0.3420201241970062f;
rot_z_m20[1][1] = 0.9396926164627075f;
- // Run tests
+ /* Run tests */
create_swapped_rotation_matrix(rot_x_mat, rot_y_mat, rot_z_mat, euler, ABC_YUP_FROM_ZUP);
EXPECT_M3_NEAR(rot_x_mat, rot_x_p10, 1e-5f);
@@ -104,17 +104,17 @@ TEST(abc_matrix, CreateRotationMatrixXYZ_YfromZ)
TEST(abc_matrix, CreateRotationMatrixXYZ_ZfromY)
{
- // Input variables
+ /* Input variables */
float rot_x_mat[3][3];
float rot_y_mat[3][3];
float rot_z_mat[3][3];
- // in degrees: X=10, Y=20, Z=30
+ /* in degrees: X=10, Y=20, Z=30 */
float euler[3] = {0.1745329201221466f, 0.3490658104419708f, 0.5235987901687622f};
- // Construct expected matrices
- float rot_x_p10[3][3]; // rotation of +10 degrees over x-axis
- float rot_y_m30[3][3]; // rotation of -30 degrees over y-axis
- float rot_z_p20[3][3]; // rotation of +20 degrees over z-axis
+ /* Construct expected matrices */
+ float rot_x_p10[3][3]; /* rotation of +10 degrees over x-axis */
+ float rot_y_m30[3][3]; /* rotation of -30 degrees over y-axis */
+ float rot_z_p20[3][3]; /* rotation of +20 degrees over z-axis */
unit_m3(rot_x_p10);
rot_x_p10[1][1] = 0.9848077297210693f;
@@ -134,7 +134,7 @@ TEST(abc_matrix, CreateRotationMatrixXYZ_ZfromY)
rot_z_p20[1][0] = -0.3420201241970062f;
rot_z_p20[1][1] = 0.9396926164627075f;
- // Run tests
+ /* Run tests */
create_swapped_rotation_matrix(rot_x_mat, rot_y_mat, rot_z_mat, euler, ABC_ZUP_FROM_YUP);
EXPECT_M3_NEAR(rot_x_mat, rot_x_p10, 1e-5f);
diff --git a/source/blender/io/collada/AnimationExporter.h b/source/blender/io/collada/AnimationExporter.h
index 2d38a541347..fd691184e8b 100644
--- a/source/blender/io/collada/AnimationExporter.h
+++ b/source/blender/io/collada/AnimationExporter.h
@@ -39,7 +39,7 @@
#include "BLI_utildefines.h"
#include "BIK_api.h"
-#include "BKE_action.h" // pose functions
+#include "BKE_action.h" /* pose functions */
#include "BKE_armature.h"
#include "BKE_constraint.h"
#include "BKE_fcurve.h"
@@ -69,7 +69,7 @@
#include "IK_solver.h"
-#include <algorithm> // std::find
+#include <algorithm> /* std::find */
#include <map>
#include <vector>
@@ -100,7 +100,7 @@ class AnimationExporter : COLLADASW::LibraryAnimations {
bool exportAnimations();
- // called for each exported object
+ /* called for each exported object */
void operator()(Object *ob);
protected:
@@ -129,8 +129,8 @@ class AnimationExporter : COLLADASW::LibraryAnimations {
Object *ob_arm,
bPoseChannel *pChan);
- // dae_bone_animation -> add_bone_animation
- // (blend this into dae_bone_animation)
+ /* dae_bone_animation -> add_bone_animation
+ * (blend this into dae_bone_animation) */
void dae_bone_animation(std::vector<float> &fra,
float *v,
int tm_type,
diff --git a/source/blender/io/collada/AnimationImporter.h b/source/blender/io/collada/AnimationImporter.h
index 5c6f9400286..44001366adc 100644
--- a/source/blender/io/collada/AnimationImporter.h
+++ b/source/blender/io/collada/AnimationImporter.h
@@ -52,7 +52,7 @@ class ArmatureImporter;
class AnimationImporterBase {
public:
- // virtual void change_eul_to_quat(Object *ob, bAction *act) = 0;
+ /* virtual void change_eul_to_quat(Object *ob, bAction *act) = 0; */
};
class AnimationImporter : private TransformReader, public AnimationImporterBase {
@@ -75,7 +75,7 @@ class AnimationImporter : private TransformReader, public AnimationImporterBase
float value,
eBezTriple_Interpolation ipo = BEZT_IPO_LIN);
- // create one or several fcurves depending on the number of parameters being animated
+ /* create one or several fcurves depending on the number of parameters being animated */
void animation_to_fcurves(COLLADAFW::AnimationCurve *curve);
void fcurve_deg_to_rad(FCurve *cu);
@@ -143,7 +143,7 @@ class AnimationImporter : private TransformReader, public AnimationImporterBase
void set_import_from_version(std::string import_from_version);
bool write_animation(const COLLADAFW::Animation *anim);
- // called on post-process stage after writeVisualScenes
+ /* called on post-process stage after writeVisualScenes */
bool write_animation_list(const COLLADAFW::AnimationList *animlist);
void read_node_transform(COLLADAFW::Node *node, Object *ob);
@@ -199,9 +199,9 @@ class AnimationImporter : private TransformReader, public AnimationImporterBase
int array_index,
int scale = 1);
void unused_fcurve(std::vector<FCurve *> *curves);
- // prerequisites:
- // animlist_map - map animlist id -> animlist
- // curve_map - map anim id -> curve(s)
+ /* prerequisites:
+ * animlist_map - map animlist id -> animlist
+ * curve_map - map anim id -> curve(s) */
Object *translate_animation_OLD(COLLADAFW::Node *node,
std::map<COLLADAFW::UniqueId, Object *> &object_map,
std::map<COLLADAFW::UniqueId, COLLADAFW::Node *> &root_map,
@@ -212,21 +212,21 @@ class AnimationImporter : private TransformReader, public AnimationImporterBase
void find_frames_old(std::vector<float> *frames,
COLLADAFW::Node *node,
COLLADAFW::Transformation::TransformationType tm_type);
- // internal, better make it private
- // warning: evaluates only rotation
- // prerequisites: animlist_map, curve_map
+ /* internal, better make it private
+ * warning: evaluates only rotation
+ * prerequisites: animlist_map, curve_map */
void evaluate_transform_at_frame(float mat[4][4], COLLADAFW::Node *node, float fra);
- // return true to indicate that mat contains a sane value
+ /* return true to indicate that mat contains a sane value */
bool evaluate_animation(COLLADAFW::Transformation *tm,
float mat[4][4],
float fra,
const char *node_id);
- // gives a world-space mat of joint at rest position
+ /* gives a world-space mat of joint at rest position */
void get_joint_rest_mat(float mat[4][4], COLLADAFW::Node *root, COLLADAFW::Node *node);
- // gives a world-space mat, end's mat not included
+ /* gives a world-space mat, end's mat not included */
bool calc_joint_parent_mat_rest(float mat[4][4],
float par[4][4],
COLLADAFW::Node *node,
@@ -239,8 +239,8 @@ class AnimationImporter : private TransformReader, public AnimationImporterBase
#endif
#if 0
- // recursively evaluates joint tree until end is found, mat then is world-space matrix of end
- // mat must be identity on enter, node must be root
+ /* recursively evaluates joint tree until end is found, mat then is world-space matrix of end
+ * mat must be identity on enter, node must be root */
bool evaluate_joint_world_transform_at_frame(
float mat[4][4], float par[4][4], COLLADAFW::Node *node, COLLADAFW::Node *end, float fra);
#endif
diff --git a/source/blender/io/collada/ArmatureExporter.cpp b/source/blender/io/collada/ArmatureExporter.cpp
index fc697e1617b..ed043096c7e 100644
--- a/source/blender/io/collada/ArmatureExporter.cpp
+++ b/source/blender/io/collada/ArmatureExporter.cpp
@@ -40,14 +40,14 @@
#include "GeometryExporter.h"
#include "SceneExporter.h"
-// write bone nodes
+/* write bone nodes */
void ArmatureExporter::add_armature_bones(Object *ob_arm,
ViewLayer *view_layer,
SceneExporter *se,
std::vector<Object *> &child_objects)
{
- // write bone nodes
+ /* write bone nodes */
bArmature *armature = (bArmature *)ob_arm->data;
bool is_edited = armature->edbo != NULL;
@@ -95,7 +95,7 @@ bool ArmatureExporter::add_instance_controller(Object *ob)
return false;
}
- // write root bone URLs
+ /* write root bone URLs */
Bone *bone;
for (bone = (Bone *)arm->bonebase.first; bone; bone = bone->next) {
write_bone_URLs(ins, ob_arm, bone);
@@ -144,7 +144,7 @@ void ArmatureExporter::find_objects_using_armature(Object *ob_arm,
}
#endif
-// parent_mat is armature-space
+/* parent_mat is armature-space */
void ArmatureExporter::add_bone_node(Bone *bone,
Object *ob_arm,
SceneExporter *se,
@@ -197,7 +197,7 @@ void ArmatureExporter::add_bone_node(Bone *bone,
add_bone_transform(ob_arm, bone, node);
- // Write nodes of childobjects, remove written objects from list
+ /* Write nodes of childobjects, remove written objects from list */
std::vector<Object *>::iterator iter = child_objects.begin();
while (iter != child_objects.end()) {
@@ -206,20 +206,20 @@ void ArmatureExporter::add_bone_node(Bone *bone,
float backup_parinv[4][4];
copy_m4_m4(backup_parinv, ob->parentinv);
- // crude, temporary change to parentinv
- // so transform gets exported correctly.
+ /* Crude, temporary change to parentinv
+ * so transform gets exported correctly. */
- // Add bone tail- translation... don't know why
- // bone parenting is against the tail of a bone
- // and not it's head, seems arbitrary.
+ /* Add bone tail- translation... don't know why
+ * bone parenting is against the tail of a bone
+ * and not it's head, seems arbitrary. */
ob->parentinv[3][1] += bone->length;
- // OPEN_SIM_COMPATIBILITY
- // TODO: when such objects are animated as
- // single matrix the tweak must be applied
- // to the result.
+ /* OPEN_SIM_COMPATIBILITY
+ * TODO: when such objects are animated as
+ * single matrix the tweak must be applied
+ * to the result. */
if (export_settings.get_open_sim()) {
- // tweak objects parentinverse to match compatibility
+ /* Tweak objects parentinverse to match compatibility. */
float temp[4][4];
copy_m4_m4(temp, bone->arm_mat);
@@ -289,11 +289,11 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW:
mul_m4_m4m4(mat, parent_inverse, bone_rest_mat);
}
- // OPEN_SIM_COMPATIBILITY
+ /* OPEN_SIM_COMPATIBILITY */
if (export_settings.get_open_sim()) {
- // Remove rotations vs armature from transform
- // parent_rest_rot * mat * irest_rot
+ /* Remove rotations vs armature from transform
+ * parent_rest_rot * mat * irest_rot */
Matrix workmat;
copy_m4_m4(workmat, bone_rest_mat);
diff --git a/source/blender/io/collada/ArmatureExporter.h b/source/blender/io/collada/ArmatureExporter.h
index 193dc9cde3a..b994741f342 100644
--- a/source/blender/io/collada/ArmatureExporter.h
+++ b/source/blender/io/collada/ArmatureExporter.h
@@ -22,7 +22,7 @@
#include <list>
#include <string>
-//#include <vector>
+// #include <vector>
#include "COLLADASWInputList.h"
#include "COLLADASWLibraryControllers.h"
@@ -43,16 +43,16 @@
class SceneExporter;
-// XXX exporter writes wrong data for shared armatures. A separate
-// controller should be written for each armature-mesh binding how do
-// we make controller ids then?
+/* XXX exporter writes wrong data for shared armatures. A separate
+ * controller should be written for each armature-mesh binding how do
+ * we make controller ids then? */
class ArmatureExporter : public COLLADASW::LibraryControllers,
protected TransformWriter,
protected InstanceWriter {
public:
- // XXX exporter writes wrong data for shared armatures. A separate
- // controller should be written for each armature-mesh binding how do
- // we make controller ids then?
+ /* XXX exporter writes wrong data for shared armatures. A separate
+ * controller should be written for each armature-mesh binding how do
+ * we make controller ids then? */
ArmatureExporter(BlenderContext &blender_context,
COLLADASW::StreamWriter *sw,
BCExportSettings &export_settings)
@@ -83,8 +83,8 @@ class ArmatureExporter : public COLLADASW::LibraryControllers,
void find_objects_using_armature(Object *ob_arm, std::vector<Object *> &objects, Scene *sce);
#endif
- // Scene, SceneExporter and the list of child_objects
- // are required for writing bone parented objects
+ /* Scene, SceneExporter and the list of child_objects
+ * are required for writing bone parented objects */
void add_bone_node(Bone *bone,
Object *ob_arm,
SceneExporter *se,
diff --git a/source/blender/io/collada/ArmatureImporter.cpp b/source/blender/io/collada/ArmatureImporter.cpp
index dbb0ad328f5..af6558da3b4 100644
--- a/source/blender/io/collada/ArmatureImporter.cpp
+++ b/source/blender/io/collada/ArmatureImporter.cpp
@@ -153,7 +153,7 @@ int ArmatureImporter::create_bone(SkinInfo *skin,
if (layer) {
bone->layer = layer;
}
- arm->layer |= layer; // ensure that all populated bone layers are visible after import
+ arm->layer |= layer; /* ensure that all populated bone layers are visible after import */
float *tail = be.get_tail();
int use_connect = be.get_use_connect();
@@ -504,7 +504,7 @@ void ArmatureImporter::create_armature_bones(Main *bmain, std::vector<Object *>
}
ED_armature_to_edit(armature);
- armature->layer = 0; // layer is set according to imported bone set in create_bone()
+ armature->layer = 0; /* layer is set according to imported bone set in create_bone() */
create_bone(NULL, node, NULL, node->getChildNodes().getCount(), NULL, armature, layer_labels);
if (this->import_settings->find_chains) {
@@ -623,7 +623,7 @@ Object *ArmatureImporter::create_armature_bones(Main *bmain, SkinInfo &skin)
ob_arm = skin.set_armature(shared);
}
else {
- ob_arm = skin.create_armature(m_bmain, scene, view_layer); // once for every armature
+ ob_arm = skin.create_armature(m_bmain, scene, view_layer); /* once for every armature */
}
/* enter armature edit mode */
@@ -631,7 +631,7 @@ Object *ArmatureImporter::create_armature_bones(Main *bmain, SkinInfo &skin)
ED_armature_to_edit(armature);
totbone = 0;
- // bone_direction_row = 1; // TODO: don't default to Y but use asset and based on it decide on
+ // bone_direction_row = 1; /* TODO: don't default to Y but use asset and based on it decide on */
/* default row */
/* create bones */
diff --git a/source/blender/io/collada/ArmatureImporter.h b/source/blender/io/collada/ArmatureImporter.h
index a1c4a25b80f..16265e66a8e 100644
--- a/source/blender/io/collada/ArmatureImporter.h
+++ b/source/blender/io/collada/ArmatureImporter.h
@@ -61,11 +61,11 @@ class ArmatureImporter : private TransformReader {
// std::map<int, JointData> joint_index_to_joint_info_map;
// std::map<COLLADAFW::UniqueId, int> joint_id_to_joint_index_map;
BoneExtensionManager bone_extension_manager;
- // int bone_direction_row; // XXX not used
+ // int bone_direction_row; /* XXX not used */
float leaf_bone_length;
int totbone;
- // XXX not used
- // float min_angle; // minimum angle between bone head-tail and a row of bone matrix
+ /* XXX not used */
+ // float min_angle; /* minimum angle between bone head-tail and a row of bone matrix */
#if 0
struct ArmatureJoints {
@@ -75,10 +75,10 @@ class ArmatureImporter : private TransformReader {
std::vector<ArmatureJoints> armature_joints;
#endif
- Object *empty; // empty for leaf bones
+ Object *empty; /* empty for leaf bones */
std::map<COLLADAFW::UniqueId, COLLADAFW::UniqueId> geom_uid_by_controller_uid;
- std::map<COLLADAFW::UniqueId, COLLADAFW::Node *> joint_by_uid; // contains all joints
+ std::map<COLLADAFW::UniqueId, COLLADAFW::Node *> joint_by_uid; /* contains all joints */
std::vector<COLLADAFW::Node *> root_joints;
std::vector<COLLADAFW::Node *> finished_joints;
std::vector<COLLADAFW::MorphController *> morph_controllers;
@@ -87,11 +87,12 @@ class ArmatureImporter : private TransformReader {
MeshImporterBase *mesh_importer;
- // This is used to store data passed in write_controller_data.
- // Arrays from COLLADAFW::SkinControllerData lose ownership, so do this class members
- // so that arrays don't get freed until we free them explicitly.
+ /* This is used to store data passed in write_controller_data.
+ * Arrays from COLLADAFW::SkinControllerData lose ownership, so do this class members
+ * so that arrays don't get freed until we free them explicitly. */
- std::map<COLLADAFW::UniqueId, SkinInfo> skin_by_data_uid; // data UID = skin controller data UID
+ std::map<COLLADAFW::UniqueId, SkinInfo>
+ skin_by_data_uid; /* data UID = skin controller data UID */
#if 0
JointData *get_joint_data(COLLADAFW::Node *node);
#endif
@@ -153,13 +154,13 @@ class ArmatureImporter : private TransformReader {
void add_root_joint(COLLADAFW::Node *node, Object *parent);
- // here we add bones to armatures, having armatures previously created in write_controller
+ /* here we add bones to armatures, having armatures previously created in write_controller */
void make_armatures(bContext *C, std::vector<Object *> &objects_to_scale);
void make_shape_keys(bContext *C);
#if 0
- // link with meshes, create vertex groups, assign weights
+ /* link with meshes, create vertex groups, assign weights */
void link_armature(Object *ob_arm,
const COLLADAFW::UniqueId &geom_id,
const COLLADAFW::UniqueId &controller_data_id);
@@ -175,7 +176,7 @@ class ArmatureImporter : private TransformReader {
void get_rna_path_for_joint(COLLADAFW::Node *node, char *joint_path, size_t count);
- // gives a world-space mat
+ /* gives a world-space mat */
bool get_joint_bind_mat(float m[4][4], COLLADAFW::Node *joint);
void set_tags_map(TagsMap &tags_map);
diff --git a/source/blender/io/collada/BCAnimationCurve.cpp b/source/blender/io/collada/BCAnimationCurve.cpp
index 559a17eda9f..46439bb3556 100644
--- a/source/blender/io/collada/BCAnimationCurve.cpp
+++ b/source/blender/io/collada/BCAnimationCurve.cpp
@@ -230,7 +230,7 @@ int BCAnimationCurve::closest_index_above(const float sample_frame, const int st
return -1;
}
- const int cframe = fcurve->bezt[start_at].vec[1][0]; // inaccurate!
+ const int cframe = fcurve->bezt[start_at].vec[1][0]; /* inaccurate! */
if (fabs(cframe - sample_frame) < 0.00001) {
return start_at;
@@ -252,7 +252,7 @@ int BCAnimationCurve::closest_index_below(const float sample_frame) const
for (int fcu_index = 0; fcu_index < fcurve->totvert; fcu_index++) {
upper_index = fcu_index;
- const int cframe = fcurve->bezt[fcu_index].vec[1][0]; // inaccurate!
+ const int cframe = fcurve->bezt[fcu_index].vec[1][0]; /* inaccurate! */
if (cframe <= sample_frame) {
lower_frame = cframe;
lower_index = fcu_index;
@@ -347,7 +347,7 @@ float BCAnimationCurve::get_value(const float frame)
if (fcurve) {
return evaluate_fcurve(fcurve, frame);
}
- return 0; // TODO: handle case where neither sample nor fcu exist
+ return 0; /* TODO: handle case where neither sample nor fcu exist */
}
void BCAnimationCurve::update_range(float val)
diff --git a/source/blender/io/collada/BCAnimationCurve.h b/source/blender/io/collada/BCAnimationCurve.h
index 3f7bcf9a13f..27856dd55f4 100644
--- a/source/blender/io/collada/BCAnimationCurve.h
+++ b/source/blender/io/collada/BCAnimationCurve.h
@@ -119,7 +119,7 @@ class BCAnimationCurve {
std::string get_animation_name(Object *ob) const; /* xxx: this is collada specific */
std::string get_channel_target() const;
std::string get_channel_type() const;
- std::string get_channel_posebone() const; // returns "" if channel is not a bone channel
+ std::string get_channel_posebone() const; /* returns "" if channel is not a bone channel */
int get_channel_index() const;
int get_subindex() const;
diff --git a/source/blender/io/collada/BCAnimationSampler.cpp b/source/blender/io/collada/BCAnimationSampler.cpp
index b8df98e8acb..6bada9950b9 100644
--- a/source/blender/io/collada/BCAnimationSampler.cpp
+++ b/source/blender/io/collada/BCAnimationSampler.cpp
@@ -17,7 +17,7 @@
* All rights reserved.
*/
-#include <algorithm> // std::find
+#include <algorithm> /* std::find */
#include <map>
#include <vector>
@@ -92,7 +92,7 @@ static void get_sample_frames(BCFrameSet &sample_frames,
sample_frames.clear();
if (sampling_rate < 1) {
- return; // no sample frames in this case
+ return; /* no sample frames in this case */
}
float sfra = scene->r.sfra;
@@ -584,7 +584,7 @@ BCSampleFrame *BCSampleFrameContainer::get_frame(int frame_index)
/* Return a list of all frames that need to be sampled */
int BCSampleFrameContainer::get_frames(std::vector<int> &frames) const
{
- frames.clear(); // safety;
+ frames.clear(); /* safety; */
BCSampleFrameMap::const_iterator it;
for (it = sample_frames.begin(); it != sample_frames.end(); ++it) {
frames.push_back(it->first);
@@ -594,7 +594,7 @@ int BCSampleFrameContainer::get_frames(std::vector<int> &frames) const
int BCSampleFrameContainer::get_frames(Object *ob, BCFrames &frames) const
{
- frames.clear(); // safety;
+ frames.clear(); /* safety; */
BCSampleFrameMap::const_iterator it;
for (it = sample_frames.begin(); it != sample_frames.end(); ++it) {
const BCSampleFrame &frame = it->second;
@@ -607,7 +607,7 @@ int BCSampleFrameContainer::get_frames(Object *ob, BCFrames &frames) const
int BCSampleFrameContainer::get_frames(Object *ob, Bone *bone, BCFrames &frames) const
{
- frames.clear(); // safety;
+ frames.clear(); /* safety; */
BCSampleFrameMap::const_iterator it;
for (it = sample_frames.begin(); it != sample_frames.end(); ++it) {
const BCSampleFrame &frame = it->second;
@@ -620,7 +620,7 @@ int BCSampleFrameContainer::get_frames(Object *ob, Bone *bone, BCFrames &frames)
int BCSampleFrameContainer::get_samples(Object *ob, BCFrameSampleMap &samples) const
{
- samples.clear(); // safety;
+ samples.clear(); /* safety; */
BCSampleFrameMap::const_iterator it;
for (it = sample_frames.begin(); it != sample_frames.end(); ++it) {
const BCSampleFrame &frame = it->second;
@@ -634,7 +634,7 @@ int BCSampleFrameContainer::get_samples(Object *ob, BCFrameSampleMap &samples) c
int BCSampleFrameContainer::get_matrices(Object *ob, BCMatrixSampleMap &samples) const
{
- samples.clear(); // safety;
+ samples.clear(); /* safety; */
BCSampleFrameMap::const_iterator it;
for (it = sample_frames.begin(); it != sample_frames.end(); ++it) {
const BCSampleFrame &frame = it->second;
@@ -648,7 +648,7 @@ int BCSampleFrameContainer::get_matrices(Object *ob, BCMatrixSampleMap &samples)
int BCSampleFrameContainer::get_matrices(Object *ob, Bone *bone, BCMatrixSampleMap &samples) const
{
- samples.clear(); // safety;
+ samples.clear(); /* safety; */
BCSampleFrameMap::const_iterator it;
for (it = sample_frames.begin(); it != sample_frames.end(); ++it) {
const BCSampleFrame &frame = it->second;
diff --git a/source/blender/io/collada/BCAnimationSampler.h b/source/blender/io/collada/BCAnimationSampler.h
index f7f2464a637..52c0c8aa29e 100644
--- a/source/blender/io/collada/BCAnimationSampler.h
+++ b/source/blender/io/collada/BCAnimationSampler.h
@@ -134,7 +134,7 @@ class BCSampleFrameContainer {
}
BCSample &add(Object *ob, int frame_index);
- BCSampleFrame *get_frame(int frame_index); // returns NULL if frame does not exist
+ BCSampleFrame *get_frame(int frame_index); /* returns NULL if frame does not exist */
int get_frames(std::vector<int> &frames) const;
int get_frames(Object *ob, BCFrames &frames) const;
diff --git a/source/blender/io/collada/BCMath.cpp b/source/blender/io/collada/BCMath.cpp
index 85d4c212141..8a3fbf3c92c 100644
--- a/source/blender/io/collada/BCMath.cpp
+++ b/source/blender/io/collada/BCMath.cpp
@@ -67,7 +67,8 @@ BCMatrix::BCMatrix(BC_global_forward_axis global_forward_axis, BC_global_up_axis
mat3_from_axis_conversion(
BC_DEFAULT_FORWARD, BC_DEFAULT_UP, global_forward_axis, global_up_axis, mrot);
- transpose_m3(mrot); // TODO: Verify that mat3_from_axis_conversion() returns a transposed matrix
+ transpose_m3(
+ mrot); /* TODO: Verify that mat3_from_axis_conversion() returns a transposed matrix */
copy_m4_m3(mat, mrot);
set_transform(mat);
}
diff --git a/source/blender/io/collada/BCSampleData.h b/source/blender/io/collada/BCSampleData.h
index 463c90ec00b..06d234e2c3e 100644
--- a/source/blender/io/collada/BCSampleData.h
+++ b/source/blender/io/collada/BCSampleData.h
@@ -55,7 +55,7 @@ class BCSample {
bool get_value(std::string channel_target, const int array_index, float *val) const;
const BCMatrix &get_matrix() const;
- const BCMatrix *get_matrix(Bone *bone) const; // returns NULL if bone is not animated
+ const BCMatrix *get_matrix(Bone *bone) const; /* returns NULL if bone is not animated */
};
typedef std::map<Object *, BCSample *> BCSampleMap;
diff --git a/source/blender/io/collada/BlenderContext.cpp b/source/blender/io/collada/BlenderContext.cpp
index 1d3bffacb79..defa875882f 100644
--- a/source/blender/io/collada/BlenderContext.cpp
+++ b/source/blender/io/collada/BlenderContext.cpp
@@ -112,7 +112,7 @@ BlenderContext::BlenderContext(bContext *C)
main = CTX_data_main(C);
scene = CTX_data_scene(C);
view_layer = CTX_data_view_layer(C);
- depsgraph = nullptr; // create only when needed
+ depsgraph = nullptr; /* create only when needed */
}
bContext *BlenderContext::get_context()
diff --git a/source/blender/io/collada/ControllerExporter.cpp b/source/blender/io/collada/ControllerExporter.cpp
index 1b8c859f443..1d8d0f2b389 100644
--- a/source/blender/io/collada/ControllerExporter.cpp
+++ b/source/blender/io/collada/ControllerExporter.cpp
@@ -305,7 +305,7 @@ void ControllerExporter::export_morph_controller(Object *ob, Key *key)
COLLADASW::InputList &input = targets.getInputList();
input.push_back(COLLADASW::Input(
- COLLADASW::InputSemantic::MORPH_TARGET, // constant declared in COLLADASWInputList.h
+ COLLADASW::InputSemantic::MORPH_TARGET, /* constant declared in COLLADASWInputList.h */
COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, targets_id)));
input.push_back(
COLLADASW::Input(COLLADASW::InputSemantic::MORPH_WEIGHT,
@@ -400,7 +400,7 @@ void ControllerExporter::add_joints_element(ListBase *defbase,
COLLADASW::InputList &input = joints.getInputList();
input.push_back(COLLADASW::Input(
- COLLADASW::InputSemantic::JOINT, // constant declared in COLLADASWInputList.h
+ COLLADASW::InputSemantic::JOINT, /* constant declared in COLLADASWInputList.h */
COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, joints_source_id)));
input.push_back(
COLLADASW::Input(COLLADASW::InputSemantic::BINDMATRIX,
@@ -415,7 +415,7 @@ void ControllerExporter::add_bind_shape_mat(Object *ob)
BKE_object_matrix_local_get(ob, f_obmat);
if (export_settings.get_apply_global_orientation()) {
- // do nothing, rotation is going to be applied to the Data
+ /* do nothing, rotation is going to be applied to the Data */
}
else {
bc_add_global_transform(f_obmat, export_settings.get_global_transform());
@@ -615,7 +615,7 @@ void ControllerExporter::add_vertex_weights_element(const std::string &weights_s
int offset = 0;
input.push_back(COLLADASW::Input(
- COLLADASW::InputSemantic::JOINT, // constant declared in COLLADASWInputList.h
+ COLLADASW::InputSemantic::JOINT, /* constant declared in COLLADASWInputList.h */
COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, joints_source_id),
offset++));
input.push_back(
diff --git a/source/blender/io/collada/ControllerExporter.h b/source/blender/io/collada/ControllerExporter.h
index 753538d8e98..6a377a4119e 100644
--- a/source/blender/io/collada/ControllerExporter.h
+++ b/source/blender/io/collada/ControllerExporter.h
@@ -56,9 +56,9 @@ class ControllerExporter : public COLLADASW::LibraryControllers,
BCExportSettings export_settings;
public:
- // XXX exporter writes wrong data for shared armatures. A separate
- // controller should be written for each armature-mesh binding how do
- // we make controller ids then?
+ /* XXX exporter writes wrong data for shared armatures. A separate
+ * controller should be written for each armature-mesh binding how do
+ * we make controller ids then? */
ControllerExporter(BlenderContext &blender_context,
COLLADASW::StreamWriter *sw,
BCExportSettings &export_settings)
@@ -91,8 +91,8 @@ class ControllerExporter : public COLLADASW::LibraryControllers,
std::string get_controller_id(Key *key, Object *ob);
- // ob should be of type OB_MESH
- // both args are required
+ /* ob should be of type OB_MESH
+ * both args are required */
void export_skin_controller(Object *ob, Object *ob_arm);
void export_morph_controller(Object *ob, Key *key);
diff --git a/source/blender/io/collada/DocumentExporter.cpp b/source/blender/io/collada/DocumentExporter.cpp
index 6be441a9e27..65c71b0edef 100644
--- a/source/blender/io/collada/DocumentExporter.cpp
+++ b/source/blender/io/collada/DocumentExporter.cpp
@@ -18,7 +18,7 @@
* \ingroup collada
*/
-#include <algorithm> // std::find
+#include <algorithm> /* std::find */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@@ -79,7 +79,7 @@
#include "BLI_string.h"
#include "BLI_utildefines.h"
-#include "BKE_action.h" // pose functions
+#include "BKE_action.h" /* pose functions */
#include "BKE_animsys.h"
#include "BKE_appdir.h"
#include "BKE_armature.h"
@@ -106,7 +106,7 @@ extern "C" char build_hash[];
#include "collada_internal.h"
#include "collada_utils.h"
-// can probably go after refactor is complete
+/* can probably go after refactor is complete */
#include "InstanceWriter.h"
#include "TransformWriter.h"
@@ -170,9 +170,9 @@ static COLLADABU::NativeString make_temp_filepath(const char *name, const char *
return native_filename;
}
-// TODO: it would be better to instantiate animations rather than create a new one per object
-// COLLADA allows this through multiple <channel>s in <animation>.
-// For this to work, we need to know objects that use a certain action.
+/* TODO: it would be better to instantiate animations rather than create a new one per object
+ * COLLADA allows this through multiple <channel>s in <animation>.
+ * For this to work, we need to know objects that use a certain action. */
int DocumentExporter::exportCurrentScene()
{
@@ -187,10 +187,10 @@ int DocumentExporter::exportCurrentScene()
COLLADABU::NativeString native_filename = make_temp_filepath(NULL, ".dae");
COLLADASW::StreamWriter *writer = new COLLADASW::StreamWriter(native_filename);
- // open <collada>
+ /* open <collada> */
writer->startDocument();
- // <asset>
+ /* <asset> */
COLLADASW::Asset asset(writer);
RNA_id_pointer_create(&(sce->id), &sceneptr);
@@ -254,37 +254,37 @@ int DocumentExporter::exportCurrentScene()
asset.add();
LinkNode *export_set = this->export_settings.get_export_set();
- // <library_cameras>
+ /* <library_cameras> */
if (bc_has_object_type(export_set, OB_CAMERA)) {
CamerasExporter ce(writer, this->export_settings);
ce.exportCameras(sce);
}
- // <library_lights>
+ /* <library_lights> */
if (bc_has_object_type(export_set, OB_LAMP)) {
LightsExporter le(writer, this->export_settings);
le.exportLights(sce);
}
- // <library_effects>
+ /* <library_effects> */
EffectsExporter ee(writer, this->export_settings, key_image_map);
ee.exportEffects(C, sce);
- // <library_images>
+ /* <library_images> */
ImagesExporter ie(writer, this->export_settings, key_image_map);
ie.exportImages(sce);
- // <library_materials>
+ /* <library_materials> */
MaterialsExporter me(writer, this->export_settings);
me.exportMaterials(sce);
- // <library_geometries>
+ /* <library_geometries> */
if (bc_has_object_type(export_set, OB_MESH)) {
GeometryExporter ge(blender_context, writer, this->export_settings);
ge.exportGeom();
}
- // <library_controllers>
+ /* <library_controllers> */
ArmatureExporter arm_exporter(blender_context, writer, this->export_settings);
ControllerExporter controller_exporter(blender_context, writer, this->export_settings);
if (bc_has_object_type(export_set, OB_ARMATURE) ||
@@ -292,28 +292,28 @@ int DocumentExporter::exportCurrentScene()
controller_exporter.export_controllers();
}
- // <library_visual_scenes>
+ /* <library_visual_scenes> */
SceneExporter se(blender_context, writer, &arm_exporter, this->export_settings);
if (this->export_settings.get_include_animations()) {
- // <library_animations>
+ /* <library_animations> */
AnimationExporter ae(writer, this->export_settings);
ae.exportAnimations();
}
se.exportScene();
- // <scene>
+ /* <scene> */
std::string scene_name(translate_id(id_name(sce)));
COLLADASW::Scene scene(writer, COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, scene_name));
scene.add();
- // close <Collada>
+ /* close <Collada> */
writer->endDocument();
delete writer;
- // Finally move the created document into place
+ /* Finally move the created document into place */
fprintf(stdout, "Collada export to: %s\n", this->export_settings.get_filepath());
int status = BLI_rename(native_filename.c_str(), this->export_settings.get_filepath());
if (status != 0) {
diff --git a/source/blender/io/collada/DocumentImporter.cpp b/source/blender/io/collada/DocumentImporter.cpp
index 083d7258d0a..b9f132d04dd 100644
--- a/source/blender/io/collada/DocumentImporter.cpp
+++ b/source/blender/io/collada/DocumentImporter.cpp
@@ -22,7 +22,7 @@
* * name imported objects
* * import object rotation as euler */
-#include <algorithm> // sort()
+#include <algorithm> /* sort() */
#include <map>
#include <string>
@@ -90,7 +90,7 @@
*/
// #define COLLADA_DEBUG
-// creates empties for each imported bone on layer 2, for debugging
+/* creates empties for each imported bone on layer 2, for debugging */
// #define ARMATURE_TEST
DocumentImporter::DocumentImporter(bContext *C, const ImportSettings *import_settings)
@@ -429,7 +429,7 @@ Object *DocumentImporter::create_instance_node(Object *source_ob,
if (source_node) {
COLLADABU::Math::Matrix4 mat4 = source_node->getTransformationMatrix();
COLLADABU::Math::Matrix4 bmat4 =
- mat4.transpose(); // transpose to get blender row-major order
+ mat4.transpose(); /* transpose to get blender row-major order */
float mat[4][4];
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
@@ -457,7 +457,7 @@ Object *DocumentImporter::create_instance_node(Object *source_ob,
}
COLLADAFW::InstanceNodePointerArray &inodes = child_node->getInstanceNodes();
Object *new_child = NULL;
- if (inodes.getCount()) { // \todo loop through instance nodes
+ if (inodes.getCount()) { /* \todo loop through instance nodes */
const COLLADAFW::UniqueId &id = inodes[0]->getInstanciatedObjectId();
fprintf(stderr, "Doing %d child nodes\n", (int)node_map.count(id));
new_child = create_instance_node(
@@ -678,7 +678,7 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node,
}
}
- // create_constraints(et,ob);
+ /* create_constraints(et,ob); */
}
for (std::vector<Object *>::iterator it = objects_done->begin(); it != objects_done->end();
@@ -686,7 +686,7 @@ std::vector<Object *> *DocumentImporter::write_node(COLLADAFW::Node *node,
ob = *it;
if (read_transform) {
- anim_importer.read_node_transform(node, ob); // overwrites location set earlier
+ anim_importer.read_node_transform(node, ob); /* overwrites location set earlier */
}
if (!is_joint) {
@@ -815,7 +815,7 @@ void DocumentImporter::write_profile_COMMON(COLLADAFW::EffectCommon *ef, Materia
/* following mapping still needs to be verified */
#if 0
- // needs rework to be done for 2.81
+ /* needs rework to be done for 2.81 */
matNode.set_shininess(ef->getShininess());
#endif
matNode.set_reflectivity(ef->getReflectivity());
@@ -1127,7 +1127,7 @@ bool DocumentImporter::writeLight(const COLLADAFW::Light *light)
switch (light->getLightType()) {
case COLLADAFW::Light::AMBIENT_LIGHT: {
- lamp->type = LA_SUN; // TODO needs more thoughts
+ lamp->type = LA_SUN; /* TODO needs more thoughts */
} break;
case COLLADAFW::Light::SPOT_LIGHT: {
lamp->type = LA_SPOT;
diff --git a/source/blender/io/collada/DocumentImporter.h b/source/blender/io/collada/DocumentImporter.h
index e382a44c3c2..a23e983940e 100644
--- a/source/blender/io/collada/DocumentImporter.h
+++ b/source/blender/io/collada/DocumentImporter.h
@@ -46,7 +46,7 @@ struct bContext;
/** Importer class. */
class DocumentImporter : COLLADAFW::IWriter {
public:
- //! Enumeration to denote the stage of import
+ /** Enumeration to denote the stage of import */
enum ImportStage {
Fetching_Scene_data, /* First pass to collect all data except controller */
Fetching_Controller_data, /* Second pass to collect controller data */
@@ -98,7 +98,8 @@ class DocumentImporter : COLLADAFW::IWriter {
bool writeAnimationList(const COLLADAFW::AnimationList *);
#if WITH_OPENCOLLADA_ANIMATION_CLIP
- // Please enable this when building with Collada 1.6.65 or newer (also in DocumentImporter.cpp)
+ /* Please enable this when building with Collada 1.6.65 or newer (also in DocumentImporter.cpp)
+ */
bool writeAnimationClip(const COLLADAFW::AnimationClip *animationClip);
#endif
@@ -160,7 +161,8 @@ class DocumentImporter : COLLADAFW::IWriter {
std::vector<Object *> libnode_ob;
std::map<COLLADAFW::UniqueId, COLLADAFW::Node *>
- root_map; // find root joint by child joint uid, for bone tree evaluation during resampling
+ root_map; /* find root joint by child joint uid, for bone tree evaluation during resampling
+ */
std::map<COLLADAFW::UniqueId, const COLLADAFW::Object *> FW_object_map;
std::string import_from_version;
diff --git a/source/blender/io/collada/EffectExporter.cpp b/source/blender/io/collada/EffectExporter.cpp
index 7f6d3cbdc6f..4108472d1df 100644
--- a/source/blender/io/collada/EffectExporter.cpp
+++ b/source/blender/io/collada/EffectExporter.cpp
@@ -65,7 +65,7 @@ bool EffectsExporter::hasEffects(Scene *sce)
for (a = 0; a < ob->totcol; a++) {
Material *ma = BKE_object_material_get(ob, a + 1);
- // no material, but check all of the slots
+ /* no material, but check all of the slots */
if (!ma) {
continue;
}
@@ -101,7 +101,7 @@ void EffectsExporter::set_transparency(COLLADASW::EffectProfile &ep, Material *m
{
double alpha = bc_get_alpha(ma);
if (alpha < 1) {
- // workaround use <transparent> to avoid wrong handling of <transparency> by other tools
+ /* workaround use <transparent> to avoid wrong handling of <transparency> by other tools */
COLLADASW::ColorOrTexture cot = bc_get_cot(0, 0, 0, alpha);
ep.setTransparent(cot, false, "alpha");
ep.setOpaque(COLLADASW::EffectProfile::A_ONE);
@@ -209,7 +209,7 @@ void EffectsExporter::operator()(Material *ma, Object *ob)
COLLADASW::EffectProfile ep(mSW);
ep.setProfileType(COLLADASW::EffectProfile::COMMON);
ep.openProfile();
- set_shader_type(ep, ma); // creates a Lambert Shader for now
+ set_shader_type(ep, ma); /* creates a Lambert Shader for now */
COLLADASW::ColorOrTexture cot;
@@ -234,7 +234,7 @@ void EffectsExporter::operator()(Material *ma, Object *ob)
MTex *t = ma->mtex[tex_indices[a]];
Image *ima = t->tex->ima;
- // Image not set for texture
+ /* Image not set for texture */
if (!ima) {
continue;
}
@@ -242,17 +242,17 @@ void EffectsExporter::operator()(Material *ma, Object *ob)
std::string key(id_name(ima));
key = translate_id(key);
- // create only one <sampler>/<surface> pair for each unique image
+ /* create only one <sampler>/<surface> pair for each unique image */
if (im_samp_map.find(key) == im_samp_map.end()) {
- //<newparam> <sampler> <source>
+ /* <newparam> <sampler> <source> */
COLLADASW::Sampler sampler(COLLADASW::Sampler::SAMPLER_TYPE_2D,
key + COLLADASW::Sampler::SAMPLER_SID_SUFFIX,
key + COLLADASW::Sampler::SURFACE_SID_SUFFIX);
sampler.setImageId(key);
- // copy values to arrays since they will live longer
+ /* copy values to arrays since they will live longer */
samplers[a] = sampler;
- // store pointers so they can be used later when we create <texture>s
+ /* store pointers so they can be used later when we create <texture>s */
samp_surf[b] = &samplers[a];
//samp_surf[b][1] = &surfaces[a];
@@ -274,12 +274,12 @@ void EffectsExporter::operator()(Material *ma, Object *ob)
int i = im_samp_map[key];
std::string uvname = strlen(t->uvname) ? t->uvname : active_uv;
COLLADASW::Sampler *sampler = (COLLADASW::Sampler *)
- samp_surf[i]; // possibly uninitialized memory ...
+ samp_surf[i]; /* possibly uninitialized memory ... */
writeTextures(ep, key, sampler, t, ima, uvname);
}
#endif
- // performs the actual writing
+ /* performs the actual writing */
ep.addProfileElements();
ep.addExtraTechniques(mSW);
diff --git a/source/blender/io/collada/ErrorHandler.h b/source/blender/io/collada/ErrorHandler.h
index 60253a08cda..1da17dbed42 100644
--- a/source/blender/io/collada/ErrorHandler.h
+++ b/source/blender/io/collada/ErrorHandler.h
@@ -20,7 +20,7 @@
#pragma once
-#include <algorithm> // sort()
+#include <algorithm> /* sort() */
#include <map>
#include <string>
#include <vector>
diff --git a/source/blender/io/collada/ExtraHandler.h b/source/blender/io/collada/ExtraHandler.h
index 8f98e1dec1b..4b13aaca2aa 100644
--- a/source/blender/io/collada/ExtraHandler.h
+++ b/source/blender/io/collada/ExtraHandler.h
@@ -20,7 +20,7 @@
#pragma once
-#include <algorithm> // sort()
+#include <algorithm> /* sort() */
#include <map>
#include <string>
#include <vector>
diff --git a/source/blender/io/collada/GeometryExporter.cpp b/source/blender/io/collada/GeometryExporter.cpp
index c7fcc51d42f..332390845c7 100644
--- a/source/blender/io/collada/GeometryExporter.cpp
+++ b/source/blender/io/collada/GeometryExporter.cpp
@@ -386,7 +386,7 @@ void GeometryExporter::create_mesh_primitive_list(short material_index,
COLLADASW::Input texcoord_input(
COLLADASW::InputSemantic::TEXCOORD,
makeUrl(makeTexcoordSourceId(geom_id, i, this->export_settings.get_active_uv_only())),
- 2, // this is only until we have optimized UV sets
+ 2, /* this is only until we have optimized UV sets */
(this->export_settings.get_active_uv_only()) ? 0 : layer_index - 1 /* set (0,1,2,...) */
);
til.push_back(texcoord_input);
@@ -401,8 +401,8 @@ void GeometryExporter::create_mesh_primitive_list(short material_index,
char *layer_name = bc_CustomData_get_layer_name(&me->ldata, CD_MLOOPCOL, a);
COLLADASW::Input input4(COLLADASW::InputSemantic::COLOR,
makeUrl(makeVertexColorSourceId(geom_id, layer_name)),
- (has_uvs) ? 3 : 2, // all color layers have same index order
- map_index // set number equals color map index
+ (has_uvs) ? 3 : 2, /* all color layers have same index order */
+ map_index /* set number equals color map index */
);
til.push_back(input4);
map_index++;
diff --git a/source/blender/io/collada/LightExporter.cpp b/source/blender/io/collada/LightExporter.cpp
index 463981ceefa..2f50a603ca3 100644
--- a/source/blender/io/collada/LightExporter.cpp
+++ b/source/blender/io/collada/LightExporter.cpp
@@ -76,7 +76,7 @@ void LightsExporter::operator()(Object *ob)
quadatt = 1.0f / (d * d);
}
- // sun
+ /* sun */
if (la->type == LA_SUN) {
COLLADASW::DirectionalLight cla(mSW, la_id, la_name);
cla.setColor(col, false, "color");
@@ -85,7 +85,7 @@ void LightsExporter::operator()(Object *ob)
addLight(cla);
}
- // spot
+ /* spot */
else if (la->type == LA_SPOT) {
COLLADASW::SpotLight cla(mSW, la_id, la_name);
cla.setColor(col, false, "color");
@@ -97,7 +97,7 @@ void LightsExporter::operator()(Object *ob)
exportBlenderProfile(cla, la);
addLight(cla);
}
- // lamp
+ /* lamp */
else if (la->type == LA_LOCAL) {
COLLADASW::PointLight cla(mSW, la_id, la_name);
cla.setColor(col, false, "color");
@@ -107,8 +107,8 @@ void LightsExporter::operator()(Object *ob)
exportBlenderProfile(cla, la);
addLight(cla);
}
- // area light is not supported
- // it will be exported as a local lamp
+ /* area light is not supported
+ * it will be exported as a local lamp */
else {
COLLADASW::PointLight cla(mSW, la_id, la_name);
cla.setColor(col, false, "color");
@@ -138,7 +138,7 @@ bool LightsExporter::exportBlenderProfile(COLLADASW::Light &cla, Light *la)
cla.addExtraTechniqueParameter("blender", "spotblend", la->spotblend);
cla.addExtraTechniqueParameter("blender", "att1", la->att1);
cla.addExtraTechniqueParameter("blender", "att2", la->att2);
- // \todo figure out how we can have falloff curve supported here
+ /* \todo figure out how we can have falloff curve supported here */
cla.addExtraTechniqueParameter("blender", "falloff_type", la->falloff_type);
cla.addExtraTechniqueParameter("blender", "clipsta", la->clipsta);
cla.addExtraTechniqueParameter("blender", "clipend", la->clipend);
diff --git a/source/blender/io/collada/MaterialExporter.cpp b/source/blender/io/collada/MaterialExporter.cpp
index 488d1833e48..72669e9d8d2 100644
--- a/source/blender/io/collada/MaterialExporter.cpp
+++ b/source/blender/io/collada/MaterialExporter.cpp
@@ -51,7 +51,7 @@ bool MaterialsExporter::hasMaterials(Scene *sce)
for (a = 0; a < ob->totcol; a++) {
Material *ma = BKE_object_material_get(ob, a + 1);
- // no material, but check all of the slots
+ /* no material, but check all of the slots */
if (!ma) {
continue;
}
diff --git a/source/blender/io/collada/MaterialExporter.h b/source/blender/io/collada/MaterialExporter.h
index 7d40347097c..c684e96be19 100644
--- a/source/blender/io/collada/MaterialExporter.h
+++ b/source/blender/io/collada/MaterialExporter.h
@@ -51,7 +51,7 @@ class MaterialsExporter : COLLADASW::LibraryMaterials {
// used in forEachMaterialInScene
template<class Functor> class ForEachMaterialFunctor {
std::vector<std::string>
- mMat; // contains list of material names, to avoid duplicate calling of f
+ mMat; /* contains list of material names, to avoid duplicate calling of f */
Functor *f;
public:
@@ -81,8 +81,8 @@ template<class Functor> class ForEachMaterialFunctor {
};
struct MaterialFunctor {
- // calls f for each unique material linked to each object in sce
- // f should have
+ /* calls f for each unique material linked to each object in sce
+ * f should have */
// void operator()(Material *ma)
template<class Functor>
void forEachMaterialInExportSet(Scene *sce, Functor &f, LinkNode *export_set)
diff --git a/source/blender/io/collada/Materials.cpp b/source/blender/io/collada/Materials.cpp
index 1e02e151d97..a97b7dfcfd6 100644
--- a/source/blender/io/collada/Materials.cpp
+++ b/source/blender/io/collada/Materials.cpp
@@ -53,7 +53,7 @@ MaterialNode::MaterialNode(bContext *C,
add_link(ntree, nmap["transparent"], 0, nmap["mix"], 2);
add_link(ntree, nmap["mix"], 0, nmap["out"], 0);
- // experimental, probably not used.
+ /* experimental, probably not used. */
make_group(C, ntree, nmap);
#else
shader_node = add_node(SH_NODE_BSDF_PRINCIPLED, 0, 300, "");
@@ -66,24 +66,24 @@ void MaterialNode::setShaderType()
{
#if 0
COLLADAFW::EffectCommon::ShaderType shader = ef->getShaderType();
- // Currently we only support PBR based shaders
- // TODO: simulate the effects with PBR
+ /* Currently we only support PBR based shaders */
+ /* TODO: simulate the effects with PBR */
- // blinn
+ /* blinn */
if (shader == COLLADAFW::EffectCommon::SHADER_BLINN) {
ma->spec_shader = MA_SPEC_BLINN;
ma->spec = ef->getShininess().getFloatValue();
}
- // phong
+ /* phong */
else if (shader == COLLADAFW::EffectCommon::SHADER_PHONG) {
ma->spec_shader = MA_SPEC_PHONG;
ma->har = ef->getShininess().getFloatValue();
}
- // lambert
+ /* lambert */
else if (shader == COLLADAFW::EffectCommon::SHADER_LAMBERT) {
ma->diff_shader = MA_DIFF_LAMBERT;
}
- // default - lambert
+ /* default - lambert */
else {
ma->diff_shader = MA_DIFF_LAMBERT;
fprintf(stderr, "Current shader type is not supported, default to lambert.\n");
@@ -91,7 +91,7 @@ void MaterialNode::setShaderType()
#endif
}
-// returns null if material already has a node tree
+/* returns null if material already has a node tree */
bNodeTree *MaterialNode::prepare_material_nodetree()
{
if (material->nodetree) {
@@ -139,7 +139,7 @@ void MaterialNode::set_reflectivity(COLLADAFW::FloatOrParam &val)
}
#if 0
-// needs rework to be done for 2.81
+/* needs rework to be done for 2.81 */
void MaterialNode::set_shininess(COLLADAFW::FloatOrParam &val)
{
float roughness = val.getFloatValue();
@@ -177,7 +177,7 @@ void MaterialNode::set_alpha(COLLADAFW::EffectCommon::OpaqueMode mode,
}
if (cot.isColor() || !cot.isValid()) {
- // transparent_cot is either a color or not defined
+ /* transparent_cot is either a color or not defined */
float transparent_alpha;
if (cot.isValid()) {
@@ -185,14 +185,14 @@ void MaterialNode::set_alpha(COLLADAFW::EffectCommon::OpaqueMode mode,
transparent_alpha = col.getAlpha();
}
else {
- // no transparent color defined
+ /* no transparent color defined */
transparent_alpha = 1;
}
float transparency_alpha = val.getFloatValue();
if (transparency_alpha < 0) {
- // transparency is not defined
- transparency_alpha = 1; // set to opaque
+ /* transparency is not defined */
+ transparency_alpha = 1; /* set to opaque */
}
float alpha = transparent_alpha * transparency_alpha;
@@ -279,12 +279,12 @@ void MaterialNode::set_ambient(COLLADAFW::ColorOrTexture &cot)
COLLADAFW::Color col = cot.getColor();
bNode *node = add_node(SH_NODE_RGB, -300, locy, "Ambient");
set_color(node, col);
- // TODO: Connect node
+ /* TODO: Connect node */
}
- // texture
+ /* texture */
else if (cot.isTexture()) {
add_texture_node(cot, -300, locy, "Ambient");
- // TODO: Connect node
+ /* TODO: Connect node */
}
}
@@ -295,12 +295,12 @@ void MaterialNode::set_reflective(COLLADAFW::ColorOrTexture &cot)
COLLADAFW::Color col = cot.getColor();
bNode *node = add_node(SH_NODE_RGB, -300, locy, "Reflective");
set_color(node, col);
- // TODO: Connect node
+ /* TODO: Connect node */
}
- // texture
+ /* texture */
else if (cot.isTexture()) {
add_texture_node(cot, -300, locy, "Reflective");
- // TODO: Connect node
+ /* TODO: Connect node */
}
}
@@ -343,16 +343,16 @@ void MaterialNode::set_opacity(COLLADAFW::ColorOrTexture &cot)
float alpha = effect->getTransparency().getFloatValue();
if (col.isValid()) {
- alpha *= col.getAlpha(); // Assuming A_ONE opaque mode
+ alpha *= col.getAlpha(); /* Assuming A_ONE opaque mode */
}
bNodeSocket *socket = nodeFindSocket(shader_node, SOCK_IN, "Alpha");
((bNodeSocketValueFloat *)socket->default_value)->value = alpha;
}
- // texture
+ /* texture */
else if (cot.isTexture()) {
add_texture_node(cot, -300, locy, "Alpha");
- // TODO: Connect node
+ /* TODO: Connect node */
}
}
@@ -363,12 +363,12 @@ void MaterialNode::set_specular(COLLADAFW::ColorOrTexture &cot)
COLLADAFW::Color col = cot.getColor();
bNode *node = add_node(SH_NODE_RGB, -300, locy, "Specular");
set_color(node, col);
- // TODO: Connect node
+ /* TODO: Connect node */
}
- // texture
+ /* texture */
else if (cot.isTexture()) {
add_texture_node(cot, -300, locy, "Specular");
- // TODO: Connect node
+ /* TODO: Connect node */
}
}
diff --git a/source/blender/io/collada/MeshImporter.cpp b/source/blender/io/collada/MeshImporter.cpp
index 3d9c4d3ad6f..b0e3270a899 100644
--- a/source/blender/io/collada/MeshImporter.cpp
+++ b/source/blender/io/collada/MeshImporter.cpp
@@ -47,7 +47,7 @@
#include "MeshImporter.h"
#include "collada_utils.h"
-// get node name, or fall back to original id if not present (name is optional)
+/* get node name, or fall back to original id if not present (name is optional) */
template<class T> static std::string bc_get_dae_name(T *node)
{
return node->getName().empty() ? node->getOriginalId() : node->getName();
@@ -170,7 +170,7 @@ void VCOLDataWrapper::get_vcol(int v_index, MLoopCol *mloopcol)
case COLLADAFW::MeshVertexData::DATA_TYPE_FLOAT: {
COLLADAFW::ArrayPrimitiveType<float> *values = mVData->getFloatValues();
if (values->empty() || values->getCount() <= (v_index * stride + 2)) {
- return; // xxx need to create an error instead
+ return; /* xxx need to create an error instead */
}
mloopcol->r = unit_float_to_uchar_clamp((*values)[v_index * stride]);
@@ -181,7 +181,7 @@ void VCOLDataWrapper::get_vcol(int v_index, MLoopCol *mloopcol)
case COLLADAFW::MeshVertexData::DATA_TYPE_DOUBLE: {
COLLADAFW::ArrayPrimitiveType<double> *values = mVData->getDoubleValues();
if (values->empty() || values->getCount() <= (v_index * stride + 2)) {
- return; // xxx need to create an error instead
+ return; /* xxx need to create an error instead */
}
mloopcol->r = unit_float_to_uchar_clamp((*values)[v_index * stride]);
@@ -216,7 +216,7 @@ bool MeshImporter::set_poly_indices(
if (!broken_loop) {
for (int i = 0; i < index; i++) {
if (indices[i] == indices[index]) {
- // duplicate index -> not good
+ /* duplicate index -> not good */
broken_loop = true;
}
}
@@ -247,7 +247,7 @@ void MeshImporter::set_face_uv(MLoopUV *mloopuv,
COLLADAFW::IndexList &index_list,
int count)
{
- // per face vertex indices, this means for quad we have 4 indices, not 8
+ /* per face vertex indices, this means for quad we have 4 indices, not 8 */
COLLADAFW::UIntValuesArray &indices = index_list.getIndices();
for (int index = 0; index < count; index++) {
@@ -281,7 +281,7 @@ bool MeshImporter::is_nice_mesh(COLLADAFW::Mesh *mesh)
const char *type_str = bc_primTypeToStr(type);
- // OpenCollada passes POLYGONS type for <polylist>
+ /* OpenCollada passes POLYGONS type for <polylist> */
if (type == COLLADAFW::MeshPrimitive::POLYLIST || type == COLLADAFW::MeshPrimitive::POLYGONS) {
COLLADAFW::Polygons *mpvc = (COLLADAFW::Polygons *)mp;
@@ -319,7 +319,7 @@ bool MeshImporter::is_nice_mesh(COLLADAFW::Mesh *mesh)
}
else if (type == COLLADAFW::MeshPrimitive::LINES) {
- // TODO: Add Checker for line syntax here
+ /* TODO: Add Checker for line syntax here */
}
else if (type != COLLADAFW::MeshPrimitive::TRIANGLES &&
@@ -334,7 +334,7 @@ bool MeshImporter::is_nice_mesh(COLLADAFW::Mesh *mesh)
void MeshImporter::read_vertices(COLLADAFW::Mesh *mesh, Mesh *me)
{
- // vertices
+ /* vertices */
COLLADAFW::MeshVertexData &pos = mesh->getPositions();
if (pos.empty()) {
return;
@@ -356,12 +356,12 @@ void MeshImporter::read_vertices(COLLADAFW::Mesh *mesh, Mesh *me)
}
}
-// =====================================================================
-// condition 1: The Primitive has normals
-// condition 2: The number of normals equals the number of faces.
-// return true if both conditions apply.
-// return false otherwise.
-// =====================================================================
+/* =====================================================================
+ * condition 1: The Primitive has normals
+ * condition 2: The number of normals equals the number of faces.
+ * return true if both conditions apply.
+ * return false otherwise.
+ * ===================================================================== */
bool MeshImporter::primitive_has_useable_normals(COLLADAFW::MeshPrimitive *mp)
{
@@ -385,10 +385,10 @@ bool MeshImporter::primitive_has_useable_normals(COLLADAFW::MeshPrimitive *mp)
return has_useable_normals;
}
-// =====================================================================
-// Assume that only TRIANGLES, TRIANGLE_FANS, POLYLIST and POLYGONS
-// have faces. (to be verified)
-// =====================================================================
+/* =====================================================================
+ * Assume that only TRIANGLES, TRIANGLE_FANS, POLYLIST and POLYGONS
+ * have faces. (to be verified)
+ * ===================================================================== */
bool MeshImporter::primitive_has_faces(COLLADAFW::MeshPrimitive *mp)
{
@@ -420,19 +420,19 @@ static std::string extract_vcolname(const COLLADAFW::String &collada_id)
return colname;
}
-// =================================================================
-// Return the number of faces by summing up
-// the facecounts of the parts.
-// hint: This is done because mesh->getFacesCount() does
-// count loose edges as extra faces, which is not what we want here.
-// =================================================================
+/* =================================================================
+ * Return the number of faces by summing up
+ * the facecounts of the parts.
+ * hint: This is done because mesh->getFacesCount() does
+ * count loose edges as extra faces, which is not what we want here.
+ * ================================================================= */
void MeshImporter::allocate_poly_data(COLLADAFW::Mesh *collada_mesh, Mesh *me)
{
COLLADAFW::MeshPrimitiveArray &prim_arr = collada_mesh->getMeshPrimitives();
int total_poly_count = 0;
int total_loop_count = 0;
- // collect edge_count and face_count from all parts
+ /* collect edge_count and face_count from all parts */
for (int i = 0; i < prim_arr.getCount(); i++) {
COLLADAFW::MeshPrimitive *mp = prim_arr[i];
int type = mp->getPrimitiveType();
@@ -452,7 +452,7 @@ void MeshImporter::allocate_poly_data(COLLADAFW::Mesh *collada_mesh, Mesh *me)
total_poly_count++;
}
else {
- // TODO: this is a hole and not another polygon!
+ /* TODO: this is a hole and not another polygon! */
}
}
@@ -465,7 +465,7 @@ void MeshImporter::allocate_poly_data(COLLADAFW::Mesh *collada_mesh, Mesh *me)
}
}
- // Add the data containers
+ /* Add the data containers */
if (total_poly_count > 0) {
me->totpoly = total_poly_count;
me->totloop = total_loop_count;
@@ -485,11 +485,11 @@ void MeshImporter::allocate_poly_data(COLLADAFW::Mesh *collada_mesh, Mesh *me)
COLLADAFW::MeshVertexData::InputInfos *info =
collada_mesh->getUVCoords().getInputInfosArray()[i];
COLLADAFW::String &uvname = info->mName;
- // Allocate space for UV_data
+ /* Allocate space for UV_data */
CustomData_add_layer_named(
&me->ldata, CD_MLOOPUV, CD_DEFAULT, NULL, me->totloop, uvname.c_str());
}
- // activate the first uv map
+ /* activate the first uv map */
me->mloopuv = (MLoopUV *)CustomData_get_layer_n(&me->ldata, CD_MLOOPUV, 0);
}
@@ -535,7 +535,7 @@ unsigned int MeshImporter::get_loose_edge_count(COLLADAFW::Mesh *mesh)
COLLADAFW::MeshPrimitiveArray &prim_arr = mesh->getMeshPrimitives();
int loose_edge_count = 0;
- // collect edge_count and face_count from all parts
+ /* collect edge_count and face_count from all parts */
for (int i = 0; i < prim_arr.getCount(); i++) {
COLLADAFW::MeshPrimitive *mp = prim_arr[i];
int type = mp->getPrimitiveType();
@@ -552,13 +552,13 @@ unsigned int MeshImporter::get_loose_edge_count(COLLADAFW::Mesh *mesh)
return loose_edge_count;
}
-// =================================================================
-// This function is copied from source/blender/editors/mesh/mesh_data.c
-//
-// TODO: (As discussed with sergey-) :
-// Maybe move this function to blenderkernel/intern/mesh.c
-// and add definition to BKE_mesh.c
-// =================================================================
+/* =================================================================
+ * This function is copied from source/blender/editors/mesh/mesh_data.c
+ *
+ * TODO: (As discussed with sergey-) :
+ * Maybe move this function to blenderkernel/intern/mesh.c
+ * and add definition to BKE_mesh.c
+ * ================================================================= */
void MeshImporter::mesh_add_edges(Mesh *mesh, int len)
{
CustomData edata;
@@ -592,12 +592,12 @@ void MeshImporter::mesh_add_edges(Mesh *mesh, int len)
mesh->totedge = totedge;
}
-// =================================================================
-// Read all loose edges.
-// Important: This function assumes that all edges from existing
-// faces have already been generated and added to me->medge
-// So this function MUST be called after read_faces() (see below)
-// =================================================================
+/* =================================================================
+ * Read all loose edges.
+ * Important: This function assumes that all edges from existing
+ * faces have already been generated and added to me->medge
+ * So this function MUST be called after read_faces() (see below)
+ * ================================================================= */
void MeshImporter::read_lines(COLLADAFW::Mesh *mesh, Mesh *me)
{
unsigned int loose_edge_count = get_loose_edge_count(mesh);
@@ -631,13 +631,13 @@ void MeshImporter::read_lines(COLLADAFW::Mesh *mesh, Mesh *me)
}
}
-// =======================================================================
-// Read all faces from TRIANGLES, TRIANGLE_FANS, POLYLIST, POLYGON
-// Important: This function MUST be called before read_lines()
-// Otherwise we will loose all edges from faces (see read_lines() above)
-//
-// TODO: import uv set names
-// ========================================================================
+/* =======================================================================
+ * Read all faces from TRIANGLES, TRIANGLE_FANS, POLYLIST, POLYGON
+ * Important: This function MUST be called before read_lines()
+ * Otherwise we will loose all edges from faces (see read_lines() above)
+ *
+ * TODO: import uv set names
+ * ======================================================================== */
void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, Mesh *me)
{
unsigned int i;
@@ -660,7 +660,7 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, Mesh *me)
COLLADAFW::MeshPrimitive *mp = prim_arr[i];
- // faces
+ /* faces */
size_t prim_totpoly = mp->getFaceCount();
unsigned int *position_indices = mp->getPositionIndices().getData();
unsigned int *normal_indices = mp->getNormalIndices().getData();
@@ -670,28 +670,28 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, Mesh *me)
int collada_meshtype = mp->getPrimitiveType();
- // since we cannot set mpoly->mat_nr here, we store a portion of me->mpoly in Primitive
+ /* since we cannot set mpoly->mat_nr here, we store a portion of me->mpoly in Primitive */
Primitive prim = {mpoly, 0};
- // If MeshPrimitive is TRIANGLE_FANS we split it into triangles
- // The first trifan vertex will be the first vertex in every triangle
- // XXX The proper function of TRIANGLE_FANS is not tested!!!
- // XXX In particular the handling of the normal_indices looks very wrong to me
+ /* If MeshPrimitive is TRIANGLE_FANS we split it into triangles
+ * The first trifan vertex will be the first vertex in every triangle
+ * XXX The proper function of TRIANGLE_FANS is not tested!!!
+ * XXX In particular the handling of the normal_indices looks very wrong to me */
if (collada_meshtype == COLLADAFW::MeshPrimitive::TRIANGLE_FANS) {
unsigned int grouped_vertex_count = mp->getGroupedVertexElementsCount();
for (unsigned int group_index = 0; group_index < grouped_vertex_count; group_index++) {
- unsigned int first_vertex = position_indices[0]; // Store first trifan vertex
- unsigned int first_normal = normal_indices[0]; // Store first trifan vertex normal
+ unsigned int first_vertex = position_indices[0]; /* Store first trifan vertex */
+ unsigned int first_normal = normal_indices[0]; /* Store first trifan vertex normal */
unsigned int vertex_count = mp->getGroupedVerticesVertexCount(group_index);
for (unsigned int vertex_index = 0; vertex_index < vertex_count - 2; vertex_index++) {
- // For each triangle store indices of its 3 vertices
+ /* For each triangle store indices of its 3 vertices */
unsigned int triangle_vertex_indices[3] = {
first_vertex, position_indices[1], position_indices[2]};
set_poly_indices(mpoly, mloop, loop_index, triangle_vertex_indices, 3);
- if (mp_has_normals) { // vertex normals, same implementation as for the triangles
- // the same for vertces normals
+ if (mp_has_normals) { /* vertex normals, same implementation as for the triangles */
+ /* the same for vertces normals */
unsigned int vertex_normal_indices[3] = {
first_normal, normal_indices[1], normal_indices[2]};
if (!is_flat_face(vertex_normal_indices, nor, 3)) {
@@ -706,7 +706,7 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, Mesh *me)
prim.totpoly++;
}
- // Moving cursor to the next triangle fan.
+ /* Moving cursor to the next triangle fan. */
if (mp_has_normals) {
normal_indices += 2;
}
@@ -727,10 +727,10 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, Mesh *me)
int invalid_loop_holes = 0;
for (unsigned int j = 0; j < prim_totpoly; j++) {
- // Vertices in polygon:
+ /* Vertices in polygon: */
int vcount = get_vertex_count(mpvc, j);
if (vcount < 0) {
- continue; // TODO: add support for holes
+ continue; /* TODO: add support for holes */
}
bool broken_loop = set_poly_indices(mpoly, mloop, loop_index, position_indices, vcount);
@@ -740,7 +740,7 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, Mesh *me)
for (unsigned int uvset_index = 0; uvset_index < index_list_array_uvcoord.getCount();
uvset_index++) {
- // get mtface by face index and uv set index
+ /* get mtface by face index and uv set index */
COLLADAFW::IndexList &index_list = *index_list_array_uvcoord[uvset_index];
MLoopUV *mloopuv = (MLoopUV *)CustomData_get_layer_named(
&me->ldata, CD_MLOOPUV, index_list.getName().c_str());
@@ -808,7 +808,7 @@ void MeshImporter::read_polys(COLLADAFW::Mesh *collada_mesh, Mesh *me)
}
else if (collada_meshtype == COLLADAFW::MeshPrimitive::LINES) {
- continue; // read the lines later after all the rest is done
+ continue; /* read the lines later after all the rest is done */
}
if (mp_has_faces) {
@@ -915,21 +915,21 @@ std::string *MeshImporter::get_geometry_name(const std::string &mesh_name)
static bool bc_has_same_material_configuration(Object *ob1, Object *ob2)
{
if (ob1->totcol != ob2->totcol) {
- return false; // not same number of materials
+ return false; /* not same number of materials */
}
if (ob1->totcol == 0) {
- return false; // no material at all
+ return false; /* no material at all */
}
for (int index = 0; index < ob1->totcol; index++) {
if (ob1->matbits[index] != ob2->matbits[index]) {
- return false; // shouldn't happen
+ return false; /* shouldn't happen */
}
if (ob1->matbits[index] == 0) {
- return false; // shouldn't happen
+ return false; /* shouldn't happen */
}
if (ob1->mat[index] != ob2->mat[index]) {
- return false; // different material assignment
+ return false; /* different material assignment */
}
}
return true;
@@ -1055,28 +1055,28 @@ void MeshImporter::assign_material_to_geom(
{
const COLLADAFW::UniqueId &ma_uid = cmaterial.getReferencedMaterial();
- // do we know this material?
+ /* do we know this material? */
if (uid_material_map.find(ma_uid) == uid_material_map.end()) {
fprintf(stderr, "Cannot find material by UID.\n");
return;
}
- // first time we get geom_uid, ma_uid pair. Save for later check.
+ /* first time we get geom_uid, ma_uid pair. Save for later check. */
materials_mapped_to_geom.insert(
std::pair<COLLADAFW::UniqueId, COLLADAFW::UniqueId>(*geom_uid, ma_uid));
Material *ma = uid_material_map[ma_uid];
- // Attention! This temporarily assigns material to object on purpose!
- // See note above.
+ /* Attention! This temporarily assigns material to object on purpose!
+ * See note above. */
ob->actcol = 0;
BKE_object_material_assign(m_bmain, ob, ma, mat_index + 1, BKE_MAT_ASSIGN_OBJECT);
MaterialIdPrimitiveArrayMap &mat_prim_map = geom_uid_mat_mapping_map[*geom_uid];
COLLADAFW::MaterialId mat_id = cmaterial.getMaterialId();
- // assign material indices to mesh faces
+ /* assign material indices to mesh faces */
if (mat_prim_map.find(mat_id) != mat_prim_map.end()) {
std::vector<Primitive> &prims = mat_prim_map[mat_id];
@@ -1102,7 +1102,7 @@ Object *MeshImporter::create_mesh_object(
{
const COLLADAFW::UniqueId *geom_uid = &geom->getInstanciatedObjectId();
- // check if node instantiates controller or geometry
+ /* check if node instantiates controller or geometry */
if (isController) {
geom_uid = armature_importer->get_geometry_uid(*geom_uid);
@@ -1115,8 +1115,8 @@ Object *MeshImporter::create_mesh_object(
else {
if (uid_mesh_map.find(*geom_uid) == uid_mesh_map.end()) {
- // this could happen if a mesh was not created
- // (e.g. if it contains unsupported geometry)
+ /* this could happen if a mesh was not created
+ * (e.g. if it contains unsupported geometry) */
fprintf(stderr, "Couldn't find a mesh by UID.\n");
return NULL;
}
@@ -1125,19 +1125,19 @@ Object *MeshImporter::create_mesh_object(
return NULL;
}
- // name Object
+ /* name Object */
const std::string &id = node->getName().empty() ? node->getOriginalId() : node->getName();
const char *name = (id.length()) ? id.c_str() : NULL;
- // add object
+ /* add object */
Object *ob = bc_add_object(m_bmain, scene, view_layer, OB_MESH, name);
- bc_set_mark(ob); // used later for material assignment optimization
+ bc_set_mark(ob); /* used later for material assignment optimization */
- // store object pointer for ArmatureImporter
+ /* store object pointer for ArmatureImporter */
uid_object_map[*geom_uid] = ob;
imported_objects.push_back(ob);
- // replace ob->data freeing the old one
+ /* replace ob->data freeing the old one */
Mesh *old_mesh = (Mesh *)ob->data;
Mesh *new_mesh = uid_mesh_map[*geom_uid];
@@ -1151,7 +1151,7 @@ Object *MeshImporter::create_mesh_object(
COLLADAFW::MaterialBindingArray &mat_array = geom->getMaterialBindings();
- // loop through geom's materials
+ /* loop through geom's materials */
for (unsigned int i = 0; i < mat_array.getCount(); i++) {
if (mat_array[i].getReferencedMaterial().isValid()) {
@@ -1162,18 +1162,18 @@ Object *MeshImporter::create_mesh_object(
}
}
- // clean up the mesh
+ /* clean up the mesh */
BKE_mesh_validate((Mesh *)ob->data, false, false);
return ob;
}
-// create a mesh storing a pointer in a map so it can be retrieved later by geometry UID
+/* create a mesh storing a pointer in a map so it can be retrieved later by geometry UID */
bool MeshImporter::write_geometry(const COLLADAFW::Geometry *geom)
{
if (geom->getType() != COLLADAFW::Geometry::GEO_TYPE_MESH) {
- // TODO: report warning
+ /* TODO: report warning */
fprintf(stderr, "Mesh type %s is not supported\n", bc_geomTypeToStr(geom->getType()));
return true;
}
@@ -1188,18 +1188,18 @@ bool MeshImporter::write_geometry(const COLLADAFW::Geometry *geom)
const std::string &str_geom_id = mesh->getName().empty() ? mesh->getOriginalId() :
mesh->getName();
Mesh *me = BKE_mesh_add(m_bmain, (char *)str_geom_id.c_str());
- id_us_min(&me->id); // is already 1 here, but will be set later in BKE_mesh_assign_object
+ id_us_min(&me->id); /* is already 1 here, but will be set later in BKE_mesh_assign_object */
- // store the Mesh pointer to link it later with an Object
- // mesh_geom_map needed to map mesh to its geometry name (for shape key naming)
+ /* store the Mesh pointer to link it later with an Object
+ * mesh_geom_map needed to map mesh to its geometry name (for shape key naming) */
this->uid_mesh_map[mesh->getUniqueId()] = me;
this->mesh_geom_map[std::string(me->id.name)] = str_geom_id;
read_vertices(mesh, me);
read_polys(mesh, me);
BKE_mesh_calc_edges(me, false, false);
- // read_lines() must be called after the face edges have been generated.
- // Otherwise the loose edges will be silently deleted again.
+ /* read_lines() must be called after the face edges have been generated.
+ * Otherwise the loose edges will be silently deleted again. */
read_lines(mesh, me);
return true;
diff --git a/source/blender/io/collada/SkinInfo.h b/source/blender/io/collada/SkinInfo.h
index 3b94e403b6d..7ce66b22a5f 100644
--- a/source/blender/io/collada/SkinInfo.h
+++ b/source/blender/io/collada/SkinInfo.h
@@ -35,28 +35,28 @@
#include "TransformReader.h"
#include "collada_internal.h"
-// This is used to store data passed in write_controller_data.
-// Arrays from COLLADAFW::SkinControllerData lose ownership, so do this class members
-// so that arrays don't get freed until we free them explicitly.
+/* This is used to store data passed in write_controller_data.
+ * Arrays from COLLADAFW::SkinControllerData lose ownership, so do this class members
+ * so that arrays don't get freed until we free them explicitly. */
class SkinInfo {
private:
- // to build armature bones from inverse bind matrices
+ /* to build armature bones from inverse bind matrices */
struct JointData {
- float inv_bind_mat[4][4]; // joint inverse bind matrix
- COLLADAFW::UniqueId joint_uid; // joint node UID
- // Object *ob_arm; // armature object
+ float inv_bind_mat[4][4]; /* joint inverse bind matrix */
+ COLLADAFW::UniqueId joint_uid; /* joint node UID */
+ // Object *ob_arm; /* armature object */
};
float bind_shape_matrix[4][4];
- // data from COLLADAFW::SkinControllerData, each array should be freed
+ /* data from COLLADAFW::SkinControllerData, each array should be freed */
COLLADAFW::UIntValuesArray joints_per_vertex;
COLLADAFW::UIntValuesArray weight_indices;
COLLADAFW::IntValuesArray joint_indices;
- // COLLADAFW::FloatOrDoubleArray weights;
+ /* COLLADAFW::FloatOrDoubleArray weights; */
std::vector<float> weights;
- std::vector<JointData> joint_data; // index to this vector is joint index
+ std::vector<JointData> joint_data; /* index to this vector is joint index */
UnitConverter *unit_converter;
@@ -69,10 +69,10 @@ class SkinInfo {
SkinInfo(const SkinInfo &skin);
SkinInfo(UnitConverter *conv);
- // nobody owns the data after this, so it should be freed manually with releaseMemory
+ /* nobody owns the data after this, so it should be freed manually with releaseMemory */
template<typename T> void transfer_array_data(T &src, T &dest);
- // when src is const we cannot src.yieldOwnerShip, this is used by copy constructor
+ /* when src is const we cannot src.yieldOwnerShip, this is used by copy constructor */
void transfer_int_array_data_const(const COLLADAFW::IntValuesArray &src,
COLLADAFW::IntValuesArray &dest);
@@ -83,14 +83,14 @@ class SkinInfo {
void free();
- // using inverse bind matrices to construct armature
- // it is safe to invert them to get the original matrices
- // because if they are inverse matrices, they can be inverted
+ /* using inverse bind matrices to construct armature
+ * it is safe to invert them to get the original matrices
+ * because if they are inverse matrices, they can be inverted */
void add_joint(const COLLADABU::Math::Matrix4 &matrix);
void set_controller(const COLLADAFW::SkinController *co);
- // called from write_controller
+ /* called from write_controller */
Object *create_armature(Main *bmain, Scene *scene, ViewLayer *view_layer);
Object *set_armature(Object *ob_arm);
@@ -101,11 +101,11 @@ class SkinInfo {
const COLLADAFW::UniqueId &get_controller_uid();
- // check if this skin controller references a joint or any descendant of it
- //
- // some nodes may not be referenced by SkinController,
- // in this case to determine if the node belongs to this armature,
- // we need to search down the tree
+ /* check if this skin controller references a joint or any descendant of it
+ *
+ * some nodes may not be referenced by SkinController,
+ * in this case to determine if the node belongs to this armature,
+ * we need to search down the tree */
bool uses_joint_or_descendant(COLLADAFW::Node *node);
void link_armature(bContext *C,
diff --git a/source/blender/io/collada/TransformReader.cpp b/source/blender/io/collada/TransformReader.cpp
index 87b8763fb6a..393393be65b 100644
--- a/source/blender/io/collada/TransformReader.cpp
+++ b/source/blender/io/collada/TransformReader.cpp
@@ -54,9 +54,9 @@ void TransformReader::get_node_mat(float mat[4][4],
switch (type) {
case COLLADAFW::Transformation::MATRIX:
- // When matrix AND Trans/Rot/Scale are defined for a node,
- // then this is considered as redundant information.
- // So if we find a Matrix we use that and return.
+ /* When matrix AND Trans/Rot/Scale are defined for a node,
+ * then this is considered as redundant information.
+ * So if we find a Matrix we use that and return. */
dae_matrix_to_mat4(tm, mat);
if (parent_mat) {
mul_m4_m4m4(mat, parent_mat, mat);
@@ -83,10 +83,10 @@ void TransformReader::get_node_mat(float mat[4][4],
mul_m4_m4m4(mat, copy, cur);
if (animation_map) {
- // AnimationList that drives this Transformation
+ /* AnimationList that drives this Transformation */
const COLLADAFW::UniqueId &anim_list_id = tm->getAnimationList();
- // store this so later we can link animation data with ob
+ /* store this so later we can link animation data with ob */
Animation anim = {ob, node, tm};
(*animation_map)[anim_list_id] = anim;
}
diff --git a/source/blender/io/collada/TransformReader.h b/source/blender/io/collada/TransformReader.h
index f8a73ce3912..9b87f56699e 100644
--- a/source/blender/io/collada/TransformReader.h
+++ b/source/blender/io/collada/TransformReader.h
@@ -44,7 +44,7 @@ class TransformReader {
struct Animation {
Object *ob;
COLLADAFW::Node *node;
- COLLADAFW::Transformation *tm; // which transform is animated by an AnimationList->id
+ COLLADAFW::Transformation *tm; /* which transform is animated by an AnimationList->id */
};
TransformReader(UnitConverter *conv);
diff --git a/source/blender/io/collada/collada_internal.cpp b/source/blender/io/collada/collada_internal.cpp
index 66810685979..091bd2cd7c2 100644
--- a/source/blender/io/collada/collada_internal.cpp
+++ b/source/blender/io/collada/collada_internal.cpp
@@ -71,12 +71,12 @@ void UnitConverter::convertVector3(COLLADABU::Math::Vector3 &vec, float *v)
v[2] = vec.z;
}
-// TODO need also for angle conversion, time conversion...
+/* TODO need also for angle conversion, time conversion... */
void UnitConverter::dae_matrix_to_mat4_(float out[4][4], const COLLADABU::Math::Matrix4 &in)
{
- // in DAE, matrices use columns vectors, (see comments in COLLADABUMathMatrix4.h)
- // so here, to make a blender matrix, we swap columns and rows
+ /* in DAE, matrices use columns vectors, (see comments in COLLADABUMathMatrix4.h)
+ * so here, to make a blender matrix, we swap columns and rows. */
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
out[i][j] = in[j][i];
@@ -138,7 +138,7 @@ void UnitConverter::calculate_scale(Scene &sce)
switch (type) {
case USER_UNIT_NONE:
- bl_scale = 1.0; // map 1 Blender unit to 1 Meter
+ bl_scale = 1.0; /* map 1 Blender unit to 1 Meter. */
break;
case USER_UNIT_METRIC:
@@ -147,8 +147,8 @@ void UnitConverter::calculate_scale(Scene &sce)
default:
bl_scale = RNA_property_float_get(&unit_settings, scale_ptr);
- // it looks like the conversion to Imperial is done implicitly.
- // So nothing to do here.
+ /* It looks like the conversion to Imperial is done implicitly.
+ * So nothing to do here. */
break;
}
@@ -231,9 +231,9 @@ std::string translate_id(const std::string &id)
for (unsigned int i = 1; i < id_translated.size(); i++) {
id_translated[i] = translate_name_map[(unsigned int)id_translated[i]];
}
- // It's so much workload now, the if () should speed up things.
+ /* It's so much workload now, the if () should speed up things. */
if (id_translated != id) {
- // Search duplicates
+ /* Search duplicates. */
map_string_list::iterator iter = global_id_map.find(id_translated);
if (iter != global_id_map.end()) {
unsigned int i = 0;
diff --git a/source/blender/io/collada/collada_internal.h b/source/blender/io/collada/collada_internal.h
index de4e1d7e0d4..1d2ed11bfe6 100644
--- a/source/blender/io/collada/collada_internal.h
+++ b/source/blender/io/collada/collada_internal.h
@@ -51,7 +51,7 @@ class UnitConverter {
Imperial,
};
- // Initialize with Z_UP, since Blender uses right-handed, z-up
+ /* Initialize with Z_UP, since Blender uses right-handed, z-up */
UnitConverter();
void read_asset(const COLLADAFW::FileInfo *asset);
@@ -62,7 +62,7 @@ class UnitConverter {
float getLinearMeter(void);
- // TODO need also for angle conversion, time conversion...
+ /* TODO need also for angle conversion, time conversion... */
static void dae_matrix_to_mat4_(float out[4][4], const COLLADABU::Math::Matrix4 &in);
static void mat4_to_dae(float out[4][4], float in[4][4]);
diff --git a/source/blender/io/common/IO_abstract_hierarchy_iterator.h b/source/blender/io/common/IO_abstract_hierarchy_iterator.h
index e3ed3dd70a2..e066ca8ba8f 100644
--- a/source/blender/io/common/IO_abstract_hierarchy_iterator.h
+++ b/source/blender/io/common/IO_abstract_hierarchy_iterator.h
@@ -86,9 +86,9 @@ struct HierarchyContext {
bool animation_check_include_parent;
/*********** Determined during writer creation: ***************/
- float parent_matrix_inv_world[4][4]; // Inverse of the parent's world matrix.
- std::string export_path; // Hierarchical path, such as "/grandparent/parent/objectname".
- ParticleSystem *particle_system; // Only set for particle/hair writers.
+ float parent_matrix_inv_world[4][4]; /* Inverse of the parent's world matrix. */
+ std::string export_path; /* Hierarchical path, such as "/grandparent/parent/objectname". */
+ ParticleSystem *particle_system; /* Only set for particle/hair writers. */
/* Hierarchical path of the object this object is duplicating; only set when this object should
* be stored as a reference to its original. It can happen that the original is not part of the
@@ -127,9 +127,9 @@ class AbstractHierarchyWriter {
public:
virtual ~AbstractHierarchyWriter();
virtual void write(HierarchyContext &context) = 0;
- // TODO(Sybren): add function like absent() that's called when a writer was previously created,
- // but wasn't used while exporting the current frame (for example, a particle-instanced mesh of
- // which the particle is no longer alive).
+ /* TODO(Sybren): add function like absent() that's called when a writer was previously created,
+ * but wasn't used while exporting the current frame (for example, a particle-instanced mesh of
+ * which the particle is no longer alive). */
protected:
/* Return true if the data written by this writer changes over time.
* Note that this function assumes this is an object data writer. Transform writers should not
diff --git a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc
index 6e763c29631..6077fc89b91 100644
--- a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc
+++ b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc
@@ -57,7 +57,7 @@ bool HierarchyContext::operator<(const HierarchyContext &other) const
return object < other.object;
}
if (duplicator != nullptr && duplicator == other.duplicator) {
- // Only resort to string comparisons when both objects are created by the same duplicator.
+ /* Only resort to string comparisons when both objects are created by the same duplicator. */
return export_name < other.export_name;
}
@@ -291,16 +291,16 @@ void AbstractHierarchyIterator::export_graph_construct()
object,
DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY |
DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET) {
- // Non-instanced objects always have their object-parent as export-parent.
+ /* Non-instanced objects always have their object-parent as export-parent. */
const bool weak_export = mark_as_weak_export(object);
visit_object(object, object->parent, weak_export);
if (weak_export) {
- // If a duplicator shouldn't be exported, its duplilist also shouldn't be.
+ /* If a duplicator shouldn't be exported, its duplilist also shouldn't be. */
continue;
}
- // Export the duplicated objects instanced by this object.
+ /* Export the duplicated objects instanced by this object. */
ListBase *lb = object_duplilist(depsgraph_, scene, object);
if (lb) {
DupliParentFinder dupli_parent_finder;
@@ -328,29 +328,29 @@ void AbstractHierarchyIterator::export_graph_construct()
void AbstractHierarchyIterator::connect_loose_objects()
{
- // Find those objects whose parent is not part of the export graph; these
- // objects would be skipped when traversing the graph as a hierarchy.
- // These objects will have to be re-attached to some parent object in order to
- // fit into the hierarchy.
+ /* Find those objects whose parent is not part of the export graph; these
+ * objects would be skipped when traversing the graph as a hierarchy.
+ * These objects will have to be re-attached to some parent object in order to
+ * fit into the hierarchy. */
ExportGraph loose_objects_graph = export_graph_;
for (const ExportGraph::value_type &map_iter : export_graph_) {
for (const HierarchyContext *child : map_iter.second) {
- // An object that is marked as a child of another object is not considered 'loose'.
+ /* An object that is marked as a child of another object is not considered 'loose'. */
ObjectIdentifier child_oid = ObjectIdentifier::for_hierarchy_context(child);
loose_objects_graph.erase(child_oid);
}
}
- // The root of the hierarchy is always found, so it's never considered 'loose'.
+ /* The root of the hierarchy is always found, so it's never considered 'loose'. */
loose_objects_graph.erase(ObjectIdentifier::for_graph_root());
- // Iterate over the loose objects and connect them to their export parent.
+ /* Iterate over the loose objects and connect them to their export parent. */
for (const ExportGraph::value_type &map_iter : loose_objects_graph) {
const ObjectIdentifier &graph_key = map_iter.first;
Object *object = graph_key.object;
while (true) {
- // Loose objects will all be real objects, as duplicated objects always have
- // their duplicator or other exported duplicated object as ancestor.
+ /* Loose objects will all be real objects, as duplicated objects always have
+ * their duplicator or other exported duplicated object as ancestor. */
ExportGraph::iterator found_parent_iter = export_graph_.find(
ObjectIdentifier::for_real_object(object->parent));
@@ -358,8 +358,8 @@ void AbstractHierarchyIterator::connect_loose_objects()
if (found_parent_iter != export_graph_.end()) {
break;
}
- // 'object->parent' will never be nullptr here, as the export graph contains the
- // root as nullptr and thus will cause a break above.
+ /* 'object->parent' will never be nullptr here, as the export graph contains the
+ * root as nullptr and thus will cause a break above. */
BLI_assert(object->parent != nullptr);
object = object->parent;
@@ -383,7 +383,7 @@ static bool remove_weak_subtrees(const HierarchyContext *context,
all_is_weak &= child_tree_is_weak;
if (child_tree_is_weak) {
- // This subtree is all weak, so we can remove it from the current object's children.
+ /* This subtree is all weak, so we can remove it from the current object's children. */
clean_graph[map_key].erase(child_context);
delete child_context;
}
@@ -391,7 +391,7 @@ static bool remove_weak_subtrees(const HierarchyContext *context,
}
if (all_is_weak) {
- // This node and all its children are weak, so it can be removed from the export graph.
+ /* This node and all its children are weak, so it can be removed from the export graph. */
clean_graph.erase(map_key);
}
@@ -400,7 +400,7 @@ static bool remove_weak_subtrees(const HierarchyContext *context,
void AbstractHierarchyIterator::export_graph_prune()
{
- // Take a copy of the map so that we can modify while recursing.
+ /* Take a copy of the map so that we can modify while recursing. */
ExportGraph unpruned_export_graph = export_graph_;
remove_weak_subtrees(HierarchyContext::root(), export_graph_, unpruned_export_graph);
}
@@ -435,14 +435,14 @@ void AbstractHierarchyIterator::visit_object(Object *object,
ExportGraph::key_type graph_index = determine_graph_index_object(context);
context_update_for_graph_index(context, graph_index);
- // Store this HierarchyContext as child of the export parent.
+ /* Store this HierarchyContext as child of the export parent. */
export_graph_[graph_index].insert(context);
- // Create an empty entry for this object to indicate it is part of the export. This will be used
- // by connect_loose_objects(). Having such an "indicator" will make it possible to do an O(log n)
- // check on whether an object is part of the export, rather than having to check all objects in
- // the map. Note that it's not possible to simply search for (object->parent, nullptr), as the
- // object's parent in Blender may not be the same as its export-parent.
+ /* Create an empty entry for this object to indicate it is part of the export. This will be used
+ * by connect_loose_objects(). Having such an "indicator" will make it possible to do an O(log n)
+ * check on whether an object is part of the export, rather than having to check all objects in
+ * the map. Note that it's not possible to simply search for (object->parent, nullptr), as the
+ * object's parent in Blender may not be the same as its export-parent. */
ExportGraph::key_type object_key = ObjectIdentifier::for_real_object(object);
if (export_graph_.find(object_key) == export_graph_.end()) {
export_graph_[object_key] = ExportChildren();
@@ -471,7 +471,7 @@ void AbstractHierarchyIterator::visit_dupli_object(DupliObject *dupli_object,
copy_m4_m4(context->matrix_world, dupli_object->mat);
- // Construct export name for the dupli-instance.
+ /* Construct export name for the dupli-instance. */
std::stringstream export_name_stream;
export_name_stream << get_object_name(context->object) << "-"
<< context->persistent_id.as_object_name_suffix();
@@ -500,7 +500,7 @@ AbstractHierarchyIterator::ExportGraph::key_type AbstractHierarchyIterator::
void AbstractHierarchyIterator::context_update_for_graph_index(
HierarchyContext *context, const ExportGraph::key_type &graph_index) const
{
- // Update the HierarchyContext so that it is consistent with the graph index.
+ /* Update the HierarchyContext so that it is consistent with the graph index. */
context->export_parent = graph_index.object;
if (context->export_parent != context->object->parent) {
/* The parent object in Blender is NOT used as the export parent. This means
@@ -550,7 +550,7 @@ void AbstractHierarchyIterator::determine_duplication_references(
const ExportPathMap::const_iterator &it = duplisource_export_path_.find(source_id);
if (it == duplisource_export_path_.end()) {
- // The original was not found, so mark this instance as "the original".
+ /* The original was not found, so mark this instance as "the original". */
context->mark_as_not_instanced();
duplisource_export_path_[source_id] = context->export_path;
}
@@ -563,7 +563,7 @@ void AbstractHierarchyIterator::determine_duplication_references(
const ExportPathMap::const_iterator &it = duplisource_export_path_.find(source_data_id);
if (it == duplisource_export_path_.end()) {
- // The original was not found, so mark this instance as "original".
+ /* The original was not found, so mark this instance as "original". */
std::string data_path = get_object_data_path(context);
context->mark_as_not_instanced();
duplisource_export_path_[source_id] = context->export_path;
@@ -588,19 +588,19 @@ void AbstractHierarchyIterator::make_writers(const HierarchyContext *parent_cont
}
for (HierarchyContext *context : graph_children(parent_context)) {
- // Update the context so that it is correct for this parent-child relation.
+ /* Update the context so that it is correct for this parent-child relation. */
copy_m4_m4(context->parent_matrix_inv_world, parent_matrix_inv_world);
if (parent_context != nullptr) {
context->higher_up_export_path = parent_context->export_path;
}
- // Get or create the transform writer.
+ /* Get or create the transform writer. */
EnsuredWriter transform_writer = ensure_writer(
context, &AbstractHierarchyIterator::create_transform_writer);
if (!transform_writer) {
- // Unable to export, so there is nothing to attach any children to; just abort this entire
- // branch of the export hierarchy.
+ /* Unable to export, so there is nothing to attach any children to; just abort this entire
+ * branch of the export hierarchy. */
return;
}
@@ -617,11 +617,12 @@ void AbstractHierarchyIterator::make_writers(const HierarchyContext *parent_cont
make_writer_object_data(context);
}
- // Recurse into this object's children.
+ /* Recurse into this object's children. */
make_writers(context);
}
- // TODO(Sybren): iterate over all unused writers and call unused_during_iteration() or something.
+ /* TODO(Sybren): iterate over all unused writers and call unused_during_iteration() or something.
+ */
}
HierarchyContext AbstractHierarchyIterator::context_for_object_data(
@@ -750,7 +751,7 @@ bool AbstractHierarchyIterator::mark_as_weak_export(const Object * /*object*/) c
}
bool AbstractHierarchyIterator::should_visit_dupli_object(const DupliObject *dupli_object) const
{
- // Removing dupli_object->no_draw hides things like custom bone shapes.
+ /* Removing dupli_object->no_draw hides things like custom bone shapes. */
return !dupli_object->no_draw;
}
diff --git a/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc b/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc
index 27196994a3c..6e4509afd30 100644
--- a/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc
+++ b/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc
@@ -145,7 +145,7 @@ TEST_F(AbstractHierarchyIteratorTest, ExportHierarchyTest)
iterator->iterate_and_write();
- // Mapping from object name to set of export paths.
+ /* Mapping from object name to set of export paths. */
used_writers expected_transforms = {
{"OBCamera", {"/Camera"}},
{"OBDupli1", {"/Dupli1"}},
@@ -196,12 +196,12 @@ TEST_F(AbstractHierarchyIteratorTest, ExportHierarchyTest)
EXPECT_EQ(expected_data, iterator->data_writers);
- // The scene has no hair or particle systems.
+ /* The scene has no hair or particle systems. */
EXPECT_EQ(0, iterator->hair_writers.size());
EXPECT_EQ(0, iterator->particle_writers.size());
- // On the second iteration, everything should be written as well.
- // This tests the default value of iterator->export_subset_.
+ /* On the second iteration, everything should be written as well.
+ * This tests the default value of iterator->export_subset_. */
iterator->transform_writers.clear();
iterator->data_writers.clear();
iterator->iterate_and_write();
@@ -211,8 +211,8 @@ TEST_F(AbstractHierarchyIteratorTest, ExportHierarchyTest)
TEST_F(AbstractHierarchyIteratorTest, ExportSubsetTest)
{
- // The scene has no hair or particle systems, and this is already covered by ExportHierarchyTest,
- // so not included here. Update this test when hair & particle systems are included.
+ /* The scene has no hair or particle systems, and this is already covered by ExportHierarchyTest,
+ * so not included here. Update this test when hair & particle systems are included. */
/* Load the test blend file. */
if (!blendfile_load("usd/usd_hierarchy_export_test.blend")) {
@@ -221,7 +221,7 @@ TEST_F(AbstractHierarchyIteratorTest, ExportSubsetTest)
depsgraph_create(DAG_EVAL_RENDER);
iterator_create();
- // Mapping from object name to set of export paths.
+ /* Mapping from object name to set of export paths. */
used_writers expected_transforms = {
{"OBCamera", {"/Camera"}},
{"OBDupli1", {"/Dupli1"}},
@@ -269,8 +269,8 @@ TEST_F(AbstractHierarchyIteratorTest, ExportSubsetTest)
{"OBParentOfDupli2", {"/ParentOfDupli2/Icosphere"}},
};
- // Even when only asking an export of transforms, on the first frame everything should be
- // exported.
+ /* Even when only asking an export of transforms, on the first frame everything should be
+ * exported. */
{
ExportSubset export_subset = {0};
export_subset.transforms = true;
@@ -281,20 +281,20 @@ TEST_F(AbstractHierarchyIteratorTest, ExportSubsetTest)
EXPECT_EQ(expected_transforms, iterator->transform_writers);
EXPECT_EQ(expected_data, iterator->data_writers);
- // Clear data to prepare for the next iteration.
+ /* Clear data to prepare for the next iteration. */
iterator->transform_writers.clear();
iterator->data_writers.clear();
- // Second iteration, should only write transforms now.
+ /* Second iteration, should only write transforms now. */
iterator->iterate_and_write();
EXPECT_EQ(expected_transforms, iterator->transform_writers);
EXPECT_EQ(0, iterator->data_writers.size());
- // Clear data to prepare for the next iteration.
+ /* Clear data to prepare for the next iteration. */
iterator->transform_writers.clear();
iterator->data_writers.clear();
- // Third iteration, should only write data now.
+ /* Third iteration, should only write data now. */
{
ExportSubset export_subset = {0};
export_subset.transforms = false;
@@ -305,11 +305,11 @@ TEST_F(AbstractHierarchyIteratorTest, ExportSubsetTest)
EXPECT_EQ(0, iterator->transform_writers.size());
EXPECT_EQ(expected_data, iterator->data_writers);
- // Clear data to prepare for the next iteration.
+ /* Clear data to prepare for the next iteration. */
iterator->transform_writers.clear();
iterator->data_writers.clear();
- // Fourth iteration, should export everything now.
+ /* Fourth iteration, should export everything now. */
{
ExportSubset export_subset = {0};
export_subset.transforms = true;
@@ -343,7 +343,7 @@ TEST_F(AbstractHierarchyIteratorInvisibleTest, ExportInvisibleTest)
iterator->iterate_and_write();
- // Mapping from object name to set of export paths.
+ /* Mapping from object name to set of export paths. */
used_writers expected_transforms = {{"OBInvisibleAnimatedCube", {"/InvisibleAnimatedCube"}},
{"OBInvisibleCube", {"/InvisibleCube"}},
{"OBVisibleCube", {"/VisibleCube"}}};
@@ -355,7 +355,7 @@ TEST_F(AbstractHierarchyIteratorInvisibleTest, ExportInvisibleTest)
EXPECT_EQ(expected_data, iterator->data_writers);
- // The scene has no hair or particle systems.
+ /* The scene has no hair or particle systems. */
EXPECT_EQ(0, iterator->hair_writers.size());
EXPECT_EQ(0, iterator->particle_writers.size());
}
diff --git a/source/blender/io/common/intern/object_identifier_test.cc b/source/blender/io/common/intern/object_identifier_test.cc
index 2b565876f22..30e1e43d076 100644
--- a/source/blender/io/common/intern/object_identifier_test.cc
+++ b/source/blender/io/common/intern/object_identifier_test.cc
@@ -175,7 +175,7 @@ TEST_F(ObjectIdentifierOrderTest, map_copy_and_update)
AbstractHierarchyIterator::ExportGraph graph_copy = graph;
EXPECT_EQ(5, graph_copy.size());
- // Updating a value in a copy should not update the original.
+ /* Updating a value in a copy should not update the original. */
HierarchyContext ctx1;
HierarchyContext ctx2;
ctx1.object = fake_pointer(1);
@@ -184,7 +184,7 @@ TEST_F(ObjectIdentifierOrderTest, map_copy_and_update)
graph_copy[id_root].insert(&ctx1);
EXPECT_EQ(0, graph[id_root].size());
- // Deleting a key in the copy should not update the original.
+ /* Deleting a key in the copy should not update the original. */
graph_copy.erase(id_dupli_c);
EXPECT_EQ(4, graph_copy.size());
EXPECT_EQ(5, graph.size());
diff --git a/source/blender/io/usd/intern/usd_capi.cc b/source/blender/io/usd/intern/usd_capi.cc
index 4717f27dbd9..7b375689543 100644
--- a/source/blender/io/usd/intern/usd_capi.cc
+++ b/source/blender/io/usd/intern/usd_capi.cc
@@ -88,7 +88,7 @@ static void export_startjob(void *customdata,
WM_set_locked_interface(data->wm, true);
G.is_break = false;
- // Construct the depsgraph for exporting.
+ /* Construct the depsgraph for exporting. */
Scene *scene = DEG_get_input_scene(data->depsgraph);
if (data->params.visible_objects_only) {
DEG_graph_build_from_view_layer(data->depsgraph);
@@ -101,7 +101,7 @@ static void export_startjob(void *customdata,
*progress = 0.0f;
*do_update = true;
- // For restoring the current frame after exporting animation is done.
+ /* For restoring the current frame after exporting animation is done. */
const int orig_frame = CFRA;
pxr::UsdStageRefPtr usd_stage = pxr::UsdStage::CreateNew(data->filename);
@@ -120,7 +120,7 @@ static void export_startjob(void *customdata,
usd_stage->GetRootLayer()->SetDocumentation(std::string("Blender v") +
BKE_blender_version_string());
- // Set up the stage for animated data.
+ /* Set up the stage for animated data. */
if (data->params.export_animation) {
usd_stage->SetTimeCodesPerSecond(FPS);
usd_stage->SetStartTimeCode(scene->r.sfra);
@@ -130,7 +130,7 @@ static void export_startjob(void *customdata,
USDHierarchyIterator iter(data->depsgraph, usd_stage, data->params);
if (data->params.export_animation) {
- // Writing the animated frames is not 100% of the work, but it's our best guess.
+ /* Writing the animated frames is not 100% of the work, but it's our best guess. */
float progress_per_frame = 1.0f / std::max(1, (scene->r.efra - scene->r.sfra + 1));
for (float frame = scene->r.sfra; frame <= scene->r.efra; frame++) {
@@ -138,7 +138,7 @@ static void export_startjob(void *customdata,
break;
}
- // Update the scene for the next frame to render.
+ /* Update the scene for the next frame to render. */
scene->r.cfra = static_cast<int>(frame);
scene->r.subframe = frame - scene->r.cfra;
BKE_scene_graph_update_for_newframe(data->depsgraph);
@@ -151,14 +151,14 @@ static void export_startjob(void *customdata,
}
}
else {
- // If we're not animating, a single iteration over all objects is enough.
+ /* If we're not animating, a single iteration over all objects is enough. */
iter.iterate_and_write();
}
iter.release_writers();
usd_stage->GetRootLayer()->Save();
- // Finish up by going back to the keyframe that was current before we started.
+ /* Finish up by going back to the keyframe that was current before we started. */
if (CFRA != orig_frame) {
CFRA = orig_frame;
BKE_scene_graph_update_for_newframe(data->depsgraph);
diff --git a/source/blender/io/usd/intern/usd_writer_abstract.cc b/source/blender/io/usd/intern/usd_writer_abstract.cc
index 3f5babdee56..17d51c9b7cc 100644
--- a/source/blender/io/usd/intern/usd_writer_abstract.cc
+++ b/source/blender/io/usd/intern/usd_writer_abstract.cc
@@ -25,7 +25,7 @@
/* TfToken objects are not cheap to construct, so we do it once. */
namespace usdtokens {
-// Materials
+/* Materials */
static const pxr::TfToken diffuse_color("diffuseColor", pxr::TfToken::Immortal);
static const pxr::TfToken metallic("metallic", pxr::TfToken::Immortal);
static const pxr::TfToken preview_shader("previewShader", pxr::TfToken::Immortal);
@@ -58,8 +58,8 @@ pxr::UsdTimeCode USDAbstractWriter::get_export_time_code() const
if (is_animated_) {
return usd_export_context_.hierarchy_iterator->get_export_time_code();
}
- // By using the default timecode USD won't even write a single `timeSample` for non-animated
- // data. Instead, it writes it as non-timesampled.
+ /* By using the default timecode USD won't even write a single `timeSample` for non-animated
+ * data. Instead, it writes it as non-timesampled. */
static pxr::UsdTimeCode default_timecode = pxr::UsdTimeCode::Default();
return default_timecode;
}
@@ -90,7 +90,7 @@ pxr::UsdShadeMaterial USDAbstractWriter::ensure_usd_material(Material *material)
static pxr::SdfPath material_library_path("/_materials");
pxr::UsdStageRefPtr stage = usd_export_context_.stage;
- // Construct the material.
+ /* Construct the material. */
pxr::TfToken material_name(usd_export_context_.hierarchy_iterator->get_id_name(&material->id));
pxr::SdfPath usd_path = material_library_path.AppendChild(material_name);
pxr::UsdShadeMaterial usd_material = pxr::UsdShadeMaterial::Get(stage, usd_path);
@@ -99,7 +99,7 @@ pxr::UsdShadeMaterial USDAbstractWriter::ensure_usd_material(Material *material)
}
usd_material = pxr::UsdShadeMaterial::Define(stage, usd_path);
- // Construct the shader.
+ /* Construct the shader. */
pxr::SdfPath shader_path = usd_path.AppendChild(usdtokens::preview_shader);
pxr::UsdShadeShader shader = pxr::UsdShadeShader::Define(stage, shader_path);
shader.CreateIdAttr(pxr::VtValue(usdtokens::preview_surface));
@@ -108,7 +108,7 @@ pxr::UsdShadeMaterial USDAbstractWriter::ensure_usd_material(Material *material)
shader.CreateInput(usdtokens::roughness, pxr::SdfValueTypeNames->Float).Set(material->roughness);
shader.CreateInput(usdtokens::metallic, pxr::SdfValueTypeNames->Float).Set(material->metallic);
- // Connect the shader and the material together.
+ /* Connect the shader and the material together. */
usd_material.CreateSurfaceOutput().ConnectToSource(shader, usdtokens::surface);
return usd_material;
diff --git a/source/blender/io/usd/intern/usd_writer_camera.cc b/source/blender/io/usd/intern/usd_writer_camera.cc
index f21a0444888..677be9a7fc4 100644
--- a/source/blender/io/usd/intern/usd_writer_camera.cc
+++ b/source/blender/io/usd/intern/usd_writer_camera.cc
@@ -96,7 +96,7 @@ void USDCameraWriter::do_write(HierarchyContext &context)
usd_camera.CreateClippingRangeAttr().Set(
pxr::VtValue(pxr::GfVec2f(camera->clip_start, camera->clip_end)), timecode);
- // Write DoF-related attributes.
+ /* Write DoF-related attributes. */
if (camera->dof.flag & CAM_DOF_ENABLED) {
usd_camera.CreateFStopAttr().Set(camera->dof.aperture_fstop, timecode);
diff --git a/source/blender/io/usd/intern/usd_writer_hair.cc b/source/blender/io/usd/intern/usd_writer_hair.cc
index df09aa2f187..5de8f3cefef 100644
--- a/source/blender/io/usd/intern/usd_writer_hair.cc
+++ b/source/blender/io/usd/intern/usd_writer_hair.cc
@@ -44,7 +44,7 @@ void USDHairWriter::do_write(HierarchyContext &context)
pxr::UsdGeomBasisCurves curves = pxr::UsdGeomBasisCurves::Define(usd_export_context_.stage,
usd_export_context_.usd_path);
- // TODO(Sybren): deal with (psys->part->flag & PART_HAIR_BSPLINE)
+ /* TODO(Sybren): deal with (psys->part->flag & PART_HAIR_BSPLINE) */
curves.CreateBasisAttr(pxr::VtValue(pxr::UsdGeomTokens->bspline));
curves.CreateTypeAttr(pxr::VtValue(pxr::UsdGeomTokens->cubic));
diff --git a/source/blender/io/usd/intern/usd_writer_mesh.cc b/source/blender/io/usd/intern/usd_writer_mesh.cc
index 3f9cb78ea3b..17c41e0edc1 100644
--- a/source/blender/io/usd/intern/usd_writer_mesh.cc
+++ b/source/blender/io/usd/intern/usd_writer_mesh.cc
@@ -180,8 +180,8 @@ void USDGenericMeshWriter::write_mesh(HierarchyContext &context, Mesh *mesh)
true);
if (!attr_points.HasValue()) {
- // Provide the initial value as default. This makes USD write the value as constant if they
- // don't change over time.
+ /* Provide the initial value as default. This makes USD write the value as constant if they
+ * don't change over time. */
attr_points.Set(usd_mesh_data.points, defaultTime);
attr_face_vertex_counts.Set(usd_mesh_data.face_vertex_counts, defaultTime);
attr_face_vertex_indices.Set(usd_mesh_data.face_indices, defaultTime);
@@ -221,7 +221,7 @@ void USDGenericMeshWriter::write_mesh(HierarchyContext &context, Mesh *mesh)
}
write_surface_velocity(context.object, mesh, usd_mesh);
- // TODO(Sybren): figure out what happens when the face groups change.
+ /* TODO(Sybren): figure out what happens when the face groups change. */
if (frame_has_been_written_) {
return;
}
@@ -342,7 +342,7 @@ void USDGenericMeshWriter::assign_materials(const HierarchyContext &context,
return;
}
- // Define a geometry subset per material.
+ /* Define a geometry subset per material. */
for (const MaterialFaceGroups::value_type &face_group : usd_face_groups) {
short material_number = face_group.first;
const pxr::VtIntArray &face_indices = face_group.second;
diff --git a/source/blender/io/usd/intern/usd_writer_transform.cc b/source/blender/io/usd/intern/usd_writer_transform.cc
index 632a6dd0f3f..136b5c477a2 100644
--- a/source/blender/io/usd/intern/usd_writer_transform.cc
+++ b/source/blender/io/usd/intern/usd_writer_transform.cc
@@ -36,10 +36,10 @@ USDTransformWriter::USDTransformWriter(const USDExporterContext &ctx) : USDAbstr
void USDTransformWriter::do_write(HierarchyContext &context)
{
- float parent_relative_matrix[4][4]; // The object matrix relative to the parent.
+ float parent_relative_matrix[4][4]; /* The object matrix relative to the parent. */
mul_m4_m4m4(parent_relative_matrix, context.parent_matrix_inv_world, context.matrix_world);
- // Write the transform relative to the parent.
+ /* Write the transform relative to the parent. */
pxr::UsdGeomXform xform = pxr::UsdGeomXform::Define(usd_export_context_.stage,
usd_export_context_.usd_path);
if (!xformOp_) {
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 6e590001aff..9da5c302290 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -697,7 +697,7 @@ typedef enum eAction_Flags {
typedef struct bDopeSheet {
/** Currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil). */
ID *source;
- /** Cache for channels (only initialized when pinned). */ // XXX not used!
+ /** Cache for channels (only initialized when pinned). */ /* XXX not used! */
ListBase chanbase;
/** Object group for option to only include objects that belong to this Collection. */
@@ -847,7 +847,7 @@ typedef enum eSAction_Flag {
/* draw time in seconds instead of time in frames */
SACTION_DRAWTIME = (1 << 2),
/* don't filter action channels according to visibility */
- // SACTION_NOHIDE = (1 << 3), // XXX deprecated... old animation system
+ // SACTION_NOHIDE = (1 << 3), /* XXX deprecated... old animation systems. */
/* don't kill overlapping keyframes after transform */
SACTION_NOTRANSKEYCULL = (1 << 4),
/* don't include keyframes that are out of view */
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index a13ed0b2924..f17d8b84790 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -506,7 +506,7 @@ typedef struct ChannelDriver {
/** Result of previous evaluation. */
float curval;
- // XXX to be implemented... this is like the constraint influence setting
+ /* XXX to be implemented... this is like the constraint influence setting. */
/** Influence of driver on result. */
float influence;
@@ -537,7 +537,7 @@ typedef enum eDriver_Flags {
DRIVER_FLAG_INVALID = (1 << 0),
DRIVER_FLAG_DEPRECATED = (1 << 1),
/** Driver does replace value, but overrides (for layering of animation over driver) */
- // TODO: this needs to be implemented at some stage or left out...
+ /* TODO: this needs to be implemented at some stage or left out... */
// DRIVER_FLAG_LAYERING = (1 << 2),
/** Use when the expression needs to be recompiled. */
DRIVER_FLAG_RECOMPILE = (1 << 3),
@@ -707,7 +707,7 @@ typedef struct NlaStrip {
/** Action that is referenced by this strip (strip is 'user' of the action). */
bAction *act;
- /** F-Curves for controlling this strip's influence and timing */ // TODO: move o.ut?
+ /** F-Curves for controlling this strip's influence and timing */ /* TODO: move out? */
ListBase fcurves;
/** F-Curve modifiers to be applied to the entire strip's referenced F-Curves. */
ListBase modifiers;
@@ -782,8 +782,8 @@ typedef enum eNlaStrip_Flag {
NLASTRIP_FLAG_ACTIVE = (1 << 0),
/* NLA strip is selected for editing */
NLASTRIP_FLAG_SELECT = (1 << 1),
- // NLASTRIP_FLAG_SELECT_L = (1 << 2), // left handle selected
- // NLASTRIP_FLAG_SELECT_R = (1 << 3), // right handle selected
+ // NLASTRIP_FLAG_SELECT_L = (1 << 2), /* left handle selected. */
+ // NLASTRIP_FLAG_SELECT_R = (1 << 3), /* right handle selected. */
/** NLA strip uses the same action that the action being tweaked uses
* (not set for the tweaking one though). */
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 1d76ebdff2c..33856dc2622 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -1356,7 +1356,7 @@ enum {
/* subsurface */
enum {
#ifdef DNA_DEPRECATED_ALLOW
- SHD_SUBSURFACE_COMPATIBLE = 0, // Deprecated
+ SHD_SUBSURFACE_COMPATIBLE = 0, /* Deprecated */
#endif
SHD_SUBSURFACE_CUBIC = 1,
SHD_SUBSURFACE_GAUSSIAN = 2,
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 586c704e0f1..112c8210460 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -202,7 +202,7 @@ typedef struct Object {
/** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED;
/* struct Path *path; */
- struct bAction *action DNA_DEPRECATED; // XXX deprecated... old animation system
+ struct bAction *action DNA_DEPRECATED; /* XXX deprecated... old animation system */
struct bAction *poselib;
/** Pose data, armature objects only. */
struct bPose *pose;
@@ -211,7 +211,7 @@ typedef struct Object {
/** Grease Pencil data. */
struct bGPdata *gpd
- DNA_DEPRECATED; // XXX deprecated... replaced by gpencil object, keep for readfile
+ DNA_DEPRECATED; /* XXX deprecated... replaced by gpencil object, keep for readfile */
/** Settings for visualization of object-transform animation. */
bAnimVizSettings avs;
@@ -219,8 +219,8 @@ typedef struct Object {
bMotionPath *mpath;
void *_pad0;
- ListBase constraintChannels DNA_DEPRECATED; // XXX deprecated... old animation system
- ListBase effect DNA_DEPRECATED; // XXX deprecated... keep for readfile
+ ListBase constraintChannels DNA_DEPRECATED; /* XXX deprecated... old animation system */
+ ListBase effect DNA_DEPRECATED; /* XXX deprecated... keep for readfile */
/** List of bDeformGroup (vertex groups) names and flag only. */
ListBase defbase;
/** List of ModifierData structures. */
@@ -352,8 +352,8 @@ typedef struct Object {
/** Object constraints. */
ListBase constraints;
- ListBase nlastrips DNA_DEPRECATED; // XXX deprecated... old animation system
- ListBase hooks DNA_DEPRECATED; // XXX deprecated... old animation system
+ ListBase nlastrips DNA_DEPRECATED; /* XXX deprecated... old animation system */
+ ListBase hooks DNA_DEPRECATED; /* XXX deprecated... old animation system */
/** Particle systems. */
ListBase particlesystem;
@@ -366,7 +366,7 @@ typedef struct Object {
/** If fluidsim enabled, store additional settings. */
struct FluidsimSettings *fluidsimSettings
- DNA_DEPRECATED; // XXX deprecated... replaced by mantaflow, keep for readfile
+ DNA_DEPRECATED; /* XXX deprecated... replaced by mantaflow, keep for readfile */
ListBase pc_ids;
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index b50c2268b3c..bd19498eba7 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -272,7 +272,7 @@ typedef struct ParticleSettings {
struct Collection *instance_collection;
struct ListBase instance_weights;
- struct Collection *force_group DNA_DEPRECATED; // deprecated
+ struct Collection *force_group DNA_DEPRECATED; /* deprecated */
struct Object *instance_object;
struct Object *bb_ob;
/** Old animation system, deprecated for 2.5. */
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index df9ad358540..b4356ddebb7 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -182,8 +182,8 @@ typedef struct FFMpegCodecData {
/* Audio */
typedef struct AudioData {
- int mixrate; // 2.5: now in FFMpegCodecData: audio_mixrate
- float main; // 2.5: now in FFMpegCodecData: audio_volume
+ int mixrate; /* 2.5: now in FFMpegCodecData: audio_mixrate */
+ float main; /* 2.5: now in FFMpegCodecData: audio_volume */
float speed_of_sound;
float doppler_factor;
int distance_model;
@@ -622,7 +622,7 @@ typedef struct RenderData {
/** Frames to jump during render/playback. */
int frame_step;
- /** Standalone player stereo settings */ // XXX deprecated since .2.5
+ /** Standalone player stereo settings */ /* XXX deprecated since .2.5 */
short stereomode DNA_DEPRECATED;
/** For the dimensions presets menu. */
@@ -2181,7 +2181,7 @@ typedef enum eSculptFlags {
SCULPT_FLAG_UNUSED_7 = (1 << 7), /* cleared */
SCULPT_ONLY_DEFORM = (1 << 8),
- // SCULPT_SHOW_DIFFUSE = (1 << 9), // deprecated
+ // SCULPT_SHOW_DIFFUSE = (1 << 9), /* deprecated */
/* If set, the mesh will be drawn with smooth-shading in
* dynamic-topology mode */
@@ -2218,8 +2218,8 @@ enum {
/* ImagePaintSettings.flag */
#define IMAGEPAINT_DRAWING (1 << 0)
-// #define IMAGEPAINT_DRAW_TOOL (1 << 1) // deprecated
-// #define IMAGEPAINT_DRAW_TOOL_DRAWING (1 << 2) // deprecated
+// #define IMAGEPAINT_DRAW_TOOL (1 << 1) /* deprecated */
+// #define IMAGEPAINT_DRAW_TOOL_DRAWING (1 << 2) /* deprecated */
/* projection painting only */
/* ImagePaintSettings.flag */
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index 850b906af39..1d89657faf6 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -76,24 +76,24 @@ typedef struct StripColorBalance {
float gain[3];
int flag;
char _pad[4];
- // float exposure;
- // float saturation;
+ /* float exposure; */
+ /* float saturation; */
} StripColorBalance;
typedef struct StripProxy {
- char dir[768]; // custom directory for index and proxy files
- // (defaults to BL_proxy)
+ char dir[768]; /* custom directory for index and proxy files */
+ /* (defaults to BL_proxy) */
- char file[256]; // custom file
- struct anim *anim; // custom proxy anim file
+ char file[256]; /* custom file */
+ struct anim *anim; /* custom proxy anim file */
- short tc; // time code in use
+ short tc; /* time code in use */
- short quality; // proxy build quality
- short build_size_flags; // size flags (see below) of all proxies
- // to build
- short build_tc_flags; // time code flags (see below) of all tc indices
- // to build
+ short quality; /* proxy build quality */
+ short build_size_flags; /* size flags (see below) of all proxies */
+ /* to build */
+ short build_tc_flags; /* time code flags (see below) of all tc indices */
+ /* to build */
short build_flags;
char storage;
char _pad[5];
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index 63e5f134c19..5381c524e4d 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -192,7 +192,7 @@ typedef struct Tex {
float cropxmin, cropymin, cropxmax, cropymax;
int texfilter;
- int afmax; // anisotropic filter maximum value, ewa -> max eccentricity, feline -> max probes
+ int afmax; /* anisotropic filter maximum value, ewa -> max eccentricity, feline -> max probes */
short xrepeat, yrepeat;
short extend;
@@ -318,8 +318,7 @@ typedef struct ColorMapping {
#define TEX_DERIVATIVEMAP (1 << 14)
/* texfilter */
-// TXF_BOX -> blender's old texture filtering method
-#define TXF_BOX 0
+#define TXF_BOX 0 /* Blender's old texture filtering method. */
#define TXF_EWA 1
#define TXF_FELINE 2
#define TXF_AREA 3
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index c41a8bb9bc1..a20d939694d 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -322,10 +322,10 @@ typedef struct ThemeSpace {
unsigned char grid_levels;
/* syntax for textwindow and nodes */
- unsigned char syntaxl[4], syntaxs[4]; // in nodespace used for backdrop matte
- unsigned char syntaxb[4], syntaxn[4]; // in nodespace used for color input
- unsigned char syntaxv[4], syntaxc[4]; // in nodespace used for converter group
- unsigned char syntaxd[4], syntaxr[4]; // in nodespace used for distort
+ unsigned char syntaxl[4], syntaxs[4]; /* in nodespace used for backdrop matte */
+ unsigned char syntaxb[4], syntaxn[4]; /* in nodespace used for color input */
+ unsigned char syntaxv[4], syntaxc[4]; /* in nodespace used for converter group */
+ unsigned char syntaxd[4], syntaxr[4]; /* in nodespace used for distort */
unsigned char line_numbers[4];
char _pad6[3];
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index 1a107547450..ac747ab3037 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -32,7 +32,7 @@
#include <stdlib.h>
#include <string.h>
-#include "MEM_guardedalloc.h" // for MEM_freeN MEM_mallocN MEM_callocN
+#include "MEM_guardedalloc.h" /* for MEM_freeN MEM_mallocN MEM_callocN */
#include "BLI_endian_switch.h"
#include "BLI_memarena.h"
@@ -42,7 +42,7 @@
#include "BLI_ghash.h"
#include "DNA_genfile.h"
-#include "DNA_sdna_types.h" // for SDNA ;-)
+#include "DNA_sdna_types.h" /* for SDNA ;-) */
/**
* \section dna_genfile Overview
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 1c488b2cac1..d63a2e06764 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -414,7 +414,7 @@ typedef struct CollectionListBase {
typedef enum RawPropertyType {
PROP_RAW_UNSET = -1,
- PROP_RAW_INT, // XXX - abused for types that are not set, eg. MFace.verts, needs fixing.
+ PROP_RAW_INT, /* XXX - abused for types that are not set, eg. MFace.verts, needs fixing. */
PROP_RAW_SHORT,
PROP_RAW_CHAR,
PROP_RAW_BOOLEAN,
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index cb64d81533f..1630468db7c 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -62,7 +62,7 @@ static void rna_Fluid_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR
{
DEG_id_tag_update(ptr->owner_id, ID_RECALC_GEOMETRY);
- // Needed for liquid domain objects
+ /* Needed for liquid domain objects */
Object *ob = (Object *)ptr->owner_id;
WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob);
}
@@ -490,7 +490,7 @@ static void rna_Fluid_combined_export_update(Main *bmain, Scene *scene, PointerR
}
}
else {
- // sanity check, should not occur
+ /* sanity check, should not occur */
printf("ERROR: Unexpected combined export setting encountered!");
}
}
diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c
index d4d30d0c09a..0b56a73efa2 100644
--- a/source/blender/makesrna/intern/rna_rigidbody.c
+++ b/source/blender/makesrna/intern/rna_rigidbody.c
@@ -1077,14 +1077,14 @@ static void rna_def_rigidbody_object(BlenderRNA *brna)
/* Physics Parameters */
prop = RNA_def_property(srna, "mass", PROP_FLOAT, PROP_UNIT_MASS);
RNA_def_property_float_sdna(prop, NULL, "mass");
- RNA_def_property_range(prop, 0.001f, FLT_MAX); // range must always be positive (and non-zero)
+ RNA_def_property_range(prop, 0.001f, FLT_MAX); /* range must always be positive (and non-zero) */
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_float_funcs(prop, NULL, "rna_RigidBodyOb_mass_set", NULL);
RNA_def_property_ui_text(prop, "Mass", "How much the object 'weighs' irrespective of gravity");
RNA_def_property_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_reset");
/* Dynamics Parameters - Activation */
- // TODO: define and figure out how to implement these
+ /* TODO: define and figure out how to implement these. */
/* Dynamics Parameters - Deactivation */
prop = RNA_def_property(srna, "use_deactivation", PROP_BOOLEAN, PROP_NONE);
@@ -1107,7 +1107,8 @@ static void rna_def_rigidbody_object(BlenderRNA *brna)
prop = RNA_def_property(srna, "deactivate_linear_velocity", PROP_FLOAT, PROP_UNIT_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "lin_sleep_thresh");
- RNA_def_property_range(prop, FLT_MIN, FLT_MAX); // range must always be positive (and non-zero)
+ RNA_def_property_range(
+ prop, FLT_MIN, FLT_MAX); /* range must always be positive (and non-zero) */
RNA_def_property_float_default(prop, 0.4f);
RNA_def_property_float_funcs(prop, NULL, "rna_RigidBodyOb_linear_sleepThresh_set", NULL);
RNA_def_property_ui_text(prop,
@@ -1117,7 +1118,8 @@ static void rna_def_rigidbody_object(BlenderRNA *brna)
prop = RNA_def_property(srna, "deactivate_angular_velocity", PROP_FLOAT, PROP_UNIT_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "ang_sleep_thresh");
- RNA_def_property_range(prop, FLT_MIN, FLT_MAX); // range must always be positive (and non-zero)
+ RNA_def_property_range(
+ prop, FLT_MIN, FLT_MAX); /* range must always be positive (and non-zero) */
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_float_funcs(prop, NULL, "rna_RigidBodyOb_angular_sleepThresh_set", NULL);
RNA_def_property_ui_text(prop,
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c
index 59cedf8fcb8..e93ca7bc019 100644
--- a/source/blender/makesrna/intern/rna_sequencer_api.c
+++ b/source/blender/makesrna/intern/rna_sequencer_api.c
@@ -58,7 +58,7 @@ static void rna_Sequence_update_rnafunc(ID *id, Sequence *self, bool do_data)
{
if (do_data) {
BKE_sequencer_update_changed_seq_and_deps((Scene *)id, self, true, true);
- // new_tstripdata(self); // need 2.6x version of this.
+ // new_tstripdata(self); /* need 2.6x version of this. */
}
BKE_sequence_calc((Scene *)id, self);
BKE_sequence_calc_disp((Scene *)id, self);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 8d36b7dc08f..633611b9e50 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -78,7 +78,7 @@ const EnumPropertyItem rna_enum_preference_section_items[] = {
{USER_SECTION_ANIMATION, "ANIMATION", 0, "Animation", ""},
{0, "", 0, NULL, NULL},
{USER_SECTION_ADDONS, "ADDONS", 0, "Add-ons", ""},
-#if 0 // def WITH_USERDEF_WORKSPACES
+#if 0 /* def WITH_USERDEF_WORKSPACES */
{0, "", 0, NULL, NULL},
{USER_SECTION_WORKSPACE_CONFIG, "WORKSPACE_CONFIG", 0, "Configuration File", ""},
{USER_SECTION_WORKSPACE_ADDONS, "WORKSPACE_ADDONS", 0, "Add-on Overrides", ""},
diff --git a/source/blender/nodes/composite/nodes/node_composite_tonemap.c b/source/blender/nodes/composite/nodes/node_composite_tonemap.c
index 1048ac1b167..5fc86c997f5 100644
--- a/source/blender/nodes/composite/nodes/node_composite_tonemap.c
+++ b/source/blender/nodes/composite/nodes/node_composite_tonemap.c
@@ -40,9 +40,9 @@ static void node_composit_init_tonemap(bNodeTree *UNUSED(ntree), bNode *node)
ntm->offset = 1;
ntm->gamma = 1;
ntm->f = 0;
- ntm->m = 0; // actual value is set according to input
- // default a of 1 works well with natural HDR images, but not always so for cgi.
- // Maybe should use 0 or at least lower initial value instead
+ ntm->m = 0; /* Actual value is set according to input. */
+ /* Default a of 1 works well with natural HDR images, but not always so for CGI.
+ * Maybe should use 0 or at least lower initial value instead. */
ntm->a = 1;
ntm->c = 0;
node->storage = ntm;
diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h
index 6632f9ae3cd..6ed403bb21a 100644
--- a/source/blender/python/BPY_extern.h
+++ b/source/blender/python/BPY_extern.h
@@ -69,7 +69,7 @@ void BPY_thread_restore(BPy_ThreadStatePtr tstate);
void BPY_text_free_code(struct Text *text);
void BPY_modules_update(
- struct bContext *C); // XXX - annoying, need this for pointers that get out of date
+ struct bContext *C); /* XXX - annoying, need this for pointers that get out of date */
void BPY_modules_load_user(struct bContext *C);
void BPY_app_handlers_reset(const short do_all);
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c
index a74be2b580e..96c36f2d788 100644
--- a/source/blender/python/bmesh/bmesh_py_types_customdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c
@@ -98,7 +98,7 @@ PyDoc_STRVAR(bpy_bmlayeraccess_collection__string_doc,
":class:`BMLayerCollection`");
PyDoc_STRVAR(bpy_bmlayeraccess_collection__deform_doc,
"Vertex deform weight :class:`BMDeformVert` (TODO).\n\ntype: "
- ":class:`BMLayerCollection`" // TYPE DOESN'T EXIST YET
+ ":class:`BMLayerCollection`" /* TYPE DOESN'T EXIST YET */
);
PyDoc_STRVAR(
bpy_bmlayeraccess_collection__shape_doc,
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index 8214be3bd73..c43e5bb4d97 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -120,7 +120,7 @@ static void bm_init_types_bmloopuv(void)
BPy_BMLoopUV_Type.tp_name = "BMLoopUV";
- BPy_BMLoopUV_Type.tp_doc = NULL; // todo
+ BPy_BMLoopUV_Type.tp_doc = NULL; /* todo */
BPy_BMLoopUV_Type.tp_getset = bpy_bmloopuv_getseters;
@@ -233,7 +233,7 @@ static void bm_init_types_bmvertskin(void)
BPy_BMVertSkin_Type.tp_name = "BMVertSkin";
- BPy_BMVertSkin_Type.tp_doc = NULL; // todo
+ BPy_BMVertSkin_Type.tp_doc = NULL; /* todo */
BPy_BMVertSkin_Type.tp_getset = bpy_bmvertskin_getseters;
@@ -645,7 +645,7 @@ static void bm_init_types_bmdvert(void)
BPy_BMDeformVert_Type.tp_name = "BMDeformVert";
- BPy_BMDeformVert_Type.tp_doc = NULL; // todo
+ BPy_BMDeformVert_Type.tp_doc = NULL; /* todo */
BPy_BMDeformVert_Type.tp_as_sequence = &bpy_bmdeformvert_as_sequence;
BPy_BMDeformVert_Type.tp_as_mapping = &bpy_bmdeformvert_as_mapping;
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c
index 1531b2e0a11..9bbdaa9d6d9 100644
--- a/source/blender/python/generic/py_capi_utils.c
+++ b/source/blender/python/generic/py_capi_utils.c
@@ -646,10 +646,12 @@ PyObject *PyC_ExceptionBuffer(void)
goto error_cleanup;
}
- Py_INCREF(stdout_backup); // since these were borrowed we don't want them freed when replaced.
+ /* Since these were borrowed we don't want them freed when replaced. */
+ Py_INCREF(stdout_backup);
Py_INCREF(stderr_backup);
- PySys_SetObject("stdout", string_io); // both of these are freed when restoring
+ /* Both of these are freed when restoring. */
+ PySys_SetObject("stdout", string_io);
PySys_SetObject("stderr", string_io);
PyErr_Restore(error_type, error_value, error_traceback);
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c
index a4a73d2aa75..75314e4e2ea 100644
--- a/source/blender/python/intern/bpy.c
+++ b/source/blender/python/intern/bpy.c
@@ -147,7 +147,7 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec
return list;
}
-// PyDoc_STRVAR(bpy_user_resource_doc[] = // now in bpy/utils.py
+// PyDoc_STRVAR(bpy_user_resource_doc[] = /* now in bpy/utils.py */
static PyObject *bpy_user_resource(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
{
const struct PyC_StringEnumItems type_items[] = {
diff --git a/source/blender/python/intern/bpy_app_ffmpeg.c b/source/blender/python/intern/bpy_app_ffmpeg.c
index fdd09be508a..4e396668450 100644
--- a/source/blender/python/intern/bpy_app_ffmpeg.c
+++ b/source/blender/python/intern/bpy_app_ffmpeg.c
@@ -75,7 +75,7 @@ static PyObject *make_ffmpeg_info(void)
return NULL;
}
-#if 0 // UNUSED
+#if 0 /* UNUSED */
# define SetIntItem(flag) PyStructSequence_SET_ITEM(ffmpeg_info, pos++, PyLong_FromLong(flag))
#endif
#ifndef WITH_FFMPEG
diff --git a/source/blender/python/intern/bpy_app_sdl.c b/source/blender/python/intern/bpy_app_sdl.c
index c8be2c521d3..645119c1c5d 100644
--- a/source/blender/python/intern/bpy_app_sdl.c
+++ b/source/blender/python/intern/bpy_app_sdl.c
@@ -89,7 +89,7 @@ static PyObject *make_sdl_info(void)
SDL_GetVersion(&version);
sdl_available = true;
}
-# else // WITH_SDL_DYNLOAD=OFF
+# else /* WITH_SDL_DYNLOAD=OFF */
sdl_available = true;
# if SDL_MAJOR_VERSION >= 2
SDL_GetVersion(&version);
@@ -107,7 +107,7 @@ static PyObject *make_sdl_info(void)
}
SetObjItem(PyBool_FromLong(sdl_available));
-#else // WITH_SDL=OFF
+#else /* WITH_SDL=OFF */
SetObjItem(PyBool_FromLong(0));
SetObjItem(PyC_Tuple_Pack_I32(0, 0, 0));
SetStrItem("Unknown");
diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c
index 8ba468f91e8..c0536693f38 100644
--- a/source/blender/python/intern/bpy_driver.c
+++ b/source/blender/python/intern/bpy_driver.c
@@ -266,7 +266,7 @@ static void pydriver_error(ChannelDriver *driver)
"\nError in Driver: The following Python expression failed:\n\t'%s'\n\n",
driver->expression);
- // BPy_errors_to_report(NULL); // TODO - reports
+ // BPy_errors_to_report(NULL); /* TODO - reports */
PyErr_Print();
PyErr_Clear();
}
@@ -613,7 +613,7 @@ float BPY_driver_exec(struct PathResolvedRNA *anim_rna,
fprintf(
stderr, "\tBPY_driver_eval() - couldn't add variable '%s' to namespace\n", dvar->name);
- // BPy_errors_to_report(NULL); // TODO - reports
+ // BPy_errors_to_report(NULL); /* TODO - reports */
PyErr_Print();
PyErr_Clear();
}
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 0c45a9222ee..f64332d94cc 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -91,7 +91,7 @@ static int py_call_level = 0;
/* Set by command line arguments before Python starts. */
static bool py_use_system_env = false;
-// #define TIME_PY_RUN // simple python tests. prints on exit.
+// #define TIME_PY_RUN /* simple python tests. prints on exit. */
#ifdef TIME_PY_RUN
# include "PIL_time.h"
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 1aad07af591..7796d0a01a1 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -722,7 +722,7 @@ PyObject *pyrna_math_object_from_array(PointerRNA *ptr, PropertyRNA *prop)
}
else {
/* Order will be updated from callback on use. */
- // TODO, get order from RNA
+ /* TODO, get order from RNA. */
PyObject *eul_cb = Euler_CreatePyObject_cb(
ret, EULER_ORDER_XYZ, mathutils_rna_array_cb_index, MATHUTILS_CB_SUBTYPE_EUL);
Py_DECREF(ret); /* The euler owns 'ret' now. */
@@ -6048,7 +6048,7 @@ static PyObject *pyrna_func_call(BPy_FunctionRNA *self, PyObject *args, PyObject
/* enable this so all strings are copied and freed after calling.
* this exposes bugs where the pointer to the string is held and re-used */
- // #define DEBUG_STRING_FREE
+ /* #define DEBUG_STRING_FREE */
#ifdef DEBUG_STRING_FREE
PyObject *string_free_ls = PyList_New(0);
@@ -8820,7 +8820,10 @@ static PyObject *pyrna_register_class(PyObject *UNUSED(self), PyObject *py_class
/* Old srna still references us, keep the check in case registering somehow can free it. */
if (RNA_struct_py_type_get(srna)) {
RNA_struct_py_type_set(srna, NULL);
- // Py_DECREF(py_class); /* Should be able to do this XXX since the old RNA adds a new ref. */
+#if 0
+ /* Should be able to do this XXX since the old RNA adds a new ref. */
+ Py_DECREF(py_class);
+#endif
}
/* Can't use this because it returns a dict proxy
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index 704aade6d94..1616bbeeea9 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -727,7 +727,7 @@ void BaseMathObject_dealloc(BaseMathObject *self)
BaseMathObject_clear(self);
}
- Py_TYPE(self)->tp_free(self); // PyObject_DEL(self); // breaks subtypes
+ Py_TYPE(self)->tp_free(self); // PyObject_DEL(self); /* breaks subtypes. */
}
/*----------------------------MODULE INIT-------------------------*/
diff --git a/source/blender/render/extern/include/RE_engine.h b/source/blender/render/extern/include/RE_engine.h
index 41f65fbda5c..e53f33eacff 100644
--- a/source/blender/render/extern/include/RE_engine.h
+++ b/source/blender/render/extern/include/RE_engine.h
@@ -79,7 +79,7 @@ typedef struct RenderEngineType {
struct RenderEngineType *next, *prev;
/* type info */
- char idname[64]; // best keep the same size as BKE_ST_MAXNAME
+ char idname[64]; /* best keep the same size as BKE_ST_MAXNAME. */
char name[64];
int flag;
diff --git a/source/blender/simulation/intern/ConstrainedConjugateGradient.h b/source/blender/simulation/intern/ConstrainedConjugateGradient.h
index b0f2bb037d2..0dc80c03bb5 100644
--- a/source/blender/simulation/intern/ConstrainedConjugateGradient.h
+++ b/source/blender/simulation/intern/ConstrainedConjugateGradient.h
@@ -60,7 +60,7 @@ EIGEN_DONT_INLINE void constrained_conjugate_gradient(const MatrixType &mat,
int n = mat.cols();
- VectorType residual = filter * (rhs - mat * x); // initial residual
+ VectorType residual = filter * (rhs - mat * x); /* initial residual */
RealScalar rhsNorm2 = (filter * rhs).squaredNorm();
if (rhsNorm2 == 0) {
@@ -79,32 +79,32 @@ EIGEN_DONT_INLINE void constrained_conjugate_gradient(const MatrixType &mat,
}
VectorType p(n);
- p = filter * precond.solve(residual); // initial search direction
+ p = filter * precond.solve(residual); /* initial search direction */
VectorType z(n), tmp(n);
RealScalar absNew = numext::real(
- residual.dot(p)); // the square of the absolute value of r scaled by invM
+ residual.dot(p)); /* the square of the absolute value of r scaled by invM */
int i = 0;
while (i < maxIters) {
- tmp.noalias() = filter * (mat * p); // the bottleneck of the algorithm
+ tmp.noalias() = filter * (mat * p); /* the bottleneck of the algorithm */
- Scalar alpha = absNew / p.dot(tmp); // the amount we travel on dir
- x += alpha * p; // update solution
- residual -= alpha * tmp; // update residue
+ Scalar alpha = absNew / p.dot(tmp); /* the amount we travel on dir */
+ x += alpha * p; /* update solution */
+ residual -= alpha * tmp; /* update residue */
residualNorm2 = residual.squaredNorm();
if (residualNorm2 < threshold) {
break;
}
- z = precond.solve(residual); // approximately solve for "A z = residual"
+ z = precond.solve(residual); /* approximately solve for "A z = residual" */
RealScalar absOld = absNew;
- absNew = numext::real(residual.dot(z)); // update the absolute value of r
+ absNew = numext::real(residual.dot(z)); /* update the absolute value of r */
RealScalar beta =
absNew /
- absOld; // calculate the Gram-Schmidt value used to create the new search direction
- p = filter * (z + beta * p); // update search direction
+ absOld; /* calculate the Gram-Schmidt value used to create the new search direction */
+ p = filter * (z + beta * p); /* update search direction */
i++;
}
tol_error = sqrt(residualNorm2 / rhsNorm2);
diff --git a/source/blender/simulation/intern/SIM_mass_spring.cpp b/source/blender/simulation/intern/SIM_mass_spring.cpp
index c09a58dcb56..42cfb11a15a 100644
--- a/source/blender/simulation/intern/SIM_mass_spring.cpp
+++ b/source/blender/simulation/intern/SIM_mass_spring.cpp
@@ -510,7 +510,7 @@ BLI_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s)
scaling = parms->bending + s->lin_stiffness * fabsf(parms->max_bend - parms->bending);
kb = scaling / (20.0f * (parms->avg_spring_len + FLT_EPSILON));
- // Fix for T45084 for cloth stiffness must have cb proportional to kb
+ /* Fix for T45084 for cloth stiffness must have cb proportional to kb */
cb = kb * parms->bending_damping;
SIM_mass_spring_force_spring_bending(data, s->ij, s->kl, s->restlen, kb, cb);
@@ -529,7 +529,7 @@ BLI_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s)
scaling = s->lin_stiffness * parms->bending;
kb = scaling / (20.0f * (parms->avg_spring_len + FLT_EPSILON));
- // Fix for T45084 for cloth stiffness must have cb proportional to kb
+ /* Fix for T45084 for cloth stiffness must have cb proportional to kb */
cb = kb * parms->bending_damping;
/* XXX assuming same restlen for ij and jk segments here,
@@ -788,10 +788,10 @@ static void cloth_calc_force(
MEM_freeN(winvec);
}
- // calculate spring forces
+ /* calculate spring forces */
for (LinkNode *link = cloth->springs; link; link = link->next) {
ClothSpring *spring = (ClothSpring *)link->link;
- // only handle active springs
+ /* only handle active springs */
if (!(spring->flags & CLOTH_SPRING_FLAG_DEACTIVATE)) {
cloth_calc_spring_force(clmd, spring);
}
@@ -1280,7 +1280,7 @@ int SIM_cloth_solve(
if (clmd->sim_parms->vgroup_mass > 0) { /* Do goal stuff. */
for (i = 0; i < mvert_num; i++) {
- // update velocities with constrained velocities from pinned verts
+ /* update velocities with constrained velocities from pinned verts */
if (verts[i].flags & CLOTH_VERT_FLAG_PINNED) {
float v[3];
sub_v3_v3v3(v, verts[i].xconst, verts[i].xold);
@@ -1305,10 +1305,10 @@ int SIM_cloth_solve(
/* initialize forces to zero */
SIM_mass_spring_clear_forces(id);
- // calculate forces
+ /* calculate forces */
cloth_calc_force(scene, clmd, frame, effectors, step);
- // calculate new velocity and position
+ /* calculate new velocity and position */
SIM_mass_spring_solve_velocities(id, dt, &result);
cloth_record_result(clmd, &result, dt);
diff --git a/source/blender/simulation/intern/implicit_blender.c b/source/blender/simulation/intern/implicit_blender.c
index b4912492678..f6f73ba7dd2 100644
--- a/source/blender/simulation/intern/implicit_blender.c
+++ b/source/blender/simulation/intern/implicit_blender.c
@@ -79,14 +79,14 @@ typedef float lfVector[3];
typedef struct fmatrix3x3 {
float m[3][3]; /* 3x3 matrix */
unsigned int c, r; /* column and row number */
- /* int pinned; // is this vertex allowed to move? */
+ // int pinned; /* is this vertex allowed to move? */
float n1, n2, n3; /* three normal vectors for collision constrains */
unsigned int vcount; /* vertex count */
unsigned int scount; /* spring count */
} fmatrix3x3;
///////////////////////////
-// float[3] vector
+/* float[3] vector */
///////////////////////////
/* simple vector code */
/* STATUS: verified */
@@ -123,7 +123,7 @@ static void print_fvector(float m3[3])
}
///////////////////////////
-// long float vector float (*)[3]
+/* long float vector float (*)[3] */
///////////////////////////
/* print long vector on console: for debug output */
DO_INLINE void print_lfvector(float (*fLongVector)[3], unsigned int verts)
@@ -199,10 +199,10 @@ DO_INLINE float dot_lfvector(float (*fLongVectorA)[3],
{
long i = 0;
float temp = 0.0;
- // XXX brecht, disabled this for now (first schedule line was already disabled),
- // due to non-commutative nature of floating point ops this makes the sim give
- // different results each time you run it!
- // schedule(guided, 2)
+ /* XXX brecht, disabled this for now (first schedule line was already disabled),
+ * due to non-commutative nature of floating point ops this makes the sim give
+ * different results each time you run it!
+ * schedule(guided, 2) */
//#pragma omp parallel for reduction(+: temp) if (verts > CLOTH_OPENMP_LIMIT)
for (i = 0; i < (long)verts; i++) {
temp += dot_v3v3(fLongVectorA[i], fLongVectorB[i]);
@@ -326,9 +326,11 @@ static void print_bfmatrix(fmatrix3x3 *m)
for (j = 0; j < 3; j++) {
for (i = 0; i < 3; i++) {
- // if (t[k + i + (l + j) * size] != 0.0f) {
- // printf("warning: overwriting value at %d, %d\n", m[q].r, m[q].c);
- // }
+# if 0
+ if (t[k + i + (l + j) * size] != 0.0f) {
+ printf("warning: overwriting value at %d, %d\n", m[q].r, m[q].c);
+ }
+# endif
if (k == l) {
t[k + i + (k + j) * size] += m[q].m[i][j];
}
@@ -471,7 +473,7 @@ DO_INLINE void sub_fmatrix_fmatrix(float to[3][3],
sub_v3_v3v3(to[2], matrixA[2], matrixB[2]);
}
/////////////////////////////////////////////////////////////////
-// special functions
+/* special functions */
/////////////////////////////////////////////////////////////////
/* 3x3 matrix multiplied+added by a vector */
/* STATUS: verified */
@@ -532,7 +534,7 @@ BLI_INLINE void madd_m3_m3fl(float r[3][3], const float m[3][3], float f)
/////////////////////////////////////////////////////////////////
///////////////////////////
-// SPARSE SYMMETRIC big matrix with 3x3 matrix entries
+/* SPARSE SYMMETRIC big matrix with 3x3 matrix entries */
///////////////////////////
/* printf a big matrix on console: for debug output */
# if 0
@@ -555,7 +557,7 @@ BLI_INLINE void init_fmatrix(fmatrix3x3 *matrix, int r, int c)
/* create big matrix */
DO_INLINE fmatrix3x3 *create_bfmatrix(unsigned int verts, unsigned int springs)
{
- // TODO: check if memory allocation was successful */
+ /* TODO: check if memory allocation was successful */
fmatrix3x3 *temp = (fmatrix3x3 *)MEM_callocN(sizeof(fmatrix3x3) * (verts + springs),
"cloth_implicit_alloc_matrix");
int i;
@@ -581,12 +583,12 @@ DO_INLINE void del_bfmatrix(fmatrix3x3 *matrix)
/* copy big matrix */
DO_INLINE void cp_bfmatrix(fmatrix3x3 *to, fmatrix3x3 *from)
{
- // TODO bounds checking
+ /* TODO bounds checking */
memcpy(to, from, sizeof(fmatrix3x3) * (from[0].vcount + from[0].scount));
}
/* init big matrix */
-// slow in parallel
+/* slow in parallel */
DO_INLINE void init_bfmatrix(fmatrix3x3 *matrix, float m3[3][3])
{
unsigned int i;
@@ -597,7 +599,7 @@ DO_INLINE void init_bfmatrix(fmatrix3x3 *matrix, float m3[3][3])
}
/* init the diagonal of big matrix */
-// slow in parallel
+/* slow in parallel */
DO_INLINE void initdiag_bfmatrix(fmatrix3x3 *matrix, float m3[3][3])
{
unsigned int i, j;
@@ -657,7 +659,7 @@ DO_INLINE void subadd_bfmatrixS_bfmatrixS(
}
///////////////////////////////////////////////////////////////////
-// simulator start
+/* simulator start */
///////////////////////////////////////////////////////////////////
typedef struct Implicit_Data {
@@ -695,7 +697,7 @@ Implicit_Data *SIM_mass_spring_solver_create(int numverts, int numsprings)
id->S = create_bfmatrix(numverts, 0);
id->Pinv = create_bfmatrix(numverts, numsprings);
id->P = create_bfmatrix(numverts, numsprings);
- id->bigI = create_bfmatrix(numverts, numsprings); // TODO 0 springs
+ id->bigI = create_bfmatrix(numverts, numsprings); /* TODO 0 springs */
id->M = create_bfmatrix(numverts, numsprings);
id->X = create_lfvector(numverts);
id->Xnew = create_lfvector(numverts);
@@ -783,7 +785,7 @@ DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
# if 0
static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S)
{
- // Solves for unknown X in equation AX=B
+ /* Solves for unknown X in equation AX=B */
unsigned int conjgrad_loopcount = 0, conjgrad_looplimit = 100;
float conjgrad_epsilon = 0.0001f /* , conjgrad_lasterror=0 */ /* UNUSED */;
lfVector *q, *d, *tmp, *r;
@@ -799,7 +801,7 @@ static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z,
add_lfvector_lfvector(ldV, ldV, z, numverts);
- // r = B - Mul(tmp, A, X); // just use B if X known to be zero
+ // r = B - Mul(tmp, A, X); /* just use B if X known to be zero. */
cp_lfvector(r, lB, numverts);
mul_bfmatrix_lfvector(tmp, lA, ldV);
sub_lfvector_lfvector(r, r, tmp, numverts);
@@ -812,23 +814,23 @@ static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z,
starget = s * sqrtf(conjgrad_epsilon);
while (s > starget && conjgrad_loopcount < conjgrad_looplimit) {
- // Mul(q, A, d); // q = A*d;
+ // Mul(q, A, d); /* q = A*d; */
mul_bfmatrix_lfvector(q, lA, d);
filter(q, S);
a = s / dot_lfvector(d, q, numverts);
- // X = X + d*a;
+ /* X = X + d*a; */
add_lfvector_lfvectorS(ldV, ldV, d, a, numverts);
- // r = r - q*a;
+ /* r = r - q*a; */
sub_lfvector_lfvectorS(r, r, q, a, numverts);
s_prev = s;
s = dot_lfvector(r, r, numverts);
- //d = r+d*(s/s_prev);
+ /* d = r+d*(s/s_prev); */
add_lfvector_lfvectorS(d, r, d, (s / s_prev), numverts);
filter(d, S);
@@ -844,7 +846,7 @@ static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z,
// printf("W/O conjgrad_loopcount: %d\n", conjgrad_loopcount);
return conjgrad_loopcount <
- conjgrad_looplimit; // true means we reached desired accuracy in given time - ie stable
+ conjgrad_looplimit; /* true means we reached desired accuracy in given time - ie stable */
}
# endif
@@ -855,7 +857,7 @@ static int cg_filtered(lfVector *ldV,
fmatrix3x3 *S,
ImplicitSolverResult *result)
{
- // Solves for unknown X in equation AX=B
+ /* Solves for unknown X in equation AX=B */
unsigned int conjgrad_loopcount = 0, conjgrad_looplimit = 100;
float conjgrad_epsilon = 0.01f;
@@ -940,26 +942,26 @@ static int cg_filtered(lfVector *ldV,
result->error = bnorm2 > 0.0f ? sqrtf(delta_new / bnorm2) : 0.0f;
return conjgrad_loopcount <
- conjgrad_looplimit; // true means we reached desired accuracy in given time - ie stable
+ conjgrad_looplimit; /* true means we reached desired accuracy in given time - ie stable */
}
# if 0
-// block diagonalizer
+/* block diagonalizer */
DO_INLINE void BuildPPinv(fmatrix3x3 *lA, fmatrix3x3 *P, fmatrix3x3 *Pinv)
{
unsigned int i = 0;
- // Take only the diagonal blocks of A
+ /* Take only the diagonal blocks of A */
// #pragma omp parallel for private(i) if (lA[0].vcount > CLOTH_OPENMP_LIMIT)
for (i = 0; i < lA[0].vcount; i++) {
- // block diagonalizer
+ /* block diagonalizer */
cp_fmatrix(P[i].m, lA[i].m);
inverse_fmatrix(Pinv[i].m, P[i].m);
}
}
# if 0
-// version 1.3
+/* version 1.3 */
static int cg_filtered_pre(lfVector *dv,
fmatrix3x3 *lA,
lfVector *lB,
@@ -970,7 +972,7 @@ static int cg_filtered_pre(lfVector *dv,
{
unsigned int numverts = lA[0].vcount, iterations = 0, conjgrad_looplimit = 100;
float delta0 = 0, deltaNew = 0, deltaOld = 0, alpha = 0;
- float conjgrad_epsilon = 0.0001; // 0.2 is dt for steps=5
+ float conjgrad_epsilon = 0.0001; /* 0.2 is dt for steps=5 */
lfVector *r = create_lfvector(numverts);
lfVector *p = create_lfvector(numverts);
lfVector *s = create_lfvector(numverts);
@@ -1036,7 +1038,7 @@ static int cg_filtered_pre(lfVector *dv,
}
# endif
-// version 1.4
+/* version 1.4 */
static int cg_filtered_pre(lfVector *dv,
fmatrix3x3 *lA,
lfVector *lB,
@@ -1060,29 +1062,29 @@ static int cg_filtered_pre(lfVector *dv,
initdiag_bfmatrix(bigI, I);
sub_bfmatrix_Smatrix(bigI, bigI, S);
- // x = Sx_0+(I-S)z
+ /* x = Sx_0+(I-S)z */
filter(dv, S);
add_lfvector_lfvector(dv, dv, z, numverts);
- // b_hat = S(b-A(I-S)z)
+ /* b_hat = S(b-A(I-S)z) */
mul_bfmatrix_lfvector(r, lA, z);
mul_bfmatrix_lfvector(bhat, bigI, r);
sub_lfvector_lfvector(bhat, lB, bhat, numverts);
- // r = S(b-Ax)
+ /* r = S(b-Ax) */
mul_bfmatrix_lfvector(r, lA, dv);
sub_lfvector_lfvector(r, lB, r, numverts);
filter(r, S);
- // p = SP^-1r
+ /* p = SP^-1r */
mul_prevfmatrix_lfvector(p, Pinv, r);
filter(p, S);
- // delta0 = bhat^TP^-1bhat
+ /* delta0 = bhat^TP^-1bhat */
mul_prevfmatrix_lfvector(btemp, Pinv, bhat);
delta0 = dot_lfvector(bhat, btemp, numverts);
- // deltaNew = r^TP
+ /* deltaNew = r^TP */
deltaNew = dot_lfvector(r, p, numverts);
# if 0
@@ -1178,7 +1180,7 @@ bool SIM_mass_spring_solve_velocities(Implicit_Data *data, float dt, ImplicitSol
printf("cg_filtered calc time: %f\n", (float)(end - start));
# endif
- // advance velocities
+ /* advance velocities */
add_lfvector_lfvector(data->Vnew, data->V, data->dV, numverts);
del_lfvector(dFdXmV);
@@ -1190,7 +1192,7 @@ bool SIM_mass_spring_solve_positions(Implicit_Data *data, float dt)
{
int numverts = data->M[0].vcount;
- // advance positions
+ /* advance positions */
add_lfvector_lfvectorS(data->Xnew, data->X, data->Vnew, dt, numverts);
return true;
@@ -1662,7 +1664,7 @@ void SIM_mass_spring_force_vertex_wind(Implicit_Data *data,
BLI_INLINE void dfdx_spring(float to[3][3], const float dir[3], float length, float L, float k)
{
- // dir is unit length direction, rest is spring's restlength, k is spring constant.
+ /* dir is unit length direction, rest is spring's restlength, k is spring constant. */
// return ( (I-outerprod(dir, dir))*Min(1.0f, rest/length) - I) * -k;
outerproduct(to, dir, dir);
sub_m3_m3m3(to, I, to);
@@ -1681,7 +1683,7 @@ BLI_INLINE void dfdx_damp(float to[3][3],
float rest,
float damping)
{
- // inner spring damping vel is the relative velocity of the endpoints.
+ /* inner spring damping vel is the relative velocity of the endpoints. */
// return (I-outerprod(dir, dir)) * (-damping * -(dot(dir, vel)/Max(length, rest)));
mul_fvectorT_fvector(to, dir, dir);
sub_fmatrix_fmatrix(to, I, to);
@@ -1691,7 +1693,7 @@ BLI_INLINE void dfdx_damp(float to[3][3],
BLI_INLINE void dfdv_damp(float to[3][3], const float dir[3], float damping)
{
- // derivative of force wrt velocity
+ /* derivative of force wrt velocity */
outerproduct(to, dir, dir);
mul_m3_fl(to, -damping);
}
@@ -1725,7 +1727,7 @@ BLI_INLINE float fbstar(float length, float L, float kb, float cb)
return tempfb_fl;
}
-// function to calculae bending spring force (taken from Choi & Co)
+/* function to calculae bending spring force (taken from Choi & Co) */
BLI_INLINE float fbstar_jacobi(float length, float L, float kb, float cb)
{
float tempfb_fl = kb * fb(length, L);
@@ -1756,7 +1758,7 @@ BLI_INLINE bool spring_length(Implicit_Data *data,
if (length > L) {
if ((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) &&
(((length - L) * 100.0f / L) > clmd->sim_parms->maxspringlen)) {
- // cut spring!
+ /* cut spring! */
s->flags |= CSPRING_FLAG_DEACTIVATE;
return false;
}
@@ -1808,7 +1810,7 @@ bool SIM_mass_spring_force_spring_linear(Implicit_Data *data,
float f[3], dfdx[3][3], dfdv[3][3];
float damping = 0;
- // calculate elonglation
+ /* calculate elonglation */
spring_length(data, i, j, extent, dir, &length, vel);
/* This code computes not only the force, but also its derivative.
@@ -1858,7 +1860,7 @@ bool SIM_mass_spring_force_spring_bending(
{
float extent[3], length, dir[3], vel[3];
- // calculate elonglation
+ /* calculate elonglation */
spring_length(data, i, j, extent, dir, &length, vel);
if (length < restlen) {
@@ -2110,7 +2112,7 @@ BLI_INLINE void spring_hairbend_estimate_dfdx(Implicit_Data *data,
int q,
float dfdx[3][3])
{
- const float delta = 0.00001f; // TODO find a good heuristic for this
+ const float delta = 0.00001f; /* TODO find a good heuristic for this */
float dvec_null[3][3], dvec_pos[3][3], dvec_neg[3][3];
float f[3];
int a, b;
@@ -2149,7 +2151,7 @@ BLI_INLINE void spring_hairbend_estimate_dfdv(Implicit_Data *data,
int q,
float dfdv[3][3])
{
- const float delta = 0.00001f; // TODO find a good heuristic for this
+ const float delta = 0.00001f; /* TODO find a good heuristic for this */
float dvec_null[3][3], dvec_pos[3][3], dvec_neg[3][3];
float f[3];
int a, b;
@@ -2253,7 +2255,7 @@ bool SIM_mass_spring_force_spring_bending_hair(Implicit_Data *data,
float dfi_dxi[3][3], dfj_dxi[3][3], dfj_dxj[3][3], dfk_dxi[3][3], dfk_dxj[3][3], dfk_dxk[3][3];
float dfdvi[3][3];
- // TESTING
+ /* TESTING */
damping = 0.0f;
zero_v3(fi);
@@ -2350,8 +2352,8 @@ bool SIM_mass_spring_force_spring_goal(Implicit_Data *data,
if (length > ALMOST_ZERO) {
mul_v3_v3fl(f, dir, stiffness * length);
- // Ascher & Boxman, p.21: Damping only during elonglation
- // something wrong with it...
+ /* Ascher & Boxman, p.21: Damping only during elonglation
+ * something wrong with it... */
madd_v3_v3fl(f, dir, damping * dot_v3v3(vel, dir));
dfdx_spring(dfdx, dir, length, 0.0f, stiffness);
diff --git a/source/blender/simulation/intern/implicit_eigen.cpp b/source/blender/simulation/intern/implicit_eigen.cpp
index 15b9e30e32a..75103452471 100644
--- a/source/blender/simulation/intern/implicit_eigen.cpp
+++ b/source/blender/simulation/intern/implicit_eigen.cpp
@@ -842,7 +842,7 @@ void SIM_mass_spring_force_face_wind(
float win[3], nor[3], area;
float factor;
- // calculate face normal and area
+ /* calculate face normal and area */
area = calc_nor_area_tri(nor, data->X.v3(v1), data->X.v3(v2), data->X.v3(v3));
factor = effector_scale * area / 3.0f;
@@ -894,7 +894,7 @@ BLI_INLINE void dfdx_damp(float to[3][3],
float rest,
float damping)
{
- // inner spring damping vel is the relative velocity of the endpoints.
+ /* inner spring damping vel is the relative velocity of the endpoints. */
// return (I-outerprod(dir, dir)) * (-damping * -(dot(dir, vel)/Max(length, rest)));
mul_fvectorT_fvector(to, dir, dir);
sub_fmatrix_fmatrix(to, I, to);
@@ -904,7 +904,7 @@ BLI_INLINE void dfdx_damp(float to[3][3],
BLI_INLINE void dfdv_damp(float to[3][3], const float dir[3], float damping)
{
- // derivative of force wrt velocity
+ /* derivative of force wrt velocity */
outerproduct(to, dir, dir);
mul_m3_fl(to, -damping);
}
@@ -936,7 +936,7 @@ BLI_INLINE float fbstar(float length, float L, float kb, float cb)
}
}
-// function to calculae bending spring force (taken from Choi & Co)
+/* function to calculae bending spring force (taken from Choi & Co) */
BLI_INLINE float fbstar_jacobi(float length, float L, float kb, float cb)
{
float tempfb_fl = kb * fb(length, L);
@@ -968,7 +968,7 @@ BLI_INLINE bool spring_length(Implicit_Data *data,
if (length > L) {
if ((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) &&
(((length - L) * 100.0f / L) > clmd->sim_parms->maxspringlen)) {
- // cut spring!
+ /* cut spring! */
s->flags |= CSPRING_FLAG_DEACTIVATE;
return false;
}
@@ -1014,7 +1014,7 @@ bool SIM_mass_spring_force_spring_linear(Implicit_Data *data,
{
float extent[3], length, dir[3], vel[3];
- // calculate elonglation
+ /* calculate elonglation */
spring_length(data, i, j, extent, dir, &length, vel);
if (length > restlen || no_compress) {
@@ -1026,8 +1026,8 @@ bool SIM_mass_spring_force_spring_linear(Implicit_Data *data,
}
mul_v3_v3fl(f, dir, stretch_force);
- // Ascher & Boxman, p.21: Damping only during elonglation
- // something wrong with it...
+ /* Ascher & Boxman, p.21: Damping only during elonglation
+ * something wrong with it... */
madd_v3_v3fl(f, dir, damping * dot_v3v3(vel, dir));
dfdx_spring(dfdx, dir, length, restlen, stiffness);
@@ -1075,7 +1075,7 @@ bool SIM_mass_spring_force_spring_bending(Implicit_Data *data,
{
float extent[3], length, dir[3], vel[3];
- // calculate elonglation
+ /* calculate elonglation */
spring_length(data, i, j, extent, dir, &length, vel);
if (length < restlen) {
@@ -1223,7 +1223,7 @@ BLI_INLINE void spring_angbend_estimate_dfdx(Implicit_Data *data,
int q,
float dfdx[3][3])
{
- const float delta = 0.00001f; // TODO find a good heuristic for this
+ const float delta = 0.00001f; /* TODO find a good heuristic for this */
float dvec_null[3][3], dvec_pos[3][3], dvec_neg[3][3];
float f[3];
int a, b;
@@ -1262,7 +1262,7 @@ BLI_INLINE void spring_angbend_estimate_dfdv(Implicit_Data *data,
int q,
float dfdv[3][3])
{
- const float delta = 0.00001f; // TODO find a good heuristic for this
+ const float delta = 0.00001f; /* TODO find a good heuristic for this */
float dvec_null[3][3], dvec_pos[3][3], dvec_neg[3][3];
float f[3];
int a, b;
@@ -1368,7 +1368,7 @@ bool SIM_mass_spring_force_spring_bending_angular(Implicit_Data *data,
float dfi_dxi[3][3], dfj_dxi[3][3], dfj_dxj[3][3], dfk_dxi[3][3], dfk_dxj[3][3], dfk_dxk[3][3];
float dfdvi[3][3];
- // TESTING
+ /* TESTING */
damping = 0.0f;
zero_v3(fi);
@@ -1468,8 +1468,8 @@ bool SIM_mass_spring_force_spring_goal(Implicit_Data *data,
if (length > ALMOST_ZERO) {
mul_v3_v3fl(f, dir, stiffness * length);
- // Ascher & Boxman, p.21: Damping only during elonglation
- // something wrong with it...
+ /* Ascher & Boxman, p.21: Damping only during elonglation
+ * something wrong with it... */
madd_v3_v3fl(f, dir, damping * dot_v3v3(vel, dir));
dfdx_spring(dfdx, dir, length, 0.0f, stiffness);
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo.c
index 87cb4d5f584..b81b12a1b06 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo.c
@@ -374,7 +374,7 @@ void WM_gizmo_set_color_highlight(wmGizmo *gz, const float color_hi[4])
copy_v4_v4(gz->color_hi, color_hi);
}
-/** \} */ // Gizmo Creation API
+/** \} */ /* Gizmo Creation API. */
/* -------------------------------------------------------------------- */
/** \name Gizmo Callback Assignment
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 76ec3bba368..afd88d6a680 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -453,7 +453,8 @@ void wm_event_do_notifiers(bContext *C)
else if (note->data == ND_WORKSPACE_DELETE) {
WorkSpace *workspace = note->reference;
- ED_workspace_delete(workspace, CTX_data_main(C), C, wm); // XXX hrms, think this over!
+ ED_workspace_delete(
+ workspace, CTX_data_main(C), C, wm); /* XXX hrms, think this over! */
if (G.debug & G_DEBUG_EVENTS) {
printf("%s: Workspace delete %p\n", __func__, workspace);
}
@@ -473,7 +474,7 @@ void wm_event_do_notifiers(bContext *C)
WorkSpace *workspace = WM_window_get_active_workspace(win);
WorkSpaceLayout *layout = note->reference;
- ED_workspace_layout_delete(workspace, layout, C); // XXX hrms, think this over!
+ ED_workspace_layout_delete(workspace, layout, C); /* XXX hrms, think this over! */
if (G.debug & G_DEBUG_EVENTS) {
printf("%s: screen delete %p\n", __func__, note->reference);
}
@@ -2262,7 +2263,7 @@ static int wm_handler_fileselect_do(bContext *C,
wm_window_close(C, wm, temp_win);
- CTX_wm_window_set(C, ctx_win); // wm_window_close() NULLs.
+ CTX_wm_window_set(C, ctx_win); /* #wm_window_close() NULLs. */
/* Some operators expect a drawable context (for EVT_FILESELECT_EXEC) */
wm_window_make_drawable(wm, ctx_win);
/* Ensure correct cursor position, otherwise, popups may close immediately after
@@ -3458,7 +3459,7 @@ void WM_event_fileselect_event(wmWindowManager *wm, void *ophandle, int eventval
event.type = EVT_FILESELECT;
event.val = eventval;
- event.customdata = ophandle; // only as void pointer type check
+ event.customdata = ophandle; /* Only as void pointer type check. */
wm_event_add(win, &event);
}
diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c
index c9b125901e7..189657f7aa3 100644
--- a/source/blender/windowmanager/intern/wm_jobs.c
+++ b/source/blender/windowmanager/intern/wm_jobs.c
@@ -443,7 +443,11 @@ static void wm_jobs_test_suspend_stop(wmWindowManager *wm, wmJob *test)
/* Possible suspend ourselves, waiting for other jobs, or de-suspend. */
test->suspended = suspend;
- // if (suspend) printf("job suspended: %s\n", test->name);
+#if 0
+ if (suspend) {
+ printf("job suspended: %s\n", test->name);
+ }
+#endif
}
/**
@@ -679,8 +683,14 @@ void wm_jobs_timer(wmWindowManager *wm, wmTimer *wt)
wm_job->run_customdata = NULL;
wm_job->run_free = NULL;
- // if (wm_job->stop) printf("job ready but stopped %s\n", wm_job->name);
- // else printf("job finished %s\n", wm_job->name);
+#if 0
+ if (wm_job->stop) {
+ printf("job ready but stopped %s\n", wm_job->name);
+ }
+ else {
+ printf("job finished %s\n", wm_job->name);
+ }
+#endif
if (G.debug & G_DEBUG_JOBS) {
printf("Job '%s' finished in %f seconds\n",
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 9d99e671369..f802b8f9746 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -367,7 +367,7 @@ static const char *wm_context_member_from_ptr(bContext *C, const PointerRNA *ptr
for (link = lb.first; link; link = link->next) {
const char *identifier = link->data;
PointerRNA ctx_item_ptr = {
- {0}}; // CTX_data_pointer_get(C, identifier); // XXX, this isnt working
+ {0}}; /* CTX_data_pointer_get(C, identifier); */ /* XXX, this isn't working. */
if (ctx_item_ptr.type == NULL) {
continue;
@@ -3893,7 +3893,9 @@ static void gesture_box_modal_keymap(wmKeyConfig *keyconf)
WM_modalkeymap_assign(keymap, "NODE_OT_viewer_border");
WM_modalkeymap_assign(keymap, "PAINT_OT_hide_show");
WM_modalkeymap_assign(keymap, "OUTLINER_OT_select_box");
- // WM_modalkeymap_assign(keymap, "SCREEN_OT_box_select"); // template
+#if 0 /* Template. */
+ WM_modalkeymap_assign(keymap, "SCREEN_OT_box_select");
+#endif
WM_modalkeymap_assign(keymap, "SEQUENCER_OT_select_box");
WM_modalkeymap_assign(keymap, "SEQUENCER_OT_view_ghost_border");
WM_modalkeymap_assign(keymap, "UV_OT_select_box");
diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c
index 948b6854b02..be6f1079279 100644
--- a/source/blender/windowmanager/intern/wm_stereo.c
+++ b/source/blender/windowmanager/intern/wm_stereo.c
@@ -70,7 +70,7 @@ void wm_stereo3d_draw_sidebyside(wmWindow *win, int view)
soffx = 0;
}
}
- else { // RIGHT_LEFT_ID
+ else { /* #RIGHT_LEFT_ID */
if (cross_eyed) {
soffx = 0;
}
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index e8575374022..8db8694e8a6 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -1495,15 +1495,15 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
break;
}
case GHOST_kEventNativeResolutionChange: {
- // only update if the actual pixel size changes
+ /* Only update if the actual pixel size changes. */
float prev_pixelsize = U.pixelsize;
WM_window_set_dpi(win);
if (U.pixelsize != prev_pixelsize) {
BKE_icon_changed(WM_window_get_active_screen(win)->id.icon_id);
- // close all popups since they are positioned with the pixel
- // size baked in and it's difficult to correct them
+ /* Close all popups since they are positioned with the pixel
+ * size baked in and it's difficult to correct them. */
CTX_wm_window_set(C, win);
UI_popup_handlers_remove_all(C, &win->modalhandlers);
CTX_wm_window_set(C, NULL);